mirror of
https://github.com/stablyai/orca.git
synced 2026-10-20 16:03:20 +00:00
fix(terminal): reject conflicting Ctrl+Enter evidence
This commit is contained in:
@@ -37,6 +37,17 @@ describe('hasCtrlEnterCsiUAuthorityForPane', () => {
|
||||
}
|
||||
expect(hasCtrlEnterCsiUAuthorityForPane(state, PANE_KEY, '⠋ Droid')).toBe(true)
|
||||
expect(hasCtrlEnterCsiUAuthorityForPane(state, PANE_KEY, 'C:\\work\\grok-project')).toBe(false)
|
||||
expect(
|
||||
hasCtrlEnterCsiUAuthorityForPane(
|
||||
{
|
||||
paneForegroundAgentByPaneKey: {
|
||||
[PANE_KEY]: { agent: 'pi', shellForeground: false }
|
||||
}
|
||||
},
|
||||
PANE_KEY,
|
||||
'Droid'
|
||||
)
|
||||
).toBe(false)
|
||||
|
||||
for (const foreground of [
|
||||
{ agent: 'grok' as const, routingRevoked: true, shellForeground: false },
|
||||
|
||||
@@ -24,5 +24,8 @@ export function hasCtrlEnterCsiUAuthorityForPane(
|
||||
return agentAcceptsCtrlEnterCsiU(foreground.agent)
|
||||
}
|
||||
const titleAgent = terminalTitle ? resolveCommittedTitleAgentType(terminalTitle) : null
|
||||
if (foreground?.agent != null && foreground.agent !== titleAgent) {
|
||||
return false
|
||||
}
|
||||
return agentAcceptsCtrlEnterCsiU(titleAgent)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user