mirror of
https://github.com/stablyai/orca.git
synced 2026-11-14 09:57:48 +00:00
* fix(antigravity): say Antigravity Chat isn't available on Windows instead of silently opening a terminal Google publishes no Windows agy-acp-server, so a Windows host refused Antigravity chats with the generic 'agent' reason: launches fell back to a terminal with no explanation and Settings showed nothing. A Windows host now reports reason 'windows' (createSupport and published availability), which launch receipts state as chat_unavailable_on_windows, the new-tab picker labels 'No chat on Windows yet', and explicit-chat failures explain. Agents and Accounts settings say so for a Windows host. The decision is the execution host's OS, so a Windows client chatting on a macOS or Linux host is unaffected; one predicate (structuredChatUnavailableOnPlatform) gates it all. Fixes #30817, STA-11245 * docs: correct chatUnavailableOnThisDesktop comment
46 lines
1.6 KiB
TypeScript
46 lines
1.6 KiB
TypeScript
import type { AgentSessionExecutionLocation } from '../../shared/agent-session/lifecycle/agent-session-record'
|
|
import type { StructuredAgentId } from '../../shared/agent-session/lifecycle/agent-session-provider-handle'
|
|
import { LOCAL_EXECUTION_HOST_ID } from '../../shared/execution-host'
|
|
|
|
export type StructuredAgentSessionCreateSupport = {
|
|
supported: boolean
|
|
reason?: 'agent' | 'remote' | 'wsl' | 'windows'
|
|
}
|
|
|
|
export function resolveStructuredAgentSessionCreateSupport(input: {
|
|
location: AgentSessionExecutionLocation
|
|
adapterSupportsCreate: boolean
|
|
/** The agent has no chat on this host's OS, so no install or update can help. */
|
|
unavailableOnPlatform?: boolean
|
|
}): StructuredAgentSessionCreateSupport {
|
|
if (!input.adapterSupportsCreate) {
|
|
return {
|
|
supported: false,
|
|
reason:
|
|
input.location.executionHostId !== LOCAL_EXECUTION_HOST_ID
|
|
? 'remote'
|
|
: input.location.wslDistro
|
|
? 'wsl'
|
|
: input.unavailableOnPlatform
|
|
? 'windows'
|
|
: 'agent'
|
|
}
|
|
}
|
|
return { supported: true }
|
|
}
|
|
|
|
export type StructuredAgentSessionCreateSupportCheck = 'location' | 'installed-agent'
|
|
|
|
/** Log the failing check once per terminal fallback; omit paths and environment values. */
|
|
export function warnStructuredAgentSessionCreateUnsupported(
|
|
agent: StructuredAgentId,
|
|
support: StructuredAgentSessionCreateSupport,
|
|
check: StructuredAgentSessionCreateSupportCheck
|
|
): void {
|
|
if (!support.supported) {
|
|
console.warn(
|
|
`[structured-create-support] ${agent} unsupported: ${check} check refused (reason ${support.reason ?? 'none'})`
|
|
)
|
|
}
|
|
}
|