@yjjeong/omg 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +85 -0
- package/LICENSE +21 -0
- package/README.md +153 -0
- package/dist/cli/args.d.ts +39 -0
- package/dist/cli/args.d.ts.map +1 -0
- package/dist/cli/args.js +129 -0
- package/dist/cli/args.js.map +1 -0
- package/dist/cli/autoCommit.d.ts +20 -0
- package/dist/cli/autoCommit.d.ts.map +1 -0
- package/dist/cli/autoCommit.js +121 -0
- package/dist/cli/autoCommit.js.map +1 -0
- package/dist/cli/bgTasks.d.ts +57 -0
- package/dist/cli/bgTasks.d.ts.map +1 -0
- package/dist/cli/bgTasks.js +193 -0
- package/dist/cli/bgTasks.js.map +1 -0
- package/dist/cli/compactor.d.ts +48 -0
- package/dist/cli/compactor.d.ts.map +1 -0
- package/dist/cli/compactor.js +73 -0
- package/dist/cli/compactor.js.map +1 -0
- package/dist/cli/doctor.d.ts +77 -0
- package/dist/cli/doctor.d.ts.map +1 -0
- package/dist/cli/doctor.js +279 -0
- package/dist/cli/doctor.js.map +1 -0
- package/dist/cli/gitStatus.d.ts +7 -0
- package/dist/cli/gitStatus.d.ts.map +1 -0
- package/dist/cli/gitStatus.js +70 -0
- package/dist/cli/gitStatus.js.map +1 -0
- package/dist/cli/handoff.d.ts +36 -0
- package/dist/cli/handoff.d.ts.map +1 -0
- package/dist/cli/handoff.js +60 -0
- package/dist/cli/handoff.js.map +1 -0
- package/dist/cli/interactive/brokers.d.ts +31 -0
- package/dist/cli/interactive/brokers.d.ts.map +1 -0
- package/dist/cli/interactive/brokers.js +259 -0
- package/dist/cli/interactive/brokers.js.map +1 -0
- package/dist/cli/interactive/index.d.ts +8 -0
- package/dist/cli/interactive/index.d.ts.map +1 -0
- package/dist/cli/interactive/index.js +731 -0
- package/dist/cli/interactive/index.js.map +1 -0
- package/dist/cli/interactive/proxyQuestions.d.ts +15 -0
- package/dist/cli/interactive/proxyQuestions.d.ts.map +1 -0
- package/dist/cli/interactive/proxyQuestions.js +48 -0
- package/dist/cli/interactive/proxyQuestions.js.map +1 -0
- package/dist/cli/interactive/tabManager.d.ts +32 -0
- package/dist/cli/interactive/tabManager.d.ts.map +1 -0
- package/dist/cli/interactive/tabManager.js +244 -0
- package/dist/cli/interactive/tabManager.js.map +1 -0
- package/dist/cli/interactive/teamHint.d.ts +2 -0
- package/dist/cli/interactive/teamHint.d.ts.map +1 -0
- package/dist/cli/interactive/teamHint.js +14 -0
- package/dist/cli/interactive/teamHint.js.map +1 -0
- package/dist/cli/login.d.ts +13 -0
- package/dist/cli/login.d.ts.map +1 -0
- package/dist/cli/login.js +53 -0
- package/dist/cli/login.js.map +1 -0
- package/dist/cli/modes/demo.d.ts +12 -0
- package/dist/cli/modes/demo.d.ts.map +1 -0
- package/dist/cli/modes/demo.js +48 -0
- package/dist/cli/modes/demo.js.map +1 -0
- package/dist/cli/modes/doctor.d.ts +28 -0
- package/dist/cli/modes/doctor.d.ts.map +1 -0
- package/dist/cli/modes/doctor.js +79 -0
- package/dist/cli/modes/doctor.js.map +1 -0
- package/dist/cli/modes/login.d.ts +5 -0
- package/dist/cli/modes/login.d.ts.map +1 -0
- package/dist/cli/modes/login.js +40 -0
- package/dist/cli/modes/login.js.map +1 -0
- package/dist/cli/modes/mcpServe.d.ts +9 -0
- package/dist/cli/modes/mcpServe.d.ts.map +1 -0
- package/dist/cli/modes/mcpServe.js +112 -0
- package/dist/cli/modes/mcpServe.js.map +1 -0
- package/dist/cli/modes/orchestrator.d.ts +14 -0
- package/dist/cli/modes/orchestrator.d.ts.map +1 -0
- package/dist/cli/modes/orchestrator.js +64 -0
- package/dist/cli/modes/orchestrator.js.map +1 -0
- package/dist/cli/modes/team.d.ts +14 -0
- package/dist/cli/modes/team.d.ts.map +1 -0
- package/dist/cli/modes/team.js +87 -0
- package/dist/cli/modes/team.js.map +1 -0
- package/dist/cli/registry.d.ts +3 -0
- package/dist/cli/registry.d.ts.map +1 -0
- package/dist/cli/registry.js +15 -0
- package/dist/cli/registry.js.map +1 -0
- package/dist/cli/slash/core.d.ts +3 -0
- package/dist/cli/slash/core.d.ts.map +1 -0
- package/dist/cli/slash/core.js +509 -0
- package/dist/cli/slash/core.js.map +1 -0
- package/dist/cli/slash/index.d.ts +3 -0
- package/dist/cli/slash/index.d.ts.map +1 -0
- package/dist/cli/slash/index.js +28 -0
- package/dist/cli/slash/index.js.map +1 -0
- package/dist/cli/slash/modes.d.ts +3 -0
- package/dist/cli/slash/modes.d.ts.map +1 -0
- package/dist/cli/slash/modes.js +530 -0
- package/dist/cli/slash/modes.js.map +1 -0
- package/dist/cli/slash/session.d.ts +3 -0
- package/dist/cli/slash/session.d.ts.map +1 -0
- package/dist/cli/slash/session.js +376 -0
- package/dist/cli/slash/session.js.map +1 -0
- package/dist/cli/slash/shared.d.ts +43 -0
- package/dist/cli/slash/shared.d.ts.map +1 -0
- package/dist/cli/slash/shared.js +6 -0
- package/dist/cli/slash/shared.js.map +1 -0
- package/dist/cli/slash/tabs.d.ts +3 -0
- package/dist/cli/slash/tabs.d.ts.map +1 -0
- package/dist/cli/slash/tabs.js +497 -0
- package/dist/cli/slash/tabs.js.map +1 -0
- package/dist/cli/slash/team.d.ts +3 -0
- package/dist/cli/slash/team.d.ts.map +1 -0
- package/dist/cli/slash/team.js +85 -0
- package/dist/cli/slash/team.js.map +1 -0
- package/dist/cli/slash.d.ts +3 -0
- package/dist/cli/slash.d.ts.map +1 -0
- package/dist/cli/slash.js +8 -0
- package/dist/cli/slash.js.map +1 -0
- package/dist/cli/teamPipeline.d.ts +42 -0
- package/dist/cli/teamPipeline.d.ts.map +1 -0
- package/dist/cli/teamPipeline.js +406 -0
- package/dist/cli/teamPipeline.js.map +1 -0
- package/dist/cli/touchedFiles.d.ts +14 -0
- package/dist/cli/touchedFiles.d.ts.map +1 -0
- package/dist/cli/touchedFiles.js +66 -0
- package/dist/cli/touchedFiles.js.map +1 -0
- package/dist/cli/turn.d.ts +47 -0
- package/dist/cli/turn.d.ts.map +1 -0
- package/dist/cli/turn.js +626 -0
- package/dist/cli/turn.js.map +1 -0
- package/dist/cli/types.d.ts +47 -0
- package/dist/cli/types.d.ts.map +1 -0
- package/dist/cli/types.js +5 -0
- package/dist/cli/types.js.map +1 -0
- package/dist/cli/uiSession.d.ts +10 -0
- package/dist/cli/uiSession.d.ts.map +1 -0
- package/dist/cli/uiSession.js +66 -0
- package/dist/cli/uiSession.js.map +1 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +128 -0
- package/dist/cli.js.map +1 -0
- package/dist/core/adapter.d.ts +47 -0
- package/dist/core/adapter.d.ts.map +1 -0
- package/dist/core/adapter.js +48 -0
- package/dist/core/adapter.js.map +1 -0
- package/dist/core/adapters/anthropic.d.ts +35 -0
- package/dist/core/adapters/anthropic.d.ts.map +1 -0
- package/dist/core/adapters/anthropic.js +203 -0
- package/dist/core/adapters/anthropic.js.map +1 -0
- package/dist/core/adapters/claudeCli.d.ts +126 -0
- package/dist/core/adapters/claudeCli.d.ts.map +1 -0
- package/dist/core/adapters/claudeCli.js +584 -0
- package/dist/core/adapters/claudeCli.js.map +1 -0
- package/dist/core/adapters/cliAdapterBase.d.ts +48 -0
- package/dist/core/adapters/cliAdapterBase.d.ts.map +1 -0
- package/dist/core/adapters/cliAdapterBase.js +105 -0
- package/dist/core/adapters/cliAdapterBase.js.map +1 -0
- package/dist/core/adapters/cliStderr.d.ts +35 -0
- package/dist/core/adapters/cliStderr.d.ts.map +1 -0
- package/dist/core/adapters/cliStderr.js +87 -0
- package/dist/core/adapters/cliStderr.js.map +1 -0
- package/dist/core/adapters/codexCli.d.ts +113 -0
- package/dist/core/adapters/codexCli.d.ts.map +1 -0
- package/dist/core/adapters/codexCli.js +424 -0
- package/dist/core/adapters/codexCli.js.map +1 -0
- package/dist/core/adapters/gemini.d.ts +17 -0
- package/dist/core/adapters/gemini.d.ts.map +1 -0
- package/dist/core/adapters/gemini.js +133 -0
- package/dist/core/adapters/gemini.js.map +1 -0
- package/dist/core/adapters/geminiCli.d.ts +91 -0
- package/dist/core/adapters/geminiCli.d.ts.map +1 -0
- package/dist/core/adapters/geminiCli.js +276 -0
- package/dist/core/adapters/geminiCli.js.map +1 -0
- package/dist/core/adapters/nudges.d.ts +21 -0
- package/dist/core/adapters/nudges.d.ts.map +1 -0
- package/dist/core/adapters/nudges.js +75 -0
- package/dist/core/adapters/nudges.js.map +1 -0
- package/dist/core/adapters/openai.d.ts +17 -0
- package/dist/core/adapters/openai.d.ts.map +1 -0
- package/dist/core/adapters/openai.js +138 -0
- package/dist/core/adapters/openai.js.map +1 -0
- package/dist/core/adapters/parseFailures.d.ts +10 -0
- package/dist/core/adapters/parseFailures.d.ts.map +1 -0
- package/dist/core/adapters/parseFailures.js +35 -0
- package/dist/core/adapters/parseFailures.js.map +1 -0
- package/dist/core/adapters/utils.d.ts +11 -0
- package/dist/core/adapters/utils.d.ts.map +1 -0
- package/dist/core/adapters/utils.js +33 -0
- package/dist/core/adapters/utils.js.map +1 -0
- package/dist/core/askBroker.d.ts +11 -0
- package/dist/core/askBroker.d.ts.map +1 -0
- package/dist/core/askBroker.js +78 -0
- package/dist/core/askBroker.js.map +1 -0
- package/dist/core/atomicWrite.d.ts +5 -0
- package/dist/core/atomicWrite.d.ts.map +1 -0
- package/dist/core/atomicWrite.js +18 -0
- package/dist/core/atomicWrite.js.map +1 -0
- package/dist/core/brokers/askBroker.d.ts +11 -0
- package/dist/core/brokers/askBroker.d.ts.map +1 -0
- package/dist/core/brokers/askBroker.js +78 -0
- package/dist/core/brokers/askBroker.js.map +1 -0
- package/dist/core/brokers/permissionBroker.d.ts +7 -0
- package/dist/core/brokers/permissionBroker.d.ts.map +1 -0
- package/dist/core/brokers/permissionBroker.js +63 -0
- package/dist/core/brokers/permissionBroker.js.map +1 -0
- package/dist/core/brokers/socketBroker.d.ts +35 -0
- package/dist/core/brokers/socketBroker.d.ts.map +1 -0
- package/dist/core/brokers/socketBroker.js +74 -0
- package/dist/core/brokers/socketBroker.js.map +1 -0
- package/dist/core/clipboard.d.ts +4 -0
- package/dist/core/clipboard.d.ts.map +1 -0
- package/dist/core/clipboard.js +46 -0
- package/dist/core/clipboard.js.map +1 -0
- package/dist/core/compactor.d.ts +32 -0
- package/dist/core/compactor.d.ts.map +1 -0
- package/dist/core/compactor.js +91 -0
- package/dist/core/compactor.js.map +1 -0
- package/dist/core/consensusEngine.d.ts +21 -0
- package/dist/core/consensusEngine.d.ts.map +1 -0
- package/dist/core/consensusEngine.js +116 -0
- package/dist/core/consensusEngine.js.map +1 -0
- package/dist/core/context/contextCompressor.d.ts +10 -0
- package/dist/core/context/contextCompressor.d.ts.map +1 -0
- package/dist/core/context/contextCompressor.js +54 -0
- package/dist/core/context/contextCompressor.js.map +1 -0
- package/dist/core/context/contextWindows.d.ts +25 -0
- package/dist/core/context/contextWindows.d.ts.map +1 -0
- package/dist/core/context/contextWindows.js +101 -0
- package/dist/core/context/contextWindows.js.map +1 -0
- package/dist/core/context/summarizer.d.ts +65 -0
- package/dist/core/context/summarizer.d.ts.map +1 -0
- package/dist/core/context/summarizer.js +184 -0
- package/dist/core/context/summarizer.js.map +1 -0
- package/dist/core/context/usageCache.d.ts +19 -0
- package/dist/core/context/usageCache.d.ts.map +1 -0
- package/dist/core/context/usageCache.js +157 -0
- package/dist/core/context/usageCache.js.map +1 -0
- package/dist/core/context/usageWindow.d.ts +19 -0
- package/dist/core/context/usageWindow.d.ts.map +1 -0
- package/dist/core/context/usageWindow.js +73 -0
- package/dist/core/context/usageWindow.js.map +1 -0
- package/dist/core/contextCompressor.d.ts +10 -0
- package/dist/core/contextCompressor.d.ts.map +1 -0
- package/dist/core/contextCompressor.js +54 -0
- package/dist/core/contextCompressor.js.map +1 -0
- package/dist/core/contextWindows.d.ts +5 -0
- package/dist/core/contextWindows.d.ts.map +1 -0
- package/dist/core/contextWindows.js +60 -0
- package/dist/core/contextWindows.js.map +1 -0
- package/dist/core/continuum/digest.d.ts +35 -0
- package/dist/core/continuum/digest.d.ts.map +1 -0
- package/dist/core/continuum/digest.js +91 -0
- package/dist/core/continuum/digest.js.map +1 -0
- package/dist/core/continuum/index.d.ts +6 -0
- package/dist/core/continuum/index.d.ts.map +1 -0
- package/dist/core/continuum/index.js +7 -0
- package/dist/core/continuum/index.js.map +1 -0
- package/dist/core/continuum/inject.d.ts +9 -0
- package/dist/core/continuum/inject.d.ts.map +1 -0
- package/dist/core/continuum/inject.js +78 -0
- package/dist/core/continuum/inject.js.map +1 -0
- package/dist/core/continuum/projectId.d.ts +10 -0
- package/dist/core/continuum/projectId.d.ts.map +1 -0
- package/dist/core/continuum/projectId.js +60 -0
- package/dist/core/continuum/projectId.js.map +1 -0
- package/dist/core/continuum/store.d.ts +24 -0
- package/dist/core/continuum/store.d.ts.map +1 -0
- package/dist/core/continuum/store.js +144 -0
- package/dist/core/continuum/store.js.map +1 -0
- package/dist/core/continuum/types.d.ts +87 -0
- package/dist/core/continuum/types.d.ts.map +1 -0
- package/dist/core/continuum/types.js +9 -0
- package/dist/core/continuum/types.js.map +1 -0
- package/dist/core/dag.d.ts +21 -0
- package/dist/core/dag.d.ts.map +1 -0
- package/dist/core/dag.js +71 -0
- package/dist/core/dag.js.map +1 -0
- package/dist/core/director.d.ts +11 -0
- package/dist/core/director.d.ts.map +1 -0
- package/dist/core/director.js +37 -0
- package/dist/core/director.js.map +1 -0
- package/dist/core/hookedToolBroker.d.ts +25 -0
- package/dist/core/hookedToolBroker.d.ts.map +1 -0
- package/dist/core/hookedToolBroker.js +95 -0
- package/dist/core/hookedToolBroker.js.map +1 -0
- package/dist/core/langHint.d.ts +9 -0
- package/dist/core/langHint.d.ts.map +1 -0
- package/dist/core/langHint.js +33 -0
- package/dist/core/langHint.js.map +1 -0
- package/dist/core/mcp/mcpClient.d.ts +42 -0
- package/dist/core/mcp/mcpClient.d.ts.map +1 -0
- package/dist/core/mcp/mcpClient.js +134 -0
- package/dist/core/mcp/mcpClient.js.map +1 -0
- package/dist/core/mcp/mcpConfig.d.ts +58 -0
- package/dist/core/mcp/mcpConfig.d.ts.map +1 -0
- package/dist/core/mcp/mcpConfig.js +148 -0
- package/dist/core/mcp/mcpConfig.js.map +1 -0
- package/dist/core/mcp/mcpManager.d.ts +31 -0
- package/dist/core/mcp/mcpManager.d.ts.map +1 -0
- package/dist/core/mcp/mcpManager.js +83 -0
- package/dist/core/mcp/mcpManager.js.map +1 -0
- package/dist/core/mcpClient.d.ts +42 -0
- package/dist/core/mcpClient.d.ts.map +1 -0
- package/dist/core/mcpClient.js +134 -0
- package/dist/core/mcpClient.js.map +1 -0
- package/dist/core/mcpConfig.d.ts +24 -0
- package/dist/core/mcpConfig.d.ts.map +1 -0
- package/dist/core/mcpConfig.js +74 -0
- package/dist/core/mcpConfig.js.map +1 -0
- package/dist/core/mcpManager.d.ts +31 -0
- package/dist/core/mcpManager.d.ts.map +1 -0
- package/dist/core/mcpManager.js +83 -0
- package/dist/core/mcpManager.js.map +1 -0
- package/dist/core/memory.d.ts +22 -0
- package/dist/core/memory.d.ts.map +1 -0
- package/dist/core/memory.js +102 -0
- package/dist/core/memory.js.map +1 -0
- package/dist/core/omgToolManifest.d.ts +34 -0
- package/dist/core/omgToolManifest.d.ts.map +1 -0
- package/dist/core/omgToolManifest.js +59 -0
- package/dist/core/omgToolManifest.js.map +1 -0
- package/dist/core/orchestration/consensusEngine.d.ts +21 -0
- package/dist/core/orchestration/consensusEngine.d.ts.map +1 -0
- package/dist/core/orchestration/consensusEngine.js +116 -0
- package/dist/core/orchestration/consensusEngine.js.map +1 -0
- package/dist/core/orchestration/dag.d.ts +21 -0
- package/dist/core/orchestration/dag.d.ts.map +1 -0
- package/dist/core/orchestration/dag.js +71 -0
- package/dist/core/orchestration/dag.js.map +1 -0
- package/dist/core/orchestration/director.d.ts +11 -0
- package/dist/core/orchestration/director.d.ts.map +1 -0
- package/dist/core/orchestration/director.js +37 -0
- package/dist/core/orchestration/director.js.map +1 -0
- package/dist/core/orchestration/orchestrator.d.ts +32 -0
- package/dist/core/orchestration/orchestrator.d.ts.map +1 -0
- package/dist/core/orchestration/orchestrator.js +214 -0
- package/dist/core/orchestration/orchestrator.js.map +1 -0
- package/dist/core/orchestration/roleRouter.d.ts +28 -0
- package/dist/core/orchestration/roleRouter.d.ts.map +1 -0
- package/dist/core/orchestration/roleRouter.js +64 -0
- package/dist/core/orchestration/roleRouter.js.map +1 -0
- package/dist/core/orchestration/teamRunner.d.ts +69 -0
- package/dist/core/orchestration/teamRunner.d.ts.map +1 -0
- package/dist/core/orchestration/teamRunner.js +477 -0
- package/dist/core/orchestration/teamRunner.js.map +1 -0
- package/dist/core/orchestration/types.d.ts +115 -0
- package/dist/core/orchestration/types.d.ts.map +1 -0
- package/dist/core/orchestration/types.js +71 -0
- package/dist/core/orchestration/types.js.map +1 -0
- package/dist/core/orchestrator.d.ts +32 -0
- package/dist/core/orchestrator.d.ts.map +1 -0
- package/dist/core/orchestrator.js +214 -0
- package/dist/core/orchestrator.js.map +1 -0
- package/dist/core/permissionBroker.d.ts +7 -0
- package/dist/core/permissionBroker.d.ts.map +1 -0
- package/dist/core/permissionBroker.js +63 -0
- package/dist/core/permissionBroker.js.map +1 -0
- package/dist/core/planConfig.d.ts +15 -0
- package/dist/core/planConfig.d.ts.map +1 -0
- package/dist/core/planConfig.js +98 -0
- package/dist/core/planConfig.js.map +1 -0
- package/dist/core/presetPersistence.d.ts +4 -0
- package/dist/core/presetPersistence.d.ts.map +1 -0
- package/dist/core/presetPersistence.js +64 -0
- package/dist/core/presetPersistence.js.map +1 -0
- package/dist/core/roleRouter.d.ts +26 -0
- package/dist/core/roleRouter.d.ts.map +1 -0
- package/dist/core/roleRouter.js +62 -0
- package/dist/core/roleRouter.js.map +1 -0
- package/dist/core/sessionList.d.ts +26 -0
- package/dist/core/sessionList.d.ts.map +1 -0
- package/dist/core/sessionList.js +278 -0
- package/dist/core/sessionList.js.map +1 -0
- package/dist/core/slugify.d.ts +2 -0
- package/dist/core/slugify.d.ts.map +1 -0
- package/dist/core/slugify.js +17 -0
- package/dist/core/slugify.js.map +1 -0
- package/dist/core/socketBroker.d.ts +19 -0
- package/dist/core/socketBroker.d.ts.map +1 -0
- package/dist/core/socketBroker.js +48 -0
- package/dist/core/socketBroker.js.map +1 -0
- package/dist/core/state/agentsMdScaffold.d.ts +15 -0
- package/dist/core/state/agentsMdScaffold.d.ts.map +1 -0
- package/dist/core/state/agentsMdScaffold.js +118 -0
- package/dist/core/state/agentsMdScaffold.js.map +1 -0
- package/dist/core/state/atomicWrite.d.ts +5 -0
- package/dist/core/state/atomicWrite.d.ts.map +1 -0
- package/dist/core/state/atomicWrite.js +18 -0
- package/dist/core/state/atomicWrite.js.map +1 -0
- package/dist/core/state/handoff.d.ts +20 -0
- package/dist/core/state/handoff.d.ts.map +1 -0
- package/dist/core/state/handoff.js +71 -0
- package/dist/core/state/handoff.js.map +1 -0
- package/dist/core/state/mcpCatalog.d.ts +11 -0
- package/dist/core/state/mcpCatalog.d.ts.map +1 -0
- package/dist/core/state/mcpCatalog.js +51 -0
- package/dist/core/state/mcpCatalog.js.map +1 -0
- package/dist/core/state/mcpRecommendations.d.ts +7 -0
- package/dist/core/state/mcpRecommendations.d.ts.map +1 -0
- package/dist/core/state/mcpRecommendations.js +57 -0
- package/dist/core/state/mcpRecommendations.js.map +1 -0
- package/dist/core/state/memory.d.ts +22 -0
- package/dist/core/state/memory.d.ts.map +1 -0
- package/dist/core/state/memory.js +102 -0
- package/dist/core/state/memory.js.map +1 -0
- package/dist/core/state/planConfig.d.ts +15 -0
- package/dist/core/state/planConfig.d.ts.map +1 -0
- package/dist/core/state/planConfig.js +98 -0
- package/dist/core/state/planConfig.js.map +1 -0
- package/dist/core/state/presetPersistence.d.ts +4 -0
- package/dist/core/state/presetPersistence.d.ts.map +1 -0
- package/dist/core/state/presetPersistence.js +67 -0
- package/dist/core/state/presetPersistence.js.map +1 -0
- package/dist/core/state/sessionList.d.ts +26 -0
- package/dist/core/state/sessionList.d.ts.map +1 -0
- package/dist/core/state/sessionList.js +278 -0
- package/dist/core/state/sessionList.js.map +1 -0
- package/dist/core/state/stackDetect.d.ts +8 -0
- package/dist/core/state/stackDetect.d.ts.map +1 -0
- package/dist/core/state/stackDetect.js +40 -0
- package/dist/core/state/stackDetect.js.map +1 -0
- package/dist/core/state/tabPersistence.d.ts +29 -0
- package/dist/core/state/tabPersistence.d.ts.map +1 -0
- package/dist/core/state/tabPersistence.js +65 -0
- package/dist/core/state/tabPersistence.js.map +1 -0
- package/dist/core/tabPersistence.d.ts +29 -0
- package/dist/core/tabPersistence.d.ts.map +1 -0
- package/dist/core/tabPersistence.js +65 -0
- package/dist/core/tabPersistence.js.map +1 -0
- package/dist/core/teamRunner.d.ts +42 -0
- package/dist/core/teamRunner.d.ts.map +1 -0
- package/dist/core/teamRunner.js +248 -0
- package/dist/core/teamRunner.js.map +1 -0
- package/dist/core/toolGate.d.ts +23 -0
- package/dist/core/toolGate.d.ts.map +1 -0
- package/dist/core/toolGate.js +51 -0
- package/dist/core/toolGate.js.map +1 -0
- package/dist/core/toolInterceptor.d.ts +7 -0
- package/dist/core/toolInterceptor.d.ts.map +1 -0
- package/dist/core/toolInterceptor.js +108 -0
- package/dist/core/toolInterceptor.js.map +1 -0
- package/dist/core/tools/hookedToolBroker.d.ts +25 -0
- package/dist/core/tools/hookedToolBroker.d.ts.map +1 -0
- package/dist/core/tools/hookedToolBroker.js +95 -0
- package/dist/core/tools/hookedToolBroker.js.map +1 -0
- package/dist/core/tools/omgToolManifest.d.ts +42 -0
- package/dist/core/tools/omgToolManifest.d.ts.map +1 -0
- package/dist/core/tools/omgToolManifest.js +66 -0
- package/dist/core/tools/omgToolManifest.js.map +1 -0
- package/dist/core/tools/toolGate.d.ts +23 -0
- package/dist/core/tools/toolGate.d.ts.map +1 -0
- package/dist/core/tools/toolGate.js +51 -0
- package/dist/core/tools/toolGate.js.map +1 -0
- package/dist/core/tools/toolInterceptor.d.ts +7 -0
- package/dist/core/tools/toolInterceptor.d.ts.map +1 -0
- package/dist/core/tools/toolInterceptor.js +108 -0
- package/dist/core/tools/toolInterceptor.js.map +1 -0
- package/dist/core/tools/tools.d.ts +34 -0
- package/dist/core/tools/tools.d.ts.map +1 -0
- package/dist/core/tools/tools.js +328 -0
- package/dist/core/tools/tools.js.map +1 -0
- package/dist/core/tools.d.ts +34 -0
- package/dist/core/tools.d.ts.map +1 -0
- package/dist/core/tools.js +300 -0
- package/dist/core/tools.js.map +1 -0
- package/dist/core/types.d.ts +107 -0
- package/dist/core/types.d.ts.map +1 -0
- package/dist/core/types.js +55 -0
- package/dist/core/types.js.map +1 -0
- package/dist/core/usageCache.d.ts +19 -0
- package/dist/core/usageCache.d.ts.map +1 -0
- package/dist/core/usageCache.js +157 -0
- package/dist/core/usageCache.js.map +1 -0
- package/dist/core/usageWindow.d.ts +19 -0
- package/dist/core/usageWindow.d.ts.map +1 -0
- package/dist/core/usageWindow.js +73 -0
- package/dist/core/usageWindow.js.map +1 -0
- package/dist/core/util/bgProtocol.d.ts +5 -0
- package/dist/core/util/bgProtocol.d.ts.map +1 -0
- package/dist/core/util/bgProtocol.js +20 -0
- package/dist/core/util/bgProtocol.js.map +1 -0
- package/dist/core/util/clipboard.d.ts +4 -0
- package/dist/core/util/clipboard.d.ts.map +1 -0
- package/dist/core/util/clipboard.js +46 -0
- package/dist/core/util/clipboard.js.map +1 -0
- package/dist/core/util/clipboardImage.d.ts +3 -0
- package/dist/core/util/clipboardImage.d.ts.map +1 -0
- package/dist/core/util/clipboardImage.js +58 -0
- package/dist/core/util/clipboardImage.js.map +1 -0
- package/dist/core/util/langHint.d.ts +9 -0
- package/dist/core/util/langHint.d.ts.map +1 -0
- package/dist/core/util/langHint.js +33 -0
- package/dist/core/util/langHint.js.map +1 -0
- package/dist/core/util/slugify.d.ts +2 -0
- package/dist/core/util/slugify.d.ts.map +1 -0
- package/dist/core/util/slugify.js +28 -0
- package/dist/core/util/slugify.js.map +1 -0
- package/dist/hooks/hookedToolProxy.mjs +118 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -0
- package/dist/ipc/dispatcher.d.ts +21 -0
- package/dist/ipc/dispatcher.d.ts.map +1 -0
- package/dist/ipc/dispatcher.js +160 -0
- package/dist/ipc/dispatcher.js.map +1 -0
- package/dist/ipc/events.d.ts +33 -0
- package/dist/ipc/events.d.ts.map +1 -0
- package/dist/ipc/events.js +42 -0
- package/dist/ipc/events.js.map +1 -0
- package/dist/ipc/rpc.d.ts +31 -0
- package/dist/ipc/rpc.d.ts.map +1 -0
- package/dist/ipc/rpc.js +110 -0
- package/dist/ipc/rpc.js.map +1 -0
- package/dist/ipc/stdio.d.ts +11 -0
- package/dist/ipc/stdio.d.ts.map +1 -0
- package/dist/ipc/stdio.js +52 -0
- package/dist/ipc/stdio.js.map +1 -0
- package/dist/mcp/askClient.d.ts +9 -0
- package/dist/mcp/askClient.d.ts.map +1 -0
- package/dist/mcp/askClient.js +70 -0
- package/dist/mcp/askClient.js.map +1 -0
- package/dist/mcp/constants.d.ts +6 -0
- package/dist/mcp/constants.d.ts.map +1 -0
- package/dist/mcp/constants.js +8 -0
- package/dist/mcp/constants.js.map +1 -0
- package/dist/mcp/permissionClient.d.ts +5 -0
- package/dist/mcp/permissionClient.d.ts.map +1 -0
- package/dist/mcp/permissionClient.js +71 -0
- package/dist/mcp/permissionClient.js.map +1 -0
- package/dist/mcp/schemas.d.ts +9 -0
- package/dist/mcp/schemas.d.ts.map +1 -0
- package/dist/mcp/schemas.js +121 -0
- package/dist/mcp/schemas.js.map +1 -0
- package/dist/mcp/server.d.ts +41 -0
- package/dist/mcp/server.d.ts.map +1 -0
- package/dist/mcp/server.js +204 -0
- package/dist/mcp/server.js.map +1 -0
- package/dist/policy/loader.d.ts +27 -0
- package/dist/policy/loader.d.ts.map +1 -0
- package/dist/policy/loader.js +89 -0
- package/dist/policy/loader.js.map +1 -0
- package/dist/policy/team-claude-only.yaml +46 -0
- package/dist/policy/team-codex-only.yaml +46 -0
- package/dist/policy/team-codex.yaml +54 -0
- package/dist/policy/team.yaml +104 -0
- package/dist/toolhook/hookedToolProxy.mjs +118 -0
- package/dist/ui/components/App.d.ts +14 -0
- package/dist/ui/components/App.d.ts.map +1 -0
- package/dist/ui/components/App.js +803 -0
- package/dist/ui/components/App.js.map +1 -0
- package/dist/ui/components/AskPicker.d.ts +8 -0
- package/dist/ui/components/AskPicker.d.ts.map +1 -0
- package/dist/ui/components/AskPicker.js +202 -0
- package/dist/ui/components/AskPicker.js.map +1 -0
- package/dist/ui/components/CommandInput.d.ts +63 -0
- package/dist/ui/components/CommandInput.d.ts.map +1 -0
- package/dist/ui/components/CommandInput.js +994 -0
- package/dist/ui/components/CommandInput.js.map +1 -0
- package/dist/ui/components/DiffView.d.ts +19 -0
- package/dist/ui/components/DiffView.d.ts.map +1 -0
- package/dist/ui/components/DiffView.js +93 -0
- package/dist/ui/components/DiffView.js.map +1 -0
- package/dist/ui/components/Dock.d.ts +49 -0
- package/dist/ui/components/Dock.d.ts.map +1 -0
- package/dist/ui/components/Dock.js +52 -0
- package/dist/ui/components/Dock.js.map +1 -0
- package/dist/ui/components/EventLog.d.ts +42 -0
- package/dist/ui/components/EventLog.d.ts.map +1 -0
- package/dist/ui/components/EventLog.js +450 -0
- package/dist/ui/components/EventLog.js.map +1 -0
- package/dist/ui/components/FileSuggest.d.ts +8 -0
- package/dist/ui/components/FileSuggest.d.ts.map +1 -0
- package/dist/ui/components/FileSuggest.js +19 -0
- package/dist/ui/components/FileSuggest.js.map +1 -0
- package/dist/ui/components/HRule.d.ts +27 -0
- package/dist/ui/components/HRule.d.ts.map +1 -0
- package/dist/ui/components/HRule.js +75 -0
- package/dist/ui/components/HRule.js.map +1 -0
- package/dist/ui/components/HintBar.d.ts +2 -0
- package/dist/ui/components/HintBar.d.ts.map +1 -0
- package/dist/ui/components/HintBar.js +19 -0
- package/dist/ui/components/HintBar.js.map +1 -0
- package/dist/ui/components/MarkdownText.d.ts +13 -0
- package/dist/ui/components/MarkdownText.d.ts.map +1 -0
- package/dist/ui/components/MarkdownText.js +255 -0
- package/dist/ui/components/MarkdownText.js.map +1 -0
- package/dist/ui/components/PermissionPrompt.d.ts +8 -0
- package/dist/ui/components/PermissionPrompt.d.ts.map +1 -0
- package/dist/ui/components/PermissionPrompt.js +37 -0
- package/dist/ui/components/PermissionPrompt.js.map +1 -0
- package/dist/ui/components/SessionPicker.d.ts +16 -0
- package/dist/ui/components/SessionPicker.d.ts.map +1 -0
- package/dist/ui/components/SessionPicker.js +116 -0
- package/dist/ui/components/SessionPicker.js.map +1 -0
- package/dist/ui/components/SlashPalette.d.ts +8 -0
- package/dist/ui/components/SlashPalette.d.ts.map +1 -0
- package/dist/ui/components/SlashPalette.js +41 -0
- package/dist/ui/components/SlashPalette.js.map +1 -0
- package/dist/ui/components/Spinner.d.ts +37 -0
- package/dist/ui/components/Spinner.d.ts.map +1 -0
- package/dist/ui/components/Spinner.js +139 -0
- package/dist/ui/components/Spinner.js.map +1 -0
- package/dist/ui/components/StatusBar.d.ts +92 -0
- package/dist/ui/components/StatusBar.d.ts.map +1 -0
- package/dist/ui/components/StatusBar.js +268 -0
- package/dist/ui/components/StatusBar.js.map +1 -0
- package/dist/ui/components/TabChip.d.ts +11 -0
- package/dist/ui/components/TabChip.d.ts.map +1 -0
- package/dist/ui/components/TabChip.js +23 -0
- package/dist/ui/components/TabChip.js.map +1 -0
- package/dist/ui/components/TeamIndicator.d.ts +6 -0
- package/dist/ui/components/TeamIndicator.d.ts.map +1 -0
- package/dist/ui/components/TeamIndicator.js +17 -0
- package/dist/ui/components/TeamIndicator.js.map +1 -0
- package/dist/ui/components/TeamStatusPanel.d.ts +14 -0
- package/dist/ui/components/TeamStatusPanel.d.ts.map +1 -0
- package/dist/ui/components/TeamStatusPanel.js +65 -0
- package/dist/ui/components/TeamStatusPanel.js.map +1 -0
- package/dist/ui/components/ThinkingBlock.d.ts +10 -0
- package/dist/ui/components/ThinkingBlock.d.ts.map +1 -0
- package/dist/ui/components/ThinkingBlock.js +21 -0
- package/dist/ui/components/ThinkingBlock.js.map +1 -0
- package/dist/ui/components/TodoIndicator.d.ts +11 -0
- package/dist/ui/components/TodoIndicator.d.ts.map +1 -0
- package/dist/ui/components/TodoIndicator.js +37 -0
- package/dist/ui/components/TodoIndicator.js.map +1 -0
- package/dist/ui/components/ToolCallCard.d.ts +16 -0
- package/dist/ui/components/ToolCallCard.d.ts.map +1 -0
- package/dist/ui/components/ToolCallCard.js +195 -0
- package/dist/ui/components/ToolCallCard.js.map +1 -0
- package/dist/ui/components/Welcome.d.ts +8 -0
- package/dist/ui/components/Welcome.d.ts.map +1 -0
- package/dist/ui/components/Welcome.js +53 -0
- package/dist/ui/components/Welcome.js.map +1 -0
- package/dist/ui/cursorState.d.ts +29 -0
- package/dist/ui/cursorState.d.ts.map +1 -0
- package/dist/ui/cursorState.js +49 -0
- package/dist/ui/cursorState.js.map +1 -0
- package/dist/ui/diff.d.ts +34 -0
- package/dist/ui/diff.d.ts.map +1 -0
- package/dist/ui/diff.js +184 -0
- package/dist/ui/diff.js.map +1 -0
- package/dist/ui/diffLang.d.ts +2 -0
- package/dist/ui/diffLang.d.ts.map +1 -0
- package/dist/ui/diffLang.js +36 -0
- package/dist/ui/diffLang.js.map +1 -0
- package/dist/ui/emoji.d.ts +4 -0
- package/dist/ui/emoji.d.ts.map +1 -0
- package/dist/ui/emoji.js +73 -0
- package/dist/ui/emoji.js.map +1 -0
- package/dist/ui/fileMentions.d.ts +41 -0
- package/dist/ui/fileMentions.d.ts.map +1 -0
- package/dist/ui/fileMentions.js +135 -0
- package/dist/ui/fileMentions.js.map +1 -0
- package/dist/ui/hooks/useLineEditor.d.ts +44 -0
- package/dist/ui/hooks/useLineEditor.d.ts.map +1 -0
- package/dist/ui/hooks/useLineEditor.js +142 -0
- package/dist/ui/hooks/useLineEditor.js.map +1 -0
- package/dist/ui/inputHistory.d.ts +8 -0
- package/dist/ui/inputHistory.d.ts.map +1 -0
- package/dist/ui/inputHistory.js +56 -0
- package/dist/ui/inputHistory.js.map +1 -0
- package/dist/ui/jsonrpc.d.ts +17 -0
- package/dist/ui/jsonrpc.d.ts.map +1 -0
- package/dist/ui/jsonrpc.js +41 -0
- package/dist/ui/jsonrpc.js.map +1 -0
- package/dist/ui/launcher.d.ts +20 -0
- package/dist/ui/launcher.d.ts.map +1 -0
- package/dist/ui/launcher.js +185 -0
- package/dist/ui/launcher.js.map +1 -0
- package/dist/ui/markdown.d.ts +104 -0
- package/dist/ui/markdown.d.ts.map +1 -0
- package/dist/ui/markdown.js +449 -0
- package/dist/ui/markdown.js.map +1 -0
- package/dist/ui/mouse.d.ts +22 -0
- package/dist/ui/mouse.d.ts.map +1 -0
- package/dist/ui/mouse.js +31 -0
- package/dist/ui/mouse.js.map +1 -0
- package/dist/ui/outbound.d.ts +20 -0
- package/dist/ui/outbound.d.ts.map +1 -0
- package/dist/ui/outbound.js +49 -0
- package/dist/ui/outbound.js.map +1 -0
- package/dist/ui/screenMode.d.ts +25 -0
- package/dist/ui/screenMode.d.ts.map +1 -0
- package/dist/ui/screenMode.js +43 -0
- package/dist/ui/screenMode.js.map +1 -0
- package/dist/ui/slashCatalog.d.ts +18 -0
- package/dist/ui/slashCatalog.d.ts.map +1 -0
- package/dist/ui/slashCatalog.js +243 -0
- package/dist/ui/slashCatalog.js.map +1 -0
- package/dist/ui/syntax.d.ts +11 -0
- package/dist/ui/syntax.d.ts.map +1 -0
- package/dist/ui/syntax.js +78 -0
- package/dist/ui/syntax.js.map +1 -0
- package/dist/ui/theme.d.ts +165 -0
- package/dist/ui/theme.d.ts.map +1 -0
- package/dist/ui/theme.js +394 -0
- package/dist/ui/theme.js.map +1 -0
- package/dist/ui/types.d.ts +203 -0
- package/dist/ui/types.d.ts.map +1 -0
- package/dist/ui/types.js +53 -0
- package/dist/ui/types.js.map +1 -0
- package/package.json +104 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TeamIndicator.js","sourceRoot":"","sources":["../../../src/ui/components/TeamIndicator.tsx"],"names":[],"mappings":";AAAA,oCAAoC;AACpC,EAAE;AACF,qEAAqE;AACrE,wEAAwE;AACxE,qEAAqE;AACrE,oEAAoE;AACpE,oEAAoE;AACpE,uCAAuC;AAEvC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAMpC,MAAM,UAAU,aAAa,CAAC,EAAE,KAAK,EAAS;IAC5C,IAAI,CAAC,KAAK;QAAE,OAAO,IAAI,CAAC;IACxB,OAAO,CACL,MAAC,GAAG,eACF,KAAC,IAAI,IAAC,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,QAAQ,YAAG,aAAa,GAAQ,EAC1D,KAAC,IAAI,IAAC,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,UAAU,YAAG,KAAK,GAAQ,EACpD,KAAC,IAAI,IAAC,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,KAAK,+BAAkB,IAC3C,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface RoleStatus {
|
|
2
|
+
role: string;
|
|
3
|
+
status: "running" | "done" | "error";
|
|
4
|
+
elapsedMs?: number;
|
|
5
|
+
/** Phase 173: provider/model the role runs on (from team.yaml). */
|
|
6
|
+
provider?: string;
|
|
7
|
+
model?: string;
|
|
8
|
+
}
|
|
9
|
+
interface Props {
|
|
10
|
+
roles: readonly RoleStatus[];
|
|
11
|
+
}
|
|
12
|
+
export declare function TeamStatusPanel({ roles }: Props): import("react/jsx-runtime").JSX.Element | null;
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=TeamStatusPanel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TeamStatusPanel.d.ts","sourceRoot":"","sources":["../../../src/ui/components/TeamStatusPanel.tsx"],"names":[],"mappings":"AAcA,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,SAAS,GAAG,MAAM,GAAG,OAAO,CAAC;IACrC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mEAAmE;IACnE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAQD,UAAU,KAAK;IACb,KAAK,EAAE,SAAS,UAAU,EAAE,CAAC;CAC9B;AAOD,wBAAgB,eAAe,CAAC,EAAE,KAAK,EAAE,EAAE,KAAK,kDAkE/C"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
// Phase 142: live multi-agent status panel.
|
|
3
|
+
//
|
|
4
|
+
// While a /team pipeline runs, the backend emits per-role lifecycle
|
|
5
|
+
// (running / done / error) on the live writer — so parallel reviewers
|
|
6
|
+
// surface individually even though their text output is buffered. App
|
|
7
|
+
// threads the list into status.teamRoles; this panel renders one row
|
|
8
|
+
// per role with an animated spinner while running and a ✓ / ✗ when it
|
|
9
|
+
// settles, plus elapsed time. Inspired by the parallel-task displays in
|
|
10
|
+
// claude-code / codex / rich.live TUIs.
|
|
11
|
+
import { useEffect, useState } from "react";
|
|
12
|
+
import { Box, Text, useStdout } from "ink";
|
|
13
|
+
import { theme } from "../theme.js";
|
|
14
|
+
/** "claude-cli·opus", or just one side when the other is missing. */
|
|
15
|
+
function llmLabel(r) {
|
|
16
|
+
if (r.provider && r.model)
|
|
17
|
+
return `${r.provider}·${r.model}`;
|
|
18
|
+
return r.model ?? r.provider ?? "";
|
|
19
|
+
}
|
|
20
|
+
function fmtElapsed(ms) {
|
|
21
|
+
const s = ms / 1000;
|
|
22
|
+
return s < 10 ? `${s.toFixed(1)}s` : `${Math.round(s)}s`;
|
|
23
|
+
}
|
|
24
|
+
export function TeamStatusPanel({ roles }) {
|
|
25
|
+
const [frame, setFrame] = useState(0);
|
|
26
|
+
const { stdout } = useStdout();
|
|
27
|
+
const anyRunning = roles.some((r) => r.status === "running");
|
|
28
|
+
useEffect(() => {
|
|
29
|
+
if (!anyRunning)
|
|
30
|
+
return;
|
|
31
|
+
const t = setInterval(() => setFrame((f) => (f + 1) % theme.spinner.frames.length), theme.spinner.intervalMs);
|
|
32
|
+
return () => clearInterval(t);
|
|
33
|
+
}, [anyRunning]);
|
|
34
|
+
if (roles.length === 0)
|
|
35
|
+
return null;
|
|
36
|
+
const spin = theme.spinner.frames[frame];
|
|
37
|
+
// Phase 173: column-align role + provider·model so the status lines
|
|
38
|
+
// up. On a narrow terminal drop the model column to avoid wrapping.
|
|
39
|
+
const cols = stdout?.columns ?? 80;
|
|
40
|
+
const showLlm = cols >= 56 && roles.some((r) => llmLabel(r));
|
|
41
|
+
const roleWidth = Math.max(...roles.map((r) => r.role.length));
|
|
42
|
+
const llmWidth = showLlm
|
|
43
|
+
? Math.max(...roles.map((r) => llmLabel(r).length))
|
|
44
|
+
: 0;
|
|
45
|
+
return (_jsx(Box, { flexDirection: "column", children: roles.map((r, i) => {
|
|
46
|
+
const glyph = r.status === "running" ? spin : r.status === "done" ? "✓" : "✗";
|
|
47
|
+
const glyphColor = r.status === "running"
|
|
48
|
+
? theme.spinner.color
|
|
49
|
+
: r.status === "done"
|
|
50
|
+
? "green"
|
|
51
|
+
: "red";
|
|
52
|
+
// Phase 195: per-role color in the role label itself. Each
|
|
53
|
+
// function (implementer, reviewer, security, …) gets a hue so
|
|
54
|
+
// the eye distinguishes them at a glance without reading the
|
|
55
|
+
// text. Falls back to the panel's value color for any role
|
|
56
|
+
// name not in the theme map.
|
|
57
|
+
const roleColor = theme.team.roleColors[r.role] ?? theme.status.valueColor;
|
|
58
|
+
return (_jsxs(Box, { children: [_jsx(Text, { color: theme.status.tabColor, children: " ⊙ " }), _jsxs(Text, { color: glyphColor, children: [glyph, " "] }), _jsx(Text, { color: roleColor, bold: true, children: r.role.padEnd(roleWidth) }), showLlm && (_jsx(Text, { color: theme.hint.color, dimColor: true, children: " " + llmLabel(r).padEnd(llmWidth) })), _jsx(Text, { color: theme.hint.color, children: r.status === "running"
|
|
59
|
+
? " running…"
|
|
60
|
+
: r.elapsedMs !== undefined
|
|
61
|
+
? ` ${fmtElapsed(r.elapsedMs)}`
|
|
62
|
+
: "" })] }, i));
|
|
63
|
+
}) }));
|
|
64
|
+
}
|
|
65
|
+
//# sourceMappingURL=TeamStatusPanel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TeamStatusPanel.js","sourceRoot":"","sources":["../../../src/ui/components/TeamStatusPanel.tsx"],"names":[],"mappings":";AAAA,4CAA4C;AAC5C,EAAE;AACF,oEAAoE;AACpE,sEAAsE;AACtE,sEAAsE;AACtE,qEAAqE;AACrE,sEAAsE;AACtE,wEAAwE;AACxE,wCAAwC;AAExC,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,KAAK,CAAC;AAC3C,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAWpC,qEAAqE;AACrE,SAAS,QAAQ,CAAC,CAAa;IAC7B,IAAI,CAAC,CAAC,QAAQ,IAAI,CAAC,CAAC,KAAK;QAAE,OAAO,GAAG,CAAC,CAAC,QAAQ,IAAI,CAAC,CAAC,KAAK,EAAE,CAAC;IAC7D,OAAO,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,QAAQ,IAAI,EAAE,CAAC;AACrC,CAAC;AAMD,SAAS,UAAU,CAAC,EAAU;IAC5B,MAAM,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC;IACpB,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GA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,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,GACpB,EACN,OAAO,IAAI,CACV,KAAC,IAAI,IAAC,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,KAAK,EAAE,QAAQ,kBACpC,IAAI,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,GAC/B,CACR,EACD,KAAC,IAAI,IAAC,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,KAAK,YAC1B,CAAC,CAAC,MAAM,KAAK,SAAS;4BACrB,CAAC,CAAC,YAAY;4BACd,CAAC,CAAC,CAAC,CAAC,SAAS,KAAK,SAAS;gCACzB,CAAC,CAAC,KAAK,UAAU,CAAC,CAAC,CAAC,SAAS,CAAC,EAAE;gCAChC,CAAC,CAAC,EAAE,GACH,KAjBC,CAAC,CAkBL,CACP,CAAC;QACJ,CAAC,CAAC,GACE,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
text: string;
|
|
3
|
+
/** Phase 111: fold long reasoning to the first few lines with a
|
|
4
|
+
* "(N more)" marker. /verbose turns this off (collapsed=false) to
|
|
5
|
+
* show the full chain of thought. */
|
|
6
|
+
collapsed?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare function ThinkingBlock({ text, collapsed }: Props): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=ThinkingBlock.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ThinkingBlock.d.ts","sourceRoot":"","sources":["../../../src/ui/components/ThinkingBlock.tsx"],"names":[],"mappings":"AAWA,UAAU,KAAK;IACb,IAAI,EAAE,MAAM,CAAC;IACb;;0CAEsC;IACtC,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAID,wBAAgB,aAAa,CAAC,EAAE,IAAI,EAAE,SAAgB,EAAE,EAAE,KAAK,2CAyC9D"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { jsxs as _jsxs, Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
// Phase 29: render a chain-of-thought / reasoning chunk.
|
|
3
|
+
//
|
|
4
|
+
// One row per source line, all gray-italic, prefixed by a small
|
|
5
|
+
// "✻ thinking" marker on the first line so the reader can scan past
|
|
6
|
+
// it without conflating it with the assistant's user-facing reply.
|
|
7
|
+
// Streamed chunks join (EventLog coalesces adjacent event/thinking
|
|
8
|
+
// the same way it coalesces adjacent event/text).
|
|
9
|
+
import { Box, Text } from "ink";
|
|
10
|
+
import { theme } from "../theme.js";
|
|
11
|
+
const MAX_THINKING_LINES = 4;
|
|
12
|
+
export function ThinkingBlock({ text, collapsed = true }) {
|
|
13
|
+
const allLines = text.split("\n").filter((l, i, a) =>
|
|
14
|
+
// drop a single trailing blank line
|
|
15
|
+
!(i === a.length - 1 && l === ""));
|
|
16
|
+
const fold = collapsed && allLines.length > MAX_THINKING_LINES;
|
|
17
|
+
const lines = fold ? allLines.slice(0, MAX_THINKING_LINES) : allLines;
|
|
18
|
+
const hidden = allLines.length - lines.length;
|
|
19
|
+
return (_jsxs(Box, { flexDirection: "column", children: [lines.map((line, i) => (_jsxs(Box, { children: [i === 0 ? (_jsxs(_Fragment, { children: [_jsxs(Text, { color: theme.thinking.glyphColor, children: [theme.thinking.glyph, " "] }), _jsxs(Text, { color: theme.thinking.labelColor, italic: true, children: [theme.thinking.label, " "] })] })) : (_jsx(Text, { color: theme.thinking.bodyColor, children: " " })), _jsx(Text, { color: theme.thinking.bodyColor, italic: true, children: line })] }, i))), hidden > 0 && (_jsxs(Box, { children: [_jsx(Text, { color: theme.thinking.bodyColor, children: " " }), _jsxs(Text, { color: theme.thinking.labelColor, italic: true, children: ["\u2026 (", hidden, " more line", hidden === 1 ? "" : "s", " of reasoning \u00B7 /verbose to expand)"] })] }))] }));
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingUR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,UAAU,aACnC,KAAK,CAAC,QAAQ,CAAC,KAAK,EAAE,GAAG,IACrB,EACP,MAAC,IAAI,IAAC,KAAK,EAAE,KAAK,CAAC,QAAQ,CAAC,UAAU,EAAE,MAAM,mBAC3C,KAAK,CAAC,QAAQ,CAAC,KAAK,EAAE,GAAG,IACrB,IACN,CACJ,CAAC,CAAC,CAAC,CACF,KAAC,IAAI,IAAC,KAAK,EAAE,KAAK,CAAC,QAAQ,CAAC,SAAS,YAAG,IAAI,GAAQ,CACrD,EACD,KAAC,IAAI,IAAC,KAAK,EAAE,KAAK,CAAC,QAAQ,CAAC,SAAS,EAAE,MAAM,kBAC1C,IAAI,GACA,KAfC,CAAC,CAgBL,CACP,CAAC,EACD,MAAM,GAAG,CAAC,IAAI,CACb,MAAC,GAAG,eACF,KAAC,IAAI,IAAC,KAAK,EAAE,KAAK,CAAC,QAAQ,CAAC,SAAS,YAAG,IAAI,GAAQ,EACpD,MAAC,IAAI,IAAC,KAAK,EAAE,KAAK,CAAC,QAAQ,CAAC,UAAU,EAAE,MAAM,+BACxC,MAAM,gBAAY,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,gDAExC,IACH,CACP,IACG,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface Todo {
|
|
2
|
+
content: string;
|
|
3
|
+
status: "pending" | "in_progress" | "completed";
|
|
4
|
+
activeForm?: string;
|
|
5
|
+
}
|
|
6
|
+
interface Props {
|
|
7
|
+
todos: readonly Todo[];
|
|
8
|
+
}
|
|
9
|
+
export declare function TodoIndicator({ todos }: Props): import("react/jsx-runtime").JSX.Element | null;
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=TodoIndicator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TodoIndicator.d.ts","sourceRoot":"","sources":["../../../src/ui/components/TodoIndicator.tsx"],"names":[],"mappings":"AAaA,MAAM,WAAW,IAAI;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,SAAS,GAAG,aAAa,GAAG,WAAW,CAAC;IAChD,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,UAAU,KAAK;IACb,KAAK,EAAE,SAAS,IAAI,EAAE,CAAC;CACxB;AAmCD,wBAAgB,aAAa,CAAC,EAAE,KAAK,EAAE,EAAE,KAAK,kDAqB7C"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
// Phase 98 → 130: todo panel.
|
|
3
|
+
//
|
|
4
|
+
// When the model uses the TodoWrite tool, App captures the whole list
|
|
5
|
+
// (App parses every TodoWrite call into {content, status, activeForm}).
|
|
6
|
+
// We render it claude-code style: the in-progress task (◼), the pending
|
|
7
|
+
// queue (◻), and a tail of recently-completed tasks (✔, struck through),
|
|
8
|
+
// collapsing older completed ones into a "… +N completed" count so the
|
|
9
|
+
// panel stays compact. A one-glance answer to "what's done, what's now,
|
|
10
|
+
// what's next".
|
|
11
|
+
import { Box, Text } from "ink";
|
|
12
|
+
import { theme } from "../theme.js";
|
|
13
|
+
/** How many of the most-recent completed tasks to show in full before
|
|
14
|
+
* collapsing the rest into a count. */
|
|
15
|
+
const RECENT_DONE = 2;
|
|
16
|
+
function Row({ todo }) {
|
|
17
|
+
if (todo.status === "completed") {
|
|
18
|
+
return (_jsxs(Box, { children: [_jsx(Text, { color: "green", children: " ✔ " }), _jsx(Text, { color: theme.status.labelColor, strikethrough: true, children: todo.content })] }));
|
|
19
|
+
}
|
|
20
|
+
if (todo.status === "in_progress") {
|
|
21
|
+
return (_jsxs(Box, { children: [_jsx(Text, { color: theme.spinner.color, children: " ◼ " }), _jsx(Text, { color: theme.status.valueColor, bold: true, children: todo.activeForm || todo.content })] }));
|
|
22
|
+
}
|
|
23
|
+
return (_jsxs(Box, { children: [_jsx(Text, { color: theme.hint.color, children: " ◻ " }), _jsx(Text, { color: theme.hint.color, children: todo.content })] }));
|
|
24
|
+
}
|
|
25
|
+
export function TodoIndicator({ todos }) {
|
|
26
|
+
const inProgress = todos.filter((t) => t.status === "in_progress");
|
|
27
|
+
const pending = todos.filter((t) => t.status === "pending");
|
|
28
|
+
const completed = todos.filter((t) => t.status === "completed");
|
|
29
|
+
// Nothing left to do → hide (the run is done; don't linger).
|
|
30
|
+
if (inProgress.length === 0 && pending.length === 0)
|
|
31
|
+
return null;
|
|
32
|
+
const recentDone = completed.slice(-RECENT_DONE);
|
|
33
|
+
const hiddenDone = completed.length - recentDone.length;
|
|
34
|
+
const rows = [...inProgress, ...pending, ...recentDone];
|
|
35
|
+
return (_jsxs(Box, { flexDirection: "column", children: [rows.map((t, i) => (_jsx(Row, { todo: t }, i))), hiddenDone > 0 && (_jsx(Text, { color: theme.hint.color, children: ` … +${hiddenDone} completed` }))] }));
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=TodoIndicator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TodoIndicator.js","sourceRoot":"","sources":["../../../src/ui/components/TodoIndicator.tsx"],"names":[],"mappings":";AAAA,8BAA8B;AAC9B,EAAE;AACF,sEAAsE;AACtE,wEAAwE;AACxE,wEAAwE;AACxE,yEAAyE;AACzE,uEAAuE;AACvE,wEAAwE;AACxE,gBAAgB;AAEhB,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAYpC;wCACwC;AACxC,MAAM,WAAW,GAAG,CAAC,CAAC;AAEtB,SAAS,GAAG,CAAC,EAAE,IAAI,EAAkB;IACnC,IAAI,IAAI,CAAC,MAAM,KAAK,WAAW,EAAE,CAAC;QAChC,OAAO,CACL,MAAC,GAAG,eACF,KAAC,IAAI,IAAC,KAAK,EAAC,OAAO,YAAE,MAAM,GAAQ,EACnC,KAAC,IAAI,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,GAAG,SAAS,CAAC,KAAK,CAAC,CAAC,WAAW,CAAC,CAAC;IACjD,MAAM,UAAU,GAAG,SAAS,CAAC,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IACxD,MAAM,IAAI,GAAW,CAAC,GAAG,UAAU,EAAE,GAAG,OAAO,EAAE,GAAG,UAAU,CAAC,CAAC;IAEhE,OAAO,CACL,MAAC,GAAG,IAAC,aAAa,EAAC,QAAQ,aACxB,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAClB,KAAC,GAAG,IAAS,IAAI,EAAE,CAAC,IAAV,CAAC,CAAa,CACzB,CAAC,EACD,UAAU,GAAG,CAAC,IAAI,CACjB,KAAC,IAAI,IAAC,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,KAAK,YAAG,QAAQ,UAAU,YAAY,GAAQ,CACvE,IACG,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { ToolUseStartEvent, ToolUseEndEvent } from "../types.js";
|
|
2
|
+
interface Props {
|
|
3
|
+
start: ToolUseStartEvent;
|
|
4
|
+
end?: ToolUseEndEvent;
|
|
5
|
+
/** Phase 79: streamed output text accumulated by EventLog while the
|
|
6
|
+
* call is still in flight. Shown under the header as ⎿ rows; the
|
|
7
|
+
* final `end` result still replaces it once it lands. */
|
|
8
|
+
progress?: string;
|
|
9
|
+
/** Phase 101: /verbose mode — render the full output (no 3-line
|
|
10
|
+
* clip, lightweight tools show their body too). */
|
|
11
|
+
verbose?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export declare function formatElapsed(ms: number): string;
|
|
14
|
+
export declare function ToolCallCard({ start, end, progress, verbose }: Props): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=ToolCallCard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ToolCallCard.d.ts","sourceRoot":"","sources":["../../../src/ui/components/ToolCallCard.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAKtE,UAAU,KAAK;IACb,KAAK,EAAE,iBAAiB,CAAC;IACzB,GAAG,CAAC,EAAE,eAAe,CAAC;IACtB;;8DAE0D;IAC1D,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;wDACoD;IACpD,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAiGD,wBAAgB,aAAa,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAQhD;AAED,wBAAgB,YAAY,CAAC,EAAE,KAAK,EAAE,GAAG,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,KAAK,2CA2MpE"}
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
// Phase 22 → 78: claude-code-style tool call card.
|
|
3
|
+
//
|
|
4
|
+
// Header line: ⏺ ToolName(primary-arg) [OK] 1.2s
|
|
5
|
+
// Body (dim): ⎿ first three lines of output
|
|
6
|
+
// ⎿ ... (N more lines)
|
|
7
|
+
//
|
|
8
|
+
// Edit-shaped tools (old_string / new_string) render a DiffView under
|
|
9
|
+
// the header instead of an output preview. Errors land on a red
|
|
10
|
+
// continuation line so failures don't get folded out of sight.
|
|
11
|
+
import { useEffect, useRef, useState } from "react";
|
|
12
|
+
import { Box, Text } from "ink";
|
|
13
|
+
import { theme } from "../theme.js";
|
|
14
|
+
import { DiffView } from "./DiffView.js";
|
|
15
|
+
import { lineDiff, looksLikeUnifiedDiff, parseUnifiedDiff } from "../diff.js";
|
|
16
|
+
import { langFromDiffHeader } from "../diffLang.js";
|
|
17
|
+
const MAX_OUTPUT_LINES = 3;
|
|
18
|
+
const MAX_PRIMARY_ARG = 60;
|
|
19
|
+
function clip(s, max) {
|
|
20
|
+
if (s.length <= max)
|
|
21
|
+
return s;
|
|
22
|
+
return s.slice(0, max - 1) + "…";
|
|
23
|
+
}
|
|
24
|
+
// Phase 95: display-name map for the most common host CLI tools.
|
|
25
|
+
// Keeps the header reading like claude-code's "Update(file)" /
|
|
26
|
+
// "Read(file)" / "Search(pattern)" rather than the raw tool ids.
|
|
27
|
+
const DISPLAY_NAME = {
|
|
28
|
+
Edit: "Update",
|
|
29
|
+
MultiEdit: "Update",
|
|
30
|
+
Write: "Write",
|
|
31
|
+
NotebookEdit: "Update",
|
|
32
|
+
Read: "Read",
|
|
33
|
+
Bash: "Bash",
|
|
34
|
+
Glob: "Search",
|
|
35
|
+
Grep: "Search",
|
|
36
|
+
WebFetch: "Fetch",
|
|
37
|
+
WebSearch: "Search",
|
|
38
|
+
TodoWrite: "Todo",
|
|
39
|
+
Task: "Agent",
|
|
40
|
+
};
|
|
41
|
+
function displayName(rawName) {
|
|
42
|
+
return DISPLAY_NAME[rawName] ?? rawName;
|
|
43
|
+
}
|
|
44
|
+
/** Pull the single most-informative arg for the card header. Tool
|
|
45
|
+
* families converge on a small set of conventional keys; for
|
|
46
|
+
* anything outside that set, fall back to the first input entry. */
|
|
47
|
+
function primaryArg(input) {
|
|
48
|
+
// Order matters: command / file_path / pattern / query / url are
|
|
49
|
+
// the "primary intent" keys per tool family. `path` is only a
|
|
50
|
+
// fallback because tools like Grep pair `pattern` with `path` —
|
|
51
|
+
// pattern is what the user reads first.
|
|
52
|
+
if (typeof input.command === "string")
|
|
53
|
+
return clip(input.command, MAX_PRIMARY_ARG);
|
|
54
|
+
if (typeof input.file_path === "string")
|
|
55
|
+
return clip(input.file_path, MAX_PRIMARY_ARG);
|
|
56
|
+
if (typeof input.pattern === "string")
|
|
57
|
+
return clip(input.pattern, MAX_PRIMARY_ARG);
|
|
58
|
+
if (typeof input.query === "string")
|
|
59
|
+
return clip(input.query, MAX_PRIMARY_ARG);
|
|
60
|
+
if (typeof input.url === "string")
|
|
61
|
+
return clip(input.url, MAX_PRIMARY_ARG);
|
|
62
|
+
if (typeof input.path === "string")
|
|
63
|
+
return clip(input.path, MAX_PRIMARY_ARG);
|
|
64
|
+
const keys = Object.keys(input);
|
|
65
|
+
if (keys.length === 0)
|
|
66
|
+
return "";
|
|
67
|
+
const k = keys[0];
|
|
68
|
+
const v = input[k];
|
|
69
|
+
const s = typeof v === "string" ? v : JSON.stringify(v);
|
|
70
|
+
return `${k}=${clip(s, MAX_PRIMARY_ARG - k.length - 1)}`;
|
|
71
|
+
}
|
|
72
|
+
function extractEditDiff(input) {
|
|
73
|
+
const oldText = input["old_string"] ?? input["oldText"] ?? input["old"];
|
|
74
|
+
const newText = input["new_string"] ?? input["newText"] ?? input["new"];
|
|
75
|
+
if (typeof oldText !== "string" || typeof newText !== "string")
|
|
76
|
+
return null;
|
|
77
|
+
const fp = typeof input["file_path"] === "string"
|
|
78
|
+
? input["file_path"]
|
|
79
|
+
: typeof input["path"] === "string"
|
|
80
|
+
? input["path"]
|
|
81
|
+
: "";
|
|
82
|
+
return { oldText, newText, filePath: fp };
|
|
83
|
+
}
|
|
84
|
+
/** Phase 167: file extension → a syntax language hint for the diff.
|
|
85
|
+
* syntax.highlight() resolves aliases (ts/tsx/py/…) and falls back to
|
|
86
|
+
* plain text for unknown languages, so passing the raw extension is
|
|
87
|
+
* safe. Empty when there's no usable extension. */
|
|
88
|
+
function langFromPath(path) {
|
|
89
|
+
const base = path.split("/").pop() ?? "";
|
|
90
|
+
const dot = base.lastIndexOf(".");
|
|
91
|
+
if (dot <= 0 || dot === base.length - 1)
|
|
92
|
+
return undefined;
|
|
93
|
+
return base.slice(dot + 1).toLowerCase();
|
|
94
|
+
}
|
|
95
|
+
function isToolResultShape(v) {
|
|
96
|
+
return typeof v === "object" && v !== null && "ok" in v;
|
|
97
|
+
}
|
|
98
|
+
// Phase 66: elapsed formatter (re-exported for tests).
|
|
99
|
+
export function formatElapsed(ms) {
|
|
100
|
+
if (ms < 0)
|
|
101
|
+
ms = 0;
|
|
102
|
+
if (ms < 1000)
|
|
103
|
+
return `${ms}ms`;
|
|
104
|
+
const s = ms / 1000;
|
|
105
|
+
if (s < 60)
|
|
106
|
+
return `${s.toFixed(s < 10 ? 1 : 0)}s`;
|
|
107
|
+
const m = Math.floor(s / 60);
|
|
108
|
+
const rem = Math.floor(s % 60);
|
|
109
|
+
return `${m}m ${rem}s`;
|
|
110
|
+
}
|
|
111
|
+
export function ToolCallCard({ start, end, progress, verbose }) {
|
|
112
|
+
const editDiff = extractEditDiff(start.params.input);
|
|
113
|
+
const primary = primaryArg(start.params.input);
|
|
114
|
+
const result = end ? end.params.result : undefined;
|
|
115
|
+
const ok = end === undefined
|
|
116
|
+
? null
|
|
117
|
+
: isToolResultShape(result)
|
|
118
|
+
? result.ok !== false
|
|
119
|
+
: true;
|
|
120
|
+
const value = isToolResultShape(result) ? result.value : result;
|
|
121
|
+
const error = isToolResultShape(result) && typeof result.error === "string"
|
|
122
|
+
? result.error
|
|
123
|
+
: "";
|
|
124
|
+
const valueText = typeof value === "string"
|
|
125
|
+
? value
|
|
126
|
+
: value === undefined || value === null
|
|
127
|
+
? ""
|
|
128
|
+
: JSON.stringify(value, null, 2);
|
|
129
|
+
const outputIsDiff = typeof value === "string" && looksLikeUnifiedDiff(value);
|
|
130
|
+
// Phase 99: lightweight read-only tools (Read/Glob/Grep/LS) don't
|
|
131
|
+
// get an output preview — the result lives in the model's context
|
|
132
|
+
// and the user only wants to see *that* the call happened. A small
|
|
133
|
+
// suffix like `(N lines)` lands in the header instead.
|
|
134
|
+
const LIGHTWEIGHT = new Set([
|
|
135
|
+
"Read",
|
|
136
|
+
"Glob",
|
|
137
|
+
"Grep",
|
|
138
|
+
"LS",
|
|
139
|
+
"WebSearch",
|
|
140
|
+
"WebFetch",
|
|
141
|
+
]);
|
|
142
|
+
// Phase 101: /verbose disables lightweight suppression so even
|
|
143
|
+
// Read/Glob/Grep show their full body.
|
|
144
|
+
const isLightweight = !verbose && LIGHTWEIGHT.has(start.params.name);
|
|
145
|
+
// Phase 79: when the call is still running, surface streamed
|
|
146
|
+
// progress text in place of the eventual `value`. Once `end`
|
|
147
|
+
// arrives, the final result wins and the progress drops out.
|
|
148
|
+
const previewText = end === undefined ? (progress ?? "") : valueText;
|
|
149
|
+
// Trim trailing newline so we don't show an extra blank ⎿ row when
|
|
150
|
+
// the producer ends every chunk with "\n".
|
|
151
|
+
const outputLines = previewText
|
|
152
|
+
? previewText.replace(/\n+$/, "").split("\n")
|
|
153
|
+
: [];
|
|
154
|
+
// Lightweight tools surface their line count in the header
|
|
155
|
+
// (Phase 99), not the body.
|
|
156
|
+
const lightweightCount = isLightweight && end !== undefined && outputLines.length > 0
|
|
157
|
+
? outputLines.length
|
|
158
|
+
: 0;
|
|
159
|
+
// Keep the *tail* of the progress while running (most recent output
|
|
160
|
+
// is what the user wants to watch); keep the *head* of the final
|
|
161
|
+
// result (the model usually cares about the first lines).
|
|
162
|
+
// Phase 101: verbose mode lifts the 3-line clip.
|
|
163
|
+
const cap = verbose ? Number.POSITIVE_INFINITY : MAX_OUTPUT_LINES;
|
|
164
|
+
const shownOutput = end === undefined ? outputLines.slice(-cap) : outputLines.slice(0, cap);
|
|
165
|
+
const hiddenLineCount = Math.max(0, outputLines.length - shownOutput.length);
|
|
166
|
+
// Phase 66 elapsed timer.
|
|
167
|
+
const startedAtRef = useRef(Date.now());
|
|
168
|
+
const frozenRef = useRef(null);
|
|
169
|
+
const [now, setNow] = useState(Date.now());
|
|
170
|
+
useEffect(() => {
|
|
171
|
+
if (end !== undefined) {
|
|
172
|
+
if (frozenRef.current === null)
|
|
173
|
+
frozenRef.current = Date.now();
|
|
174
|
+
return;
|
|
175
|
+
}
|
|
176
|
+
const t = setInterval(() => setNow(Date.now()), 1000);
|
|
177
|
+
return () => clearInterval(t);
|
|
178
|
+
}, [end]);
|
|
179
|
+
const elapsedMs = end !== undefined && frozenRef.current !== null
|
|
180
|
+
? frozenRef.current - startedAtRef.current
|
|
181
|
+
: now - startedAtRef.current;
|
|
182
|
+
return (_jsxs(Box, { flexDirection: "column", children: [_jsxs(Box, { children: [_jsx(Text, { color: theme.toolCard.headGlyphColor, children: theme.toolCard.headGlyph + " " }), _jsx(Text, { color: theme.toolCard.nameColor, bold: true, children: displayName(start.params.name) }), primary && (_jsxs(_Fragment, { children: [_jsx(Text, { color: theme.toolCard.argLabelColor, children: "(" }), _jsx(Text, { color: theme.toolCard.argValueColor, children: primary }), _jsx(Text, { color: theme.toolCard.argLabelColor, children: ")" })] })), ok === false && (_jsxs(Text, { children: [" ", _jsxs(Text, { color: theme.toolCard.failColor, bold: true, children: ["[", theme.toolCard.failBadge, "]"] })] })), lightweightCount > 0 && (_jsx(Text, { color: theme.toolCard.elapsedColor, children: ` (${lightweightCount} ${start.params.name === "Grep" || start.params.name === "Glob"
|
|
183
|
+
? "matches"
|
|
184
|
+
: "lines"})` })), (ok === null || elapsedMs >= 1000) && (_jsx(Text, { color: theme.toolCard.elapsedColor, children: " " + (ok === null ? "running " : "") + formatElapsed(elapsedMs) }))] }), editDiff &&
|
|
185
|
+
(() => {
|
|
186
|
+
const diff = lineDiff(editDiff.oldText, editDiff.newText);
|
|
187
|
+
const adds = diff.filter((l) => l.kind === "add").length;
|
|
188
|
+
const dels = diff.filter((l) => l.kind === "del").length;
|
|
189
|
+
return (_jsxs(Box, { flexDirection: "column", children: [_jsxs(Box, { children: [_jsx(Text, { color: theme.toolCard.contColor, children: " " + theme.toolCard.contGlyph + " " }), _jsx(Text, { color: theme.toolCard.argLabelColor, children: `Added ${adds} line${adds === 1 ? "" : "s"}, removed ${dels} line${dels === 1 ? "" : "s"}` })] }), _jsx(Box, { paddingLeft: 2, children: _jsx(DiffView, { lines: diff, lang: langFromPath(editDiff.filePath) }) })] }));
|
|
190
|
+
})(), outputIsDiff && valueText && (_jsx(Box, { paddingLeft: 2, children: _jsx(DiffView, { lines: parseUnifiedDiff(valueText), lang: langFromDiffHeader(valueText) }) })), !editDiff &&
|
|
191
|
+
!outputIsDiff &&
|
|
192
|
+
!isLightweight &&
|
|
193
|
+
shownOutput.length > 0 && (_jsxs(Box, { flexDirection: "column", children: [shownOutput.map((line, i) => (_jsxs(Box, { children: [_jsx(Text, { color: theme.toolCard.contColor, children: " " + theme.toolCard.contGlyph + " " }), _jsx(Text, { color: theme.toolCard.outputColor, children: line })] }, i))), hiddenLineCount > 0 && (_jsxs(Box, { children: [_jsx(Text, { color: theme.toolCard.contColor, children: " " + theme.toolCard.contGlyph + " " }), _jsxs(Text, { color: theme.toolCard.argLabelColor, children: ["\u2026 (", hiddenLineCount, " more line", hiddenLineCount === 1 ? "" : "s", ")"] })] }))] })), ok === false && error && (_jsxs(Box, { children: [_jsx(Text, { color: theme.toolCard.contColor, children: " " + theme.toolCard.contGlyph + " " }), _jsxs(Text, { color: theme.toolCard.failColor, children: ["error: ", error] })] }))] }));
|
|
194
|
+
}
|
|
195
|
+
//# sourceMappingURL=ToolCallCard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ToolCallCard.js","sourceRoot":"","sources":["../../../src/ui/components/ToolCallCard.tsx"],"names":[],"mappings":";AAAA,mDAAmD;AACnD,EAAE;AACF,qDAAqD;AACrD,+CAA+C;AAC/C,sCAAsC;AACtC,EAAE;AACF,sEAAsE;AACtE,gEAAgE;AAChE,+DAA+D;AAE/D,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACpD,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAEpC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC9E,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAcpD,MAAM,gBAAgB,GAAG,CAAC,CAAC;AAC3B,MAAM,eAAe,GAAG,EAAE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,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAoCD,wBAAgB,OAAO,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,EAAE,EAAE,KAAK,2CA6DtD"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
// Phase 87: bigger Welcome panel.
|
|
3
|
+
//
|
|
4
|
+
// The Phase-80 two-liner was easy to miss when omg launched into an
|
|
5
|
+
// active terminal. This version uses an ASCII title block, a small
|
|
6
|
+
// info table (active provider/model + cwd), and a four-cell hint
|
|
7
|
+
// grid — large enough to read as "you just launched omg" without
|
|
8
|
+
// dominating the screen, and still gone the moment events arrive.
|
|
9
|
+
import { Box, Text } from "ink";
|
|
10
|
+
import { theme } from "../theme.js";
|
|
11
|
+
import { VERSION } from "../../index.js";
|
|
12
|
+
import { contextWindowForProvider } from "../../core/context/contextWindows.js";
|
|
13
|
+
function shortCwd(s, max = 60) {
|
|
14
|
+
if (!s)
|
|
15
|
+
return "—";
|
|
16
|
+
if (s.length <= max)
|
|
17
|
+
return s;
|
|
18
|
+
return "…" + s.slice(-(max - 1));
|
|
19
|
+
}
|
|
20
|
+
// Block letters drawn with the standard half-block / full-block
|
|
21
|
+
// glyphs. Six rows tall. Keeping it ASCII-conservative so it
|
|
22
|
+
// survives the same terminals the rest of the UI runs on.
|
|
23
|
+
const LOGO_LINES = [
|
|
24
|
+
" ██████ ███╗ ███╗ ██████╗ ",
|
|
25
|
+
" ██╔═══██╗████╗ ████║ ██╔════╝ ",
|
|
26
|
+
" ██║ ██║██╔████╔██║ ██║ ███╗",
|
|
27
|
+
" ██║ ██║██║╚██╔╝██║ ██║ ██║",
|
|
28
|
+
" ╚██████╔╝██║ ╚═╝ ██║ ╚██████╔╝",
|
|
29
|
+
" ╚═════╝ ╚═╝ ╚═╝ ╚═════╝ ",
|
|
30
|
+
];
|
|
31
|
+
const HINTS = [
|
|
32
|
+
{ key: "/", label: "slash commands" },
|
|
33
|
+
{ key: "@file", label: "inline a file" },
|
|
34
|
+
{ key: "!cmd", label: "shell command" },
|
|
35
|
+
// Phase 324: surface the two most-missed features — mode toggles and
|
|
36
|
+
// the new context inspector — so they're discoverable without /help.
|
|
37
|
+
{ key: "/plan /ask", label: "plan-first / ask-before-tools modes" },
|
|
38
|
+
{ key: "/context", label: "see what's filling the window" },
|
|
39
|
+
{ key: "Ctrl-O/P", label: "cycle tabs" },
|
|
40
|
+
];
|
|
41
|
+
export function Welcome({ provider, model, cwd }) {
|
|
42
|
+
const via = provider && model ? `${provider}/${model}` : provider ? provider : "—";
|
|
43
|
+
// Phase 324: show the context window up front — it frames the whole
|
|
44
|
+
// "how fast does context fill" question /context answers.
|
|
45
|
+
const win = contextWindowForProvider(provider ?? "", model);
|
|
46
|
+
const windowStr = win
|
|
47
|
+
? win >= 1000
|
|
48
|
+
? `${Math.round(win / 1000)}K tokens`
|
|
49
|
+
: `${win} tokens`
|
|
50
|
+
: null;
|
|
51
|
+
return (_jsxs(Box, { flexDirection: "column", paddingLeft: 2, paddingY: 1, children: [_jsx(Box, { flexDirection: "column", children: LOGO_LINES.map((line, i) => (_jsx(Text, { color: theme.prompt.arrowColor, bold: true, children: line }, i))) }), _jsxs(Box, { marginTop: 1, children: [_jsxs(Text, { color: theme.status.labelColor, children: [" ", "multi-LLM TUI"] }), _jsx(Text, { color: theme.status.sepColor, children: " · " }), _jsxs(Text, { color: theme.status.valueColor, children: ["v", VERSION] })] }), _jsxs(Box, { flexDirection: "column", marginTop: 1, children: [_jsxs(Box, { children: [_jsx(Text, { color: theme.status.labelColor, children: " active: " }), _jsx(Text, { color: theme.status.valueColor, children: via })] }), _jsxs(Box, { children: [_jsx(Text, { color: theme.status.labelColor, children: " cwd: " }), _jsx(Text, { color: theme.status.valueColor, children: shortCwd(cwd) })] }), windowStr ? (_jsxs(Box, { children: [_jsx(Text, { color: theme.status.labelColor, children: " context: " }), _jsx(Text, { color: theme.status.valueColor, children: windowStr })] })) : null] }), _jsxs(Box, { flexDirection: "column", marginTop: 1, children: [_jsx(Text, { color: theme.status.labelColor, children: " tips:" }), HINTS.map((h) => (_jsxs(Box, { children: [_jsx(Text, { color: theme.hint.keyColor, children: " " + h.key.padEnd(10, " ") }), _jsx(Text, { color: theme.hint.color, children: h.label })] }, h.key)))] })] }));
|
|
52
|
+
}
|
|
53
|
+
//# sourceMappingURL=Welcome.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Welcome.js","sourceRoot":"","sources":["../../../src/ui/components/Welcome.tsx"],"names":[],"mappings":";AAAA,kCAAkC;AAClC,EAAE;AACF,oEAAoE;AACpE,mEAAmE;AACnE,iEAAiE;AACjE,iEAAiE;AACjE,kEAAkE;AAElE,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sCAAsC,CAAC;AAQhF,SAAS,QAAQ,CAAC,CAAqB,EAAE,GAAG,GAAG,EAAE;IAC/C,IAAI,CAAC,CAAC;QAAE,OAAO,GAAG,CAAC;IACnB,IAAI,CAAC,CAAC,MAAM,IAAI,GAAG;QAAE,OAAO,CAAC,CAAC;IAC9B,OAAO,GAAG,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC;AACnC,CAAC;AAED,gEAAgE;AAChE,6DAA6D;AAC7D,0DAA0D;AAC1D,MAAM,UAAU,GAAsB;IACpC,iCAAiC;IACjC,iCAAiC;IACjC,iCAAiC;IACjC,iCAAiC;IACjC,iCAAiC;IACjC,iCAAiC;CAClC,CAAC;AAOF,MAAM,KAAK,GAAoB;IAC7B,EAAE,GAAG,EAAE,GAAG,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U,YAAG,SAAS,GAAQ,EACvD,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAChB,MAAC,GAAG,eACF,KAAC,IAAI,IAAC,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,QAAQ,YAC7B,MAAM,GAAG,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,EAAE,GAAG,CAAC,GAC1B,EACP,KAAC,IAAI,IAAC,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,KAAK,YAAG,CAAC,CAAC,KAAK,GAAQ,KAJvC,CAAC,CAAC,GAAG,CAKT,CACP,CAAC,IACE,IACF,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export interface InputCursorParkState {
|
|
2
|
+
/** When false, the wrapper skips cursor-positioning emission —
|
|
3
|
+
* e.g. picker / permission-prompt modes where CommandInput
|
|
4
|
+
* isn't rendered and there's no ▌ to anchor on. */
|
|
5
|
+
active: boolean;
|
|
6
|
+
/** How many rows ABOVE the natural end-of-frame position the
|
|
7
|
+
* input's cursor row sits. The end-of-frame is one row below
|
|
8
|
+
* HintBar (Ink's trailing '\n'); chrome between there and the
|
|
9
|
+
* input cursor row adds:
|
|
10
|
+
* '\n' — 1
|
|
11
|
+
* HintBar — 1
|
|
12
|
+
* StatusBar — 2 (Phase 105 two-row)
|
|
13
|
+
* lower HRule — 1
|
|
14
|
+
* + 0 for single-line input cursor on the input's only row,
|
|
15
|
+
* or more if the cursor sits on an earlier line of a
|
|
16
|
+
* multi-line input.
|
|
17
|
+
* Updated by CommandInput. */
|
|
18
|
+
rowsUp: number;
|
|
19
|
+
/** 1-indexed column on the input row where the visual ▌ sits.
|
|
20
|
+
* Prompt arrow is 2 columns ("❯ "), cursor offset adds the rest.
|
|
21
|
+
* For multi-line input this is the column on the cursor's line. */
|
|
22
|
+
col: number;
|
|
23
|
+
}
|
|
24
|
+
export declare const inputCursorPark: InputCursorParkState;
|
|
25
|
+
/** Reset to inactive — called from App when picker/permission/ask
|
|
26
|
+
* hides the CommandInput so the wrapper doesn't jump the cursor
|
|
27
|
+
* to a stale saved position. */
|
|
28
|
+
export declare function clearInputCursorPark(): void;
|
|
29
|
+
//# sourceMappingURL=cursorState.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cursorState.d.ts","sourceRoot":"","sources":["../../src/ui/cursorState.ts"],"names":[],"mappings":"AAsCA,MAAM,WAAW,oBAAoB;IACnC;;wDAEoD;IACpD,MAAM,EAAE,OAAO,CAAC;IAChB;;;;;;;;;;;mCAW+B;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf;;wEAEoE;IACpE,GAAG,EAAE,MAAM,CAAC;CACb;AAED,eAAO,MAAM,eAAe,EAAE,oBAI7B,CAAC;AAEF;;iCAEiC;AACjC,wBAAgB,oBAAoB,IAAI,IAAI,CAE3C"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
// Phase 267: shared cursor-position state for IME compose parking.
|
|
2
|
+
//
|
|
3
|
+
// The problem: macOS Cocoa terminals (iTerm2, Terminal.app, Warp)
|
|
4
|
+
// draw IME compose preview at the HARDWARE cursor position. Ink's
|
|
5
|
+
// log-update.js appends `'\n'` to every frame, so the hardware
|
|
6
|
+
// cursor lands one row BELOW the last rendered line per frame. With
|
|
7
|
+
// omg's default layout (HRule + StatusBar + HintBar BELOW
|
|
8
|
+
// CommandInput) that puts the cursor several rows below the input
|
|
9
|
+
// — and Korean compose draws there instead of inside the input.
|
|
10
|
+
//
|
|
11
|
+
// Phase 262 (DEC private ESC 7/8) and Phase 265 (CSI ESC [ s / u)
|
|
12
|
+
// tried to teleport the cursor back via escape sequences embedded
|
|
13
|
+
// in the rendered text. Both failed in practice. The leading
|
|
14
|
+
// hypothesis: even if the escapes survive Ink's text pipeline, the
|
|
15
|
+
// trailing `'\n'` AFTER the save-cursor point pushes the cursor
|
|
16
|
+
// down — and the restore at frame end runs but the terminal then
|
|
17
|
+
// applies the buffered '\n' (under DEC mode 2026) in a way that
|
|
18
|
+
// invalidates the restore. Or Ink's per-frame cursor management
|
|
19
|
+
// (cliCursor.hide(), eraseLines) interacts with sync-update in a
|
|
20
|
+
// way that drops the embedded saves.
|
|
21
|
+
//
|
|
22
|
+
// Phase 266 reordered the chrome above the input so the cursor
|
|
23
|
+
// would naturally end up at the bottom — but Ink's '\n' still puts
|
|
24
|
+
// it one row below, and the user reported the IME still drew
|
|
25
|
+
// off-input.
|
|
26
|
+
//
|
|
27
|
+
// Phase 267 takes a different tack: keep the visual layout as
|
|
28
|
+
// designed (chrome below input), and have `withSyncOutput` emit
|
|
29
|
+
// absolute cursor-positioning escapes AFTER the frame writes,
|
|
30
|
+
// bypassing Ink's text pipeline entirely. The escape isn't inside
|
|
31
|
+
// any Text node; it's a raw stdout write tacked onto the end of
|
|
32
|
+
// each frame's bytes. CommandInput updates this state in render so
|
|
33
|
+
// the wrapper knows where to park the cursor.
|
|
34
|
+
//
|
|
35
|
+
// The state lives at module scope (not React) because the wrapper
|
|
36
|
+
// runs outside the React tree. Mutation during render is safe
|
|
37
|
+
// because it doesn't trigger re-renders (no React hook involved).
|
|
38
|
+
export const inputCursorPark = {
|
|
39
|
+
active: false,
|
|
40
|
+
rowsUp: 5,
|
|
41
|
+
col: 3,
|
|
42
|
+
};
|
|
43
|
+
/** Reset to inactive — called from App when picker/permission/ask
|
|
44
|
+
* hides the CommandInput so the wrapper doesn't jump the cursor
|
|
45
|
+
* to a stale saved position. */
|
|
46
|
+
export function clearInputCursorPark() {
|
|
47
|
+
inputCursorPark.active = false;
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=cursorState.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cursorState.js","sourceRoot":"","sources":["../../src/ui/cursorState.ts"],"names":[],"mappings":"AAAA,mEAAmE;AACnE,EAAE;AACF,kEAAkE;AAClE,kEAAkE;AAClE,+DAA+D;AAC/D,oEAAoE;AACpE,0DAA0D;AAC1D,kEAAkE;AAClE,gEAAgE;AAChE,EAAE;AACF,kEAAkE;AAClE,kEAAkE;AAClE,6DAA6D;AAC7D,mEAAmE;AACnE,gEAAgE;AAChE,iEAAiE;AACjE,gEAAgE;AAChE,gEAAgE;AAChE,iEAAiE;AACjE,qCAAqC;AACrC,EAAE;AACF,+DAA+D;AAC/D,mEAAmE;AACnE,6DAA6D;AAC7D,aAAa;AACb,EAAE;AACF,8DAA8D;AAC9D,gEAAgE;AAChE,8DAA8D;AAC9D,kEAAkE;AAClE,gEAAgE;AAChE,mEAAmE;AACnE,8CAA8C;AAC9C,EAAE;AACF,kEAAkE;AAClE,8DAA8D;AAC9D,kEAAkE;AA0BlE,MAAM,CAAC,MAAM,eAAe,GAAyB;IACnD,MAAM,EAAE,KAAK;IACb,MAAM,EAAE,CAAC;IACT,GAAG,EAAE,CAAC;CACP,CAAC;AAEF;;iCAEiC;AACjC,MAAM,UAAU,oBAAoB;IAClC,eAAe,CAAC,MAAM,GAAG,KAAK,CAAC;AACjC,CAAC"}
|