-
Notifications
You must be signed in to change notification settings - Fork 89
refactor: discriminated union for transport metadata, remove iOS proxy setup #23776
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -643,7 +643,9 @@ function isToolResultType(type: string): boolean { | |
| function isSystemNoticeText(block: Record<string, unknown>): boolean { | ||
| if (block.type !== "text") return false; | ||
| const text = typeof block.text === "string" ? block.text : ""; | ||
| return text.startsWith("<system_notice>") && text.endsWith("</system_notice>"); | ||
| return ( | ||
| text.startsWith("<system_notice>") && text.endsWith("</system_notice>") | ||
| ); | ||
| } | ||
|
|
||
| /** | ||
|
|
@@ -1115,7 +1117,7 @@ export async function handleSendMessage( | |
| // channels, headless) fall back to local execution. | ||
| // Set the proxy BEFORE updateClient so updateClient's call to | ||
| // hostBashProxy.updateSender targets the correct (new) proxy. | ||
| if (sourceInterface === "macos" || sourceInterface === "ios") { | ||
| if (sourceInterface === "macos") { | ||
| // Reuse the existing proxy if the conversation is actively processing a | ||
| // host bash request to avoid orphaning in-flight requests. | ||
| if (!conversation.isProcessing() || !conversation.hostBashProxy) { | ||
|
|
@@ -1152,9 +1154,7 @@ export async function handleSendMessage( | |
| // When proxies are preserved during an active turn (non-desktop request while | ||
| // processing), skip updating proxy senders to avoid degrading them. | ||
| const preservingProxies = | ||
| conversation.isProcessing() && | ||
| sourceInterface !== "macos" && | ||
| sourceInterface !== "ios"; | ||
| conversation.isProcessing() && sourceInterface !== "macos"; | ||
|
Comment on lines
1156
to
+1157
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
This update removes iOS proxy setup, but this condition now preserves existing proxies for any non-macOS interface during active turns. In a mixed-client scenario (macOS turn in flight, then iOS message queued on the same conversation), those preserved proxies are later re-enabled because Useful? React with 👍 / 👎. |
||
| conversation.updateClient(onEvent, !isInteractive, { | ||
| skipProxySenderUpdate: preservingProxies, | ||
| }); | ||
|
|
||
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.
🚩 New hostHomeDir/hostUsername fields are defined but not consumed server-side
The
MacosTransportMetadatatype addshostHomeDirandhostUsernameoptional fields (assistant/src/daemon/message-types/conversations.ts:34-36), and the Swift client adds matching properties (clients/shared/Network/Generated/GeneratedAPITypes.swift:3591-3602). However, no server-side code currently reads these fields from the transport metadata. This is likely intentional scaffolding for future use — the fields are optional so nothing breaks — but the reviewer should confirm that a follow-up PR will consume them.Was this helpful? React with 👍 or 👎 to provide feedback.