* fix(agents): recognize OpenCode native OC | tab titles OpenCode's native OSC titles use `OC | <task>` without an `opencode` token, so title classifiers left tabs as Claude/unknown. Map the native marker (optional mux prefix) to OpenCode identity in both title classifiers, exclude it from isClaudeAgent, and cover lookalikes plus stale Claude launch reclaim. Builds on and supersedes #8590 (credit @gatsby74). Fixes #8478. * fix(agents): drop renderer import from #8478 shared repro tsconfig.node includes src/shared tests; importing agent-status pulled renderer modules outside the node project and failed typecheck. Assert opencode identity via shared title classifiers only (OpenCode TUI sets "OpenCode" and `OC | ${title}`). * fix(runtime): fill browser cert failure map in mobile snapshot fixtures Main's #9104 reads browserCertificateFailuresByPageId in buildMobileBrowserTab but left partial AppState test helpers without the field, breaking PR Checks merge commits. Default the map in fixtures and use optional chaining so partial state cannot throw.
38 lines
1.3 KiB
TypeScript
38 lines
1.3 KiB
TypeScript
/**
|
|
* Compatibility barrel for shared terminal agent-title detection.
|
|
*
|
|
* Why shared: main and renderer both consume OSC titles for facts, stats, and
|
|
* UI state. Keep existing imports stable while the implementation stays split
|
|
* into focused modules that satisfy max-lines. (main's #7612 split into
|
|
* `terminal-title-*` modules coexists — those files stay on disk for their
|
|
* direct `resolveTerminalTitleAgentType`/`synthetic-agent-title` consumers.)
|
|
*/
|
|
|
|
export type { AgentStatus } from './agent-title-core'
|
|
export {
|
|
isClaudeManagementTitle,
|
|
isCursorAgentTitle,
|
|
isCursorNativeAgentTitle,
|
|
isGeminiTerminalTitle,
|
|
isPiTerminalTitle,
|
|
STRONG_IDLE_KEYWORDS_RE,
|
|
STRONG_WORKING_KEYWORDS_RE
|
|
} from './agent-title-core'
|
|
export { isOpenCodeNativeTitle, isMeaningfulOpenCodeTerminalTitle } from './opencode-terminal-title'
|
|
export { getAgentLabel, isClaudeAgent } from './agent-title-identity'
|
|
export {
|
|
clearWorkingIndicators,
|
|
createAgentStatusTracker,
|
|
detectAgentStatusFromTitle,
|
|
normalizeTerminalTitle
|
|
} from './agent-title-status'
|
|
|
|
// Re-export so existing `agent-detection` importers keep working.
|
|
export { AGENT_NAMES, titleHasAgentName } from './agent-name-token-match'
|
|
export {
|
|
extractAllOscTitles,
|
|
extractLastOscTitle,
|
|
MAX_OSC_TITLE_CHARS
|
|
} from './osc-title-extraction'
|
|
export { isShellProcess } from './shell-process-detection'
|