-
Notifications
You must be signed in to change notification settings - Fork 2.1k
refactor(desktop): realtime hub as default voice path + revert pill UI #8002
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
vendz
wants to merge
34
commits into
BasedHardware:main
Choose a base branch
from
vendz:desktop-realtime-hub-default
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
34 commits
Select commit
Hold shift + click to select a range
f121f31
refactor(desktop): hub always-on — drop enable toggle, derive provide…
vendz 73bebbd
refactor(desktop): remove hub enable gates; unwire pill flags; single…
vendz ce7c34e
refactor(desktop): remove floating-bar Realtime Hub toggle + provider…
vendz 884fd41
feat(desktop): default Voice Model to OpenAI (GPT Realtime 2)
vendz f858824
revert(desktop): restore imperative PTT resize; drop reactive voice-a…
vendz bb26c29
revert(desktop): restore updateBarState(skipResize:) imperative resize
vendz 155c171
refactor(desktop): drop orphaned audio level-tap from StreamingPCMPlayer
vendz 4b047bc
docs(desktop): update RealtimeHubSession header (BYOK + managed, not …
vendz 26c445b
chore(desktop): changelog — hub as default voice path; drop reverted …
vendz 6666c64
fix(desktop): re-warm hub on Voice Model change; collapse bar on mid-…
vendz ff7bcc0
fix(desktop): remove dead .realtimeHubSettingsDidChange notification
vendz 1793120
fix(desktop): Voice Model picker posts .realtimeOmniSettingsDidChange
vendz 713f5ff
fix(desktop): hub takes a turn only when actually connected (graceful…
vendz 1b67d9c
feat(desktop): give the realtime voice agent personal-data tools
vendz 9c419b1
feat(desktop): execute the voice-agent data tools via APIClient
vendz 8e98a2b
test(desktop): stub the new voice-agent data tools in the hub harness
vendz 6945db1
feat(desktop): give the realtime hub activity, screen, and full-task …
vendz dd9e9cb
feat(desktop): dispatch the hub's get_daily_recap, search_screen_hist…
vendz cc5a8e2
test(desktop): stub the new hub data tools in the test harness
vendz 5999655
feat(desktop): local <about_user> identity-card builder for the realt…
vendz 4780076
fix(desktop): AboutUserCard name falls back to displayName; tighten h…
vendz d09705b
feat(desktop): inject local <about_user> card + user-language reply i…
vendz 7f84b72
fix(desktop): restore ask_higher_model + everything-else lanes to spe…
vendz 8367bed
feat(desktop): ask_higher_model carries context + persona/card system…
vendz 7781422
feat(desktop): spawn_agent supplies its own title, skipping the redun…
vendz 030f9ad
revert(desktop): roll back escalation-policy prompt prose to lean spe…
vendz d4f9d1b
feat(desktop): mandatory spoken heads-up before slow tools (ask_highe…
vendz 60802ea
feat(desktop): playful 5-bar voice-reactive PTT mic waveform
vendz e611b62
refactor(desktop): use VoiceWaveformBars in floating-bar listening view
vendz 46d1b0c
refactor(desktop): use VoiceWaveformBars in voice follow-up view; pur…
vendz f221dc3
feat(desktop): feed live mic level to the PTT waveform via AudioLevel…
vendz aa4e1d8
fix(desktop): typed follow-up after a voice turn is no longer spoken …
vendz c48c434
refactor(desktop): soften the slow-tool heads-up prompt wording
vendz 3b9d18e
chore(desktop): changelog entry for the PTT mic waveform
vendz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 51 additions & 0 deletions
51
desktop/macos/Desktop/Sources/FloatingControlBar/AboutUserCard.swift
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| import Foundation | ||
|
|
||
| /// Builds the compact, local-only `<about_user>` block injected into the hub's | ||
| /// system instruction at warm time. Identity + rough situation only; exact/current | ||
| /// lists stay behind the read tools (the card hedges this). No network calls. | ||
| enum AboutUserCard { | ||
| /// Pure formatter — kept separate from `build()` so it is unit-testable. | ||
| static func render(name: String, facts: [String], overdue: Int, dueToday: Int) -> String { | ||
| var lines: [String] = ["<about_user>"] | ||
| if !name.isEmpty { lines.append("Name: \(name)") } | ||
| lines.append("What Omi knows about them:") | ||
| if facts.isEmpty { | ||
| lines.append("- Nothing saved yet.") | ||
| } else { | ||
| lines.append(contentsOf: facts.map { "- \($0)" }) | ||
| } | ||
| if overdue == 0 && dueToday == 0 { | ||
| lines.append("Right now: nothing overdue or due today.") | ||
| } else { | ||
| lines.append("Right now: \(overdue) overdue, \(dueToday) due today.") | ||
| } | ||
| lines.append( | ||
| "(This is a quick snapshot — for the exact or current list, call get_tasks / get_action_items.)") | ||
| lines.append("</about_user>") | ||
| return lines.joined(separator: "\n") | ||
| } | ||
|
|
||
| /// Gathers local data (auth name, top memories, task counts) and renders the card. | ||
| /// Best-effort: any failure degrades to a smaller card, never throws. | ||
| @MainActor | ||
| static func build() async -> String { | ||
| let auth = AuthService.shared | ||
| let rawName = auth.givenName.isEmpty ? auth.displayName : auth.givenName | ||
| let name = rawName.trimmingCharacters(in: .whitespacesAndNewlines) | ||
|
|
||
| var facts: [String] = [] | ||
| if let memories = try? await MemoryStorage.shared.getLocalMemories(limit: 8) { | ||
| facts = memories.prefix(8).compactMap { mem in | ||
| let t = mem.content.trimmingCharacters(in: .whitespacesAndNewlines) | ||
| guard !t.isEmpty else { return nil } | ||
| return t.count > 120 ? String(t.prefix(117)) + "…" : t | ||
| } | ||
| } | ||
|
|
||
| await TasksStore.shared.loadDashboardTasks() | ||
| let overdue = TasksStore.shared.overdueTasks.count | ||
| let dueToday = TasksStore.shared.todaysTasks.count | ||
|
|
||
| return render(name: name, facts: facts, overdue: overdue, dueToday: dueToday) | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P1: Raw memory text is injected into
<about_user>without sanitization. A memory containing markup/newlines can break the section and inject instructions into trusted hub prompt context.Prompt for AI agents