mirror of
https://github.com/stablyai/orca.git
synced 2026-10-21 08:03:33 +00:00
fix(workspaces): target remote launch option receipts
This commit is contained in:
@@ -10346,7 +10346,8 @@
|
||||
"assertions": [
|
||||
"legacy hosts without acknowledgement cannot stamp client options as applied",
|
||||
"client-built commands retain their known applied state",
|
||||
"fallback agents own draft state without inheriting requested-agent options"
|
||||
"fallback agents own draft state without inheriting requested-agent options",
|
||||
"paired-runtime receipts target the authoritative web-surface agent tab"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
||||
@@ -755,6 +755,7 @@ describe('useComposerState host-context boundaries', () => {
|
||||
'startupSessionOptions: { agent: tuiAgent, values: startupPlan.sessionOptions }'
|
||||
)
|
||||
expect(fullSubmit).toContain('resolveCreatedAgentAppliedSessionOptions')
|
||||
expect(fullSubmit).toContain('resolveLaunchAgentTabId')
|
||||
expect(fullSubmit).not.toContain('platform: CLIENT_PLATFORM')
|
||||
|
||||
const quickSubmit = sourceBetween(
|
||||
|
||||
@@ -15,7 +15,10 @@ import {
|
||||
} from '@/lib/github-links'
|
||||
import { activateAndRevealWorktree, type AgentStartedTelemetry } from '@/lib/worktree-activation'
|
||||
import { runBackgroundWorktreeCreation } from '@/lib/worktree-creation-flow'
|
||||
import { resolveCreatedAgentAppliedSessionOptions } from '@/lib/worktree-creation-agent-seeds'
|
||||
import {
|
||||
resolveCreatedAgentAppliedSessionOptions,
|
||||
resolveLaunchAgentTabId
|
||||
} from '@/lib/worktree-creation-agent-seeds'
|
||||
import {
|
||||
findPendingLinkedWorkItemCreationId,
|
||||
type WorktreeCreationRequest
|
||||
@@ -3919,8 +3922,13 @@ export function useComposerState(options: UseComposerStateOptions): UseComposerS
|
||||
backendSpawnedStartup && !backendStartup
|
||||
? (worktree.createdWithAgent ?? tuiAgent)
|
||||
: tuiAgent
|
||||
const optionScopeKey =
|
||||
(activation !== false ? activation.primaryTabId : null) ?? result.startupTerminal?.tabId
|
||||
const optionScopeKey = resolveLaunchAgentTabId(useAppStore.getState(), {
|
||||
agent: createdAgent,
|
||||
worktreeId: worktree.id,
|
||||
primaryTabId: activation === false ? null : activation.primaryTabId,
|
||||
startupTerminalTabId: result.startupTerminal?.tabId,
|
||||
backendSpawned: backendSpawnedStartup
|
||||
})
|
||||
if (optionScopeKey) {
|
||||
seedNativeChatAppliedSessionOptions(
|
||||
optionScopeKey,
|
||||
|
||||
@@ -38,7 +38,7 @@ export function resolveCreatedAgentAppliedSessionOptions(args: {
|
||||
* (e.g. "dev server", "logs", "shell") the worktree's first tab runs no agent,
|
||||
* and activation's `primaryTabId` is only the worktree's primary tab.
|
||||
*/
|
||||
function resolveLaunchAgentTabId(
|
||||
export function resolveLaunchAgentTabId(
|
||||
state: AppStoreSnapshot,
|
||||
args: {
|
||||
agent: TuiAgent
|
||||
|
||||
Reference in New Issue
Block a user