@qduc/term2 0.26.1 → 0.27.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/dist/app.js +3 -2
- package/dist/app.js.map +1 -1
- package/dist/cli.js +12 -2
- package/dist/cli.js.map +1 -1
- package/dist/commands/resume-command.d.ts +1 -1
- package/dist/commands/resume-command.d.ts.map +1 -1
- package/dist/components/ErrorBoundary.js +4 -2
- package/dist/components/ErrorBoundary.js.map +1 -1
- package/dist/components/InputBox.d.ts.map +1 -1
- package/dist/components/InputBox.js +29 -37
- package/dist/components/InputBox.js.map +1 -1
- package/dist/components/common/Divider.d.ts +11 -0
- package/dist/components/common/Divider.d.ts.map +1 -0
- package/dist/components/common/Divider.js +11 -0
- package/dist/components/common/Divider.js.map +1 -0
- package/dist/components/common/MenuContainer.d.ts +3 -1
- package/dist/components/common/MenuContainer.d.ts.map +1 -1
- package/dist/components/common/MenuContainer.js +2 -7
- package/dist/components/common/MenuContainer.js.map +1 -1
- package/dist/components/input/ApplicationInputSurface.d.ts +1 -1
- package/dist/components/input/ApplicationInputSurface.d.ts.map +1 -1
- package/dist/components/input/ApplicationInputSurface.js +2 -1
- package/dist/components/input/ApplicationInputSurface.js.map +1 -1
- package/dist/components/input/PendingQueueList.d.ts +6 -0
- package/dist/components/input/PendingQueueList.d.ts.map +1 -1
- package/dist/components/input/PendingQueueList.js +42 -37
- package/dist/components/input/PendingQueueList.js.map +1 -1
- package/dist/components/input/ResumeMenuSession.d.ts.map +1 -1
- package/dist/components/input/ResumeMenuSession.js +1 -1
- package/dist/components/input/ResumeMenuSession.js.map +1 -1
- package/dist/components/layout/BackgroundTaskManager.d.ts.map +1 -1
- package/dist/components/layout/BackgroundTaskManager.js +8 -5
- package/dist/components/layout/BackgroundTaskManager.js.map +1 -1
- package/dist/components/layout/BottomArea.d.ts +1 -1
- package/dist/components/layout/BottomArea.d.ts.map +1 -1
- package/dist/components/layout/BottomArea.js +2 -0
- package/dist/components/layout/BottomArea.js.map +1 -1
- package/dist/components/menu/CopyMenu.d.ts.map +1 -1
- package/dist/components/menu/CopyMenu.js +8 -3
- package/dist/components/menu/CopyMenu.js.map +1 -1
- package/dist/components/menu/McpSelectionMenu.d.ts.map +1 -1
- package/dist/components/menu/McpSelectionMenu.js +13 -8
- package/dist/components/menu/McpSelectionMenu.js.map +1 -1
- package/dist/components/menu/PathSelectionMenu.d.ts.map +1 -1
- package/dist/components/menu/PathSelectionMenu.js +10 -7
- package/dist/components/menu/PathSelectionMenu.js.map +1 -1
- package/dist/components/menu/ProviderSelectionMenu.d.ts.map +1 -1
- package/dist/components/menu/ProviderSelectionMenu.js +58 -23
- package/dist/components/menu/ProviderSelectionMenu.js.map +1 -1
- package/dist/components/menu/ResumeSelectionMenu.d.ts +2 -0
- package/dist/components/menu/ResumeSelectionMenu.d.ts.map +1 -1
- package/dist/components/menu/ResumeSelectionMenu.js +9 -3
- package/dist/components/menu/ResumeSelectionMenu.js.map +1 -1
- package/dist/components/menu/RewindMenu.d.ts.map +1 -1
- package/dist/components/menu/RewindMenu.js +10 -5
- package/dist/components/menu/RewindMenu.js.map +1 -1
- package/dist/components/menu/SettingsSelectionMenu.d.ts.map +1 -1
- package/dist/components/menu/SettingsSelectionMenu.js +12 -17
- package/dist/components/menu/SettingsSelectionMenu.js.map +1 -1
- package/dist/components/menu/SettingsValueSelectionMenu.d.ts.map +1 -1
- package/dist/components/menu/SettingsValueSelectionMenu.js +10 -23
- package/dist/components/menu/SettingsValueSelectionMenu.js.map +1 -1
- package/dist/components/menu/SubagentPoolSelectionMenu.d.ts.map +1 -1
- package/dist/components/menu/SubagentPoolSelectionMenu.js +45 -24
- package/dist/components/menu/SubagentPoolSelectionMenu.js.map +1 -1
- package/dist/components/message/ChatMessage.d.ts.map +1 -1
- package/dist/components/message/ChatMessage.js +7 -2
- package/dist/components/message/ChatMessage.js.map +1 -1
- package/dist/components/message/CommandMessage.js +8 -1
- package/dist/components/message/CommandMessage.js.map +1 -1
- package/dist/components/message/MemoryRenderer.d.ts.map +1 -1
- package/dist/components/message/MemoryRenderer.js +11 -11
- package/dist/components/message/MemoryRenderer.js.map +1 -1
- package/dist/components/message/SubagentActivityMessage.d.ts.map +1 -1
- package/dist/components/message/SubagentActivityMessage.js +3 -3
- package/dist/components/message/SubagentActivityMessage.js.map +1 -1
- package/dist/components/message/command-message-helpers.d.ts +5 -5
- package/dist/components/prompt/ConfirmPrompt.d.ts +17 -0
- package/dist/components/prompt/ConfirmPrompt.d.ts.map +1 -0
- package/dist/components/prompt/ConfirmPrompt.js +54 -0
- package/dist/components/prompt/ConfirmPrompt.js.map +1 -0
- package/dist/components/prompt/HandoffConfirmationPrompt.d.ts.map +1 -1
- package/dist/components/prompt/HandoffConfirmationPrompt.js +3 -37
- package/dist/components/prompt/HandoffConfirmationPrompt.js.map +1 -1
- package/dist/components/prompt/InputSurgeConfirmationPrompt.d.ts.map +1 -1
- package/dist/components/prompt/InputSurgeConfirmationPrompt.js +3 -43
- package/dist/components/prompt/InputSurgeConfirmationPrompt.js.map +1 -1
- package/dist/components/prompt/LargeUncachedConfirmationPrompt.d.ts.map +1 -1
- package/dist/components/prompt/LargeUncachedConfirmationPrompt.js +5 -44
- package/dist/components/prompt/LargeUncachedConfirmationPrompt.js.map +1 -1
- package/dist/components/prompt/ModeSwitchConfirmationPrompt.d.ts.map +1 -1
- package/dist/components/prompt/ModeSwitchConfirmationPrompt.js +5 -46
- package/dist/components/prompt/ModeSwitchConfirmationPrompt.js.map +1 -1
- package/dist/components/prompt/QueuePausedPrompt.d.ts.map +1 -1
- package/dist/components/prompt/QueuePausedPrompt.js +11 -14
- package/dist/components/prompt/QueuePausedPrompt.js.map +1 -1
- package/dist/components/prompt/StandardModeConfirmationPrompt.d.ts.map +1 -1
- package/dist/components/prompt/StandardModeConfirmationPrompt.js +3 -37
- package/dist/components/prompt/StandardModeConfirmationPrompt.js.map +1 -1
- package/dist/components/theme.d.ts +5 -3
- package/dist/components/theme.d.ts.map +1 -1
- package/dist/components/theme.js +5 -3
- package/dist/components/theme.js.map +1 -1
- package/dist/hooks/use-app-commands.d.ts +1 -1
- package/dist/hooks/use-app-commands.d.ts.map +1 -1
- package/dist/hooks/use-conversation.d.ts.map +1 -1
- package/dist/hooks/use-conversation.js +0 -3
- package/dist/hooks/use-conversation.js.map +1 -1
- package/dist/hooks/use-resume-selection.d.ts +3 -1
- package/dist/hooks/use-resume-selection.d.ts.map +1 -1
- package/dist/hooks/use-resume-selection.js +26 -1
- package/dist/hooks/use-resume-selection.js.map +1 -1
- package/dist/lib/agent-chat-service.d.ts +2 -0
- package/dist/lib/agent-chat-service.d.ts.map +1 -1
- package/dist/lib/agent-chat-service.js +14 -0
- package/dist/lib/agent-chat-service.js.map +1 -1
- package/dist/lib/agent-client.d.ts +6 -0
- package/dist/lib/agent-client.d.ts.map +1 -1
- package/dist/lib/agent-client.js +17 -14
- package/dist/lib/agent-client.js.map +1 -1
- package/dist/non-interactive.d.ts.map +1 -1
- package/dist/non-interactive.js +4 -0
- package/dist/non-interactive.js.map +1 -1
- package/dist/prompts/memory-recall-notice.d.ts +28 -0
- package/dist/prompts/memory-recall-notice.d.ts.map +1 -0
- package/dist/prompts/memory-recall-notice.js +59 -0
- package/dist/prompts/memory-recall-notice.js.map +1 -0
- package/dist/prompts/memory-recall-notice.test.ts +50 -0
- package/dist/prompts/memory-recall-notice.ts +69 -0
- package/dist/prompts/memory.md +1 -1
- package/dist/prompts/prompt-constructor.test.ts +5 -4
- package/dist/services/conversation/conversation-adapter.d.ts.map +1 -1
- package/dist/services/conversation/conversation-adapter.js +6 -1
- package/dist/services/conversation/conversation-adapter.js.map +1 -1
- package/dist/services/conversation/conversation-decoder.d.ts.map +1 -1
- package/dist/services/conversation/conversation-decoder.js +6 -0
- package/dist/services/conversation/conversation-decoder.js.map +1 -1
- package/dist/services/conversation/conversation-events.d.ts +7 -1
- package/dist/services/conversation/conversation-events.d.ts.map +1 -1
- package/dist/services/conversation/conversation-events.js +5 -0
- package/dist/services/conversation/conversation-events.js.map +1 -1
- package/dist/services/conversation/conversation-message-projection.d.ts.map +1 -1
- package/dist/services/conversation/conversation-message-projection.js +3 -2
- package/dist/services/conversation/conversation-message-projection.js.map +1 -1
- package/dist/services/conversation/conversation-orchestrator.d.ts.map +1 -1
- package/dist/services/conversation/conversation-orchestrator.js +0 -8
- package/dist/services/conversation/conversation-orchestrator.js.map +1 -1
- package/dist/services/conversation/conversation-persistence.d.ts +11 -0
- package/dist/services/conversation/conversation-persistence.d.ts.map +1 -1
- package/dist/services/conversation/conversation-persistence.js +18 -3
- package/dist/services/conversation/conversation-persistence.js.map +1 -1
- package/dist/services/conversation/conversation-replay.d.ts.map +1 -1
- package/dist/services/conversation/conversation-replay.js +10 -0
- package/dist/services/conversation/conversation-replay.js.map +1 -1
- package/dist/services/conversation/conversation-runtime-factory.d.ts +2 -0
- package/dist/services/conversation/conversation-runtime-factory.d.ts.map +1 -1
- package/dist/services/conversation/conversation-runtime-factory.js.map +1 -1
- package/dist/services/conversation/conversation-service.d.ts +4 -1
- package/dist/services/conversation/conversation-service.d.ts.map +1 -1
- package/dist/services/conversation/conversation-service.js +5 -1
- package/dist/services/conversation/conversation-service.js.map +1 -1
- package/dist/services/conversation/recent-conversations.d.ts +35 -0
- package/dist/services/conversation/recent-conversations.d.ts.map +1 -0
- package/dist/services/conversation/recent-conversations.js +54 -0
- package/dist/services/conversation/recent-conversations.js.map +1 -0
- package/dist/services/conversation/session-index/session-index-worker-client.d.ts +15 -2
- package/dist/services/conversation/session-index/session-index-worker-client.d.ts.map +1 -1
- package/dist/services/conversation/session-index/session-index-worker-client.js +31 -5
- package/dist/services/conversation/session-index/session-index-worker-client.js.map +1 -1
- package/dist/services/conversation/session-index/session-index-worker.d.ts +6 -0
- package/dist/services/conversation/session-index/session-index-worker.d.ts.map +1 -1
- package/dist/services/conversation/session-index/session-index-worker.js +14 -0
- package/dist/services/conversation/session-index/session-index-worker.js.map +1 -1
- package/dist/services/conversation/session-knowledge-candidates.d.ts +15 -0
- package/dist/services/conversation/session-knowledge-candidates.d.ts.map +1 -0
- package/dist/services/conversation/session-knowledge-candidates.js +66 -0
- package/dist/services/conversation/session-knowledge-candidates.js.map +1 -0
- package/dist/services/conversation-agent-client.d.ts +8 -2
- package/dist/services/conversation-agent-client.d.ts.map +1 -1
- package/dist/services/logging/conversation-log-events.d.ts +7 -1
- package/dist/services/logging/conversation-log-events.d.ts.map +1 -1
- package/dist/services/logging/conversation-log-events.js.map +1 -1
- package/dist/services/logging/conversation-log-writer.d.ts +1 -1
- package/dist/services/logging/conversation-log-writer.d.ts.map +1 -1
- package/dist/services/logging/conversation-logger.d.ts.map +1 -1
- package/dist/services/logging/conversation-logger.js +4 -0
- package/dist/services/logging/conversation-logger.js.map +1 -1
- package/dist/services/memory/automatic-memory-canary.d.ts +20 -0
- package/dist/services/memory/automatic-memory-canary.d.ts.map +1 -0
- package/dist/services/memory/automatic-memory-canary.js +36 -0
- package/dist/services/memory/automatic-memory-canary.js.map +1 -0
- package/dist/services/memory/distiller/path-safety.d.ts +3 -0
- package/dist/services/memory/distiller/path-safety.d.ts.map +1 -0
- package/dist/services/memory/distiller/path-safety.js +7 -0
- package/dist/services/memory/distiller/path-safety.js.map +1 -0
- package/dist/services/memory/distiller/promotion-policy.d.ts +26 -0
- package/dist/services/memory/distiller/promotion-policy.d.ts.map +1 -0
- package/dist/services/memory/distiller/promotion-policy.js +40 -0
- package/dist/services/memory/distiller/promotion-policy.js.map +1 -0
- package/dist/services/memory/distiller/secret-redaction.d.ts +3 -0
- package/dist/services/memory/distiller/secret-redaction.d.ts.map +1 -0
- package/dist/services/memory/distiller/secret-redaction.js +40 -0
- package/dist/services/memory/distiller/secret-redaction.js.map +1 -0
- package/dist/services/memory/memory-capabilities.d.ts +19 -0
- package/dist/services/memory/memory-capabilities.d.ts.map +1 -1
- package/dist/services/memory/memory-capabilities.js +87 -15
- package/dist/services/memory/memory-capabilities.js.map +1 -1
- package/dist/services/memory/memory-store.d.ts +24 -2
- package/dist/services/memory/memory-store.d.ts.map +1 -1
- package/dist/services/memory/memory-store.js +110 -6
- package/dist/services/memory/memory-store.js.map +1 -1
- package/dist/services/session/initial-input-preparer.d.ts.map +1 -1
- package/dist/services/session/initial-input-preparer.js +5 -1
- package/dist/services/session/initial-input-preparer.js.map +1 -1
- package/dist/services/session/initial-turn-recovery-handler.d.ts.map +1 -1
- package/dist/services/session/initial-turn-recovery-handler.js +2 -1
- package/dist/services/session/initial-turn-recovery-handler.js.map +1 -1
- package/dist/services/session/session-composition.d.ts +6 -2
- package/dist/services/session/session-composition.d.ts.map +1 -1
- package/dist/services/session/session-composition.js +14 -27
- package/dist/services/session/session-composition.js.map +1 -1
- package/dist/services/session/turn-attempt-factory.d.ts +2 -0
- package/dist/services/session/turn-attempt-factory.d.ts.map +1 -1
- package/dist/services/session/turn-attempt-factory.js.map +1 -1
- package/dist/services/session/turn-attempt.d.ts +5 -0
- package/dist/services/session/turn-attempt.d.ts.map +1 -1
- package/dist/services/session/turn-attempt.js +9 -0
- package/dist/services/session/turn-attempt.js.map +1 -1
- package/dist/services/session/turn-coordinator.d.ts +5 -2
- package/dist/services/session/turn-coordinator.d.ts.map +1 -1
- package/dist/services/session/turn-coordinator.js +47 -0
- package/dist/services/session/turn-coordinator.js.map +1 -1
- package/dist/services/session/turn-workflow.d.ts.map +1 -1
- package/dist/services/session/turn-workflow.js +41 -1
- package/dist/services/session/turn-workflow.js.map +1 -1
- package/dist/services/session-rollover/session-rollover-brief.d.ts.map +1 -1
- package/dist/services/session-rollover/session-rollover-brief.js +2 -0
- package/dist/services/session-rollover/session-rollover-brief.js.map +1 -1
- package/dist/tools/memory/memory-tools.d.ts.map +1 -1
- package/dist/tools/memory/memory-tools.js +55 -20
- package/dist/tools/memory/memory-tools.js.map +1 -1
- package/dist/tools/session-rollover/session-rollover-tool.d.ts.map +1 -1
- package/dist/tools/session-rollover/session-rollover-tool.js +9 -4
- package/dist/tools/session-rollover/session-rollover-tool.js.map +1 -1
- package/dist/types/message.d.ts +2 -0
- package/dist/types/message.d.ts.map +1 -1
- package/dist/types/message.js.map +1 -1
- package/dist/utils/conversation/conversation-event-handler.d.ts.map +1 -1
- package/dist/utils/conversation/conversation-event-handler.js +11 -0
- package/dist/utils/conversation/conversation-event-handler.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MemoryRenderer.js","sourceRoot":"","sources":["../../../source/components/message/MemoryRenderer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAa,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,
|
|
1
|
+
{"version":3,"file":"MemoryRenderer.js","sourceRoot":"","sources":["../../../source/components/message/MemoryRenderer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAa,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EACL,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,UAAU,EACV,iBAAiB,EACjB,iBAAiB,GAClB,MAAM,aAAa,CAAC;AASrB,MAAM,QAAQ,GAAG,CAAC,IAAY,EAAE,GAAW,EAAU,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,GAAG,GAAG,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;AAEhH,MAAM,cAAc,GAAc,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,oBAAoB,EAAE,EAAE,EAAE;IACtF,MAAM,MAAM,GAAG,iBAAiB,CAAC,MAAM,CAAQ,CAAC;IAChD,IAAI,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,oBAAC,IAAI,IAAC,KAAK,EAAE,iBAAiB,IAAG,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,EAAE,GAAG,CAAC,CAAQ,CAAC,CAAC,CAAC,IAAI;gBACnG,CAAC,CAAC,cAAc,EAAE,IAAI,CAAC,CAAC,CAAC,oBAAC,IAAI,IAAC,KAAK,EAAE,iBAAiB,IAAG,CAAC,CAAC,cAAc,CAAC,IAAI,CAAQ,CAAC,CAAC,CAAC,IAAI,CAC3F,CACP,CAAC,CACE,CACF,CACP,CAAC;IACJ,CAAC;IAED,IAAI,MAAM,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;QAC7B,OAAO,CACL,oBAAC,GAAG,IAAC,aAAa,EAAC,QAAQ;YACxB,oBAAoB,EAAE;YACvB,oBAAC,GAAG,IAAC,WAAW,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC;gBAC/B,oBAAC,IAAI,IAAC,KAAK,EAAE,iBAAiB,EAAE,QAAQ,UACrC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,kBAAkB,CAC3C,CACH,CACF,CACP,CAAC;IACJ,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SubagentActivityMessage.d.ts","sourceRoot":"","sources":["../../../source/components/message/SubagentActivityMessage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAa,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"SubagentActivityMessage.d.ts","sourceRoot":"","sources":["../../../source/components/message/SubagentActivityMessage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAa,MAAM,OAAO,CAAC;AAKlC,OAAO,KAAK,EAAE,cAAc,IAAI,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAEnF,KAAK,iBAAiB,GAAG,MAAM,GAAG,kBAAkB,CAAC;AAErD,KAAK,KAAK,GAAG;IACX,GAAG,EAAE;QACH,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,KAAK,CAAC,EAAE,OAAO,CAAC;QAChB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,KAAK,CAAC,EAAE,iBAAiB,EAAE,CAAC;QAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;CACH,CAAC;AA2DF,eAAO,MAAM,iBAAiB,SAAU,iBAAiB,KAAG,OAc3D,CAAC"}
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { Box, Text } from 'ink';
|
|
3
3
|
import CommandMessage from './CommandMessage.js';
|
|
4
4
|
import { getFirstParagraph } from './command-message-helpers.js';
|
|
5
|
-
import { COLOR_DANGER,
|
|
5
|
+
import { COLOR_DANGER, COLOR_SUCCESS, COLOR_TEXT_SUBTLE, COLOR_WARNING, TOOL_STATUS_GLYPH } from '../theme.js';
|
|
6
6
|
const MAX_TOOL_LENGTH = 96;
|
|
7
7
|
const MAX_TASK_LENGTH = 300;
|
|
8
8
|
const truncate = (value, maxLength) => {
|
|
@@ -88,12 +88,12 @@ const SubagentActivityMessage = ({ msg }) => {
|
|
|
88
88
|
"$ ",
|
|
89
89
|
title,
|
|
90
90
|
statusSuffix),
|
|
91
|
-
msg.status === 'completed' && msg.finalText ? (React.createElement(Text, { color:
|
|
91
|
+
msg.status === 'completed' && msg.finalText ? (React.createElement(Text, { color: COLOR_TEXT_SUBTLE }, getFirstParagraph(msg.finalText, 500))) : (tools.map((tool, index) => {
|
|
92
92
|
if (tool && typeof tool === 'object') {
|
|
93
93
|
return (React.createElement(Box, { key: index },
|
|
94
94
|
React.createElement(CommandMessage, { command: tool.command, output: tool.output, status: tool.status, success: tool.success, failureReason: tool.failureReason, toolName: tool.toolName, toolArgs: tool.toolArgs, isApprovalRejection: tool.isApprovalRejection, hadApproval: tool.hadApproval, displayMode: "concise", textColor: COLOR_TEXT_SUBTLE, isSubagent: true })));
|
|
95
95
|
}
|
|
96
|
-
return (React.createElement(Text, { key: `${tool}-${index}`, color:
|
|
96
|
+
return (React.createElement(Text, { key: `${tool}-${index}`, color: COLOR_TEXT_SUBTLE }, truncate(formatSubagentStringTool(tool, msg.status), MAX_TOOL_LENGTH)));
|
|
97
97
|
}))));
|
|
98
98
|
};
|
|
99
99
|
export default React.memo(SubagentActivityMessage);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SubagentActivityMessage.js","sourceRoot":"","sources":["../../../source/components/message/SubagentActivityMessage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAa,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,cAAc,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,
|
|
1
|
+
{"version":3,"file":"SubagentActivityMessage.js","sourceRoot":"","sources":["../../../source/components/message/SubagentActivityMessage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAa,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,cAAc,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,iBAAiB,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAkB/G,MAAM,eAAe,GAAG,EAAE,CAAC;AAC3B,MAAM,eAAe,GAAG,GAAG,CAAC;AAE5B,MAAM,QAAQ,GAAG,CAAC,KAAa,EAAE,SAAiB,EAAE,EAAE;IACpD,IAAI,KAAK,CAAC,MAAM,IAAI,SAAS,EAAE,C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iB,EAC5B,UAAU,EAAE,IAAI,GAChB,CACE,CACP,CAAC;YACJ,CAAC;YACD,OAAO,CACL,oBAAC,IAAI,IAAC,GAAG,EAAE,GAAG,IAAI,IAAI,KAAK,EAAE,EAAE,KAAK,EAAE,iBAAiB,IACpD,QAAQ,CAAC,wBAAwB,CAAC,IAAc,EAAE,GAAG,CAAC,MAAM,CAAC,EAAE,eAAe,CAAC,CAC3E,CACR,CAAC;QACJ,CAAC,CAAC,CACH,CACG,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,KAAK,CAAC,IAAI,CAAC,uBAAuB,CAAC,CAAC"}
|
|
@@ -65,8 +65,8 @@ export declare const parseMemoryOutput: (output: string | undefined) => {
|
|
|
65
65
|
memory?: undefined;
|
|
66
66
|
deleted?: undefined;
|
|
67
67
|
} | {
|
|
68
|
-
message?: undefined;
|
|
69
68
|
code?: undefined;
|
|
69
|
+
message?: undefined;
|
|
70
70
|
type: 'list';
|
|
71
71
|
scope: 'all';
|
|
72
72
|
global: {
|
|
@@ -85,8 +85,8 @@ export declare const parseMemoryOutput: (output: string | undefined) => {
|
|
|
85
85
|
memory?: undefined;
|
|
86
86
|
deleted?: undefined;
|
|
87
87
|
} | {
|
|
88
|
-
message?: undefined;
|
|
89
88
|
code?: undefined;
|
|
89
|
+
message?: undefined;
|
|
90
90
|
type: 'list';
|
|
91
91
|
memories: any;
|
|
92
92
|
omitted?: any;
|
|
@@ -94,22 +94,22 @@ export declare const parseMemoryOutput: (output: string | undefined) => {
|
|
|
94
94
|
memory?: undefined;
|
|
95
95
|
deleted?: undefined;
|
|
96
96
|
} | {
|
|
97
|
-
message?: undefined;
|
|
98
97
|
code?: undefined;
|
|
98
|
+
message?: undefined;
|
|
99
99
|
type: 'search';
|
|
100
100
|
results: any;
|
|
101
101
|
omitted?: any;
|
|
102
102
|
memory?: undefined;
|
|
103
103
|
deleted?: undefined;
|
|
104
104
|
} | {
|
|
105
|
-
message?: undefined;
|
|
106
105
|
code?: undefined;
|
|
106
|
+
message?: undefined;
|
|
107
107
|
type: 'get';
|
|
108
108
|
memory: any;
|
|
109
109
|
deleted?: undefined;
|
|
110
110
|
} | {
|
|
111
|
-
message?: undefined;
|
|
112
111
|
code?: undefined;
|
|
112
|
+
message?: undefined;
|
|
113
113
|
memory?: undefined;
|
|
114
114
|
type: 'delete';
|
|
115
115
|
deleted: boolean;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
export interface ConfirmPromptProps {
|
|
3
|
+
question: string;
|
|
4
|
+
/** Consequence the user should weigh before answering; rendered above the question. */
|
|
5
|
+
warning?: string;
|
|
6
|
+
confirmLabel?: string;
|
|
7
|
+
declineLabel?: string;
|
|
8
|
+
/** 0 highlights the confirm option, 1 the decline option. Default to 1 when confirming is destructive. */
|
|
9
|
+
defaultIndex?: 0 | 1;
|
|
10
|
+
onConfirm: () => void;
|
|
11
|
+
onDecline: () => void;
|
|
12
|
+
onCancel: () => void;
|
|
13
|
+
}
|
|
14
|
+
/** The single look and key contract for every binary confirmation above the input. */
|
|
15
|
+
declare const ConfirmPrompt: FC<ConfirmPromptProps>;
|
|
16
|
+
export default ConfirmPrompt;
|
|
17
|
+
//# sourceMappingURL=ConfirmPrompt.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConfirmPrompt.d.ts","sourceRoot":"","sources":["../../../source/components/prompt/ConfirmPrompt.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAY,MAAM,OAAO,CAAC;AAK5C,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,MAAM,CAAC;IACjB,uFAAuF;IACvF,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,0GAA0G;IAC1G,YAAY,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;IACrB,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,QAAQ,EAAE,MAAM,IAAI,CAAC;CACtB;AASD,sFAAsF;AACtF,QAAA,MAAM,aAAa,EAAE,EAAE,CAAC,kBAAkB,CA6DzC,CAAC;eAEa,aAAa"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
import { Box, Text, useInput } from 'ink';
|
|
3
|
+
import { MenuFooter, SelectionMarker } from '../common/MenuContainer.js';
|
|
4
|
+
import { COLOR_ACCENT, COLOR_BORDER_ACTIVE, COLOR_TEXT_MUTED, COLOR_WARNING, GLYPH_WARNING } from '../theme.js';
|
|
5
|
+
const HINTS = [
|
|
6
|
+
['↑↓', 'navigate'],
|
|
7
|
+
['⏎', 'select'],
|
|
8
|
+
['y/n', 'answer'],
|
|
9
|
+
['esc', 'cancel'],
|
|
10
|
+
];
|
|
11
|
+
/** The single look and key contract for every binary confirmation above the input. */
|
|
12
|
+
const ConfirmPrompt = ({ question, warning, confirmLabel = 'Yes', declineLabel = 'No', defaultIndex = 0, onConfirm, onDecline, onCancel, }) => {
|
|
13
|
+
const [selectedIndex, setSelectedIndex] = useState(defaultIndex);
|
|
14
|
+
useInput((input, key) => {
|
|
15
|
+
if (key.upArrow || key.downArrow) {
|
|
16
|
+
setSelectedIndex((previous) => (previous === 0 ? 1 : 0));
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
if (key.return) {
|
|
20
|
+
if (selectedIndex === 0)
|
|
21
|
+
onConfirm();
|
|
22
|
+
else
|
|
23
|
+
onDecline();
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
if (input === 'y' || input === 'Y') {
|
|
27
|
+
onConfirm();
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
if (input === 'n' || input === 'N') {
|
|
31
|
+
onDecline();
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
if (key.escape || input === '\u001B') {
|
|
35
|
+
onCancel();
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
const options = [confirmLabel, declineLabel];
|
|
39
|
+
return (React.createElement(Box, { flexDirection: "column", borderStyle: "round", borderColor: COLOR_BORDER_ACTIVE, paddingX: 1 },
|
|
40
|
+
warning && (React.createElement(Text, { color: COLOR_WARNING },
|
|
41
|
+
GLYPH_WARNING,
|
|
42
|
+
" ",
|
|
43
|
+
warning)),
|
|
44
|
+
React.createElement(Text, { bold: true }, question),
|
|
45
|
+
React.createElement(Box, { flexDirection: "column", marginTop: 1 }, options.map((label, index) => {
|
|
46
|
+
const selected = index === selectedIndex;
|
|
47
|
+
return (React.createElement(Box, { key: label },
|
|
48
|
+
React.createElement(SelectionMarker, { selected: selected }),
|
|
49
|
+
React.createElement(Text, { color: selected ? COLOR_ACCENT : COLOR_TEXT_MUTED, bold: selected }, label)));
|
|
50
|
+
})),
|
|
51
|
+
React.createElement(MenuFooter, { hints: HINTS })));
|
|
52
|
+
};
|
|
53
|
+
export default ConfirmPrompt;
|
|
54
|
+
//# sourceMappingURL=ConfirmPrompt.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConfirmPrompt.js","sourceRoot":"","sources":["../../../source/components/prompt/ConfirmPrompt.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAM,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AACzE,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAehH,MAAM,KAAK,GAAiD;IAC1D,CAAC,IAAI,EAAE,UAAU,CAAC;IAClB,CAAC,GAAG,EAAE,QAAQ,CAAC;IACf,CAAC,KAAK,EAAE,QAAQ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AC,WAAW,EAAC,OAAO,EAAC,WAAW,EAAE,mBAAmB,EAAE,QAAQ,EAAE,CAAC;QAC1F,OAAO,IAAI,CACV,oBAAC,IAAI,IAAC,KAAK,EAAE,aAAa;YACvB,aAAa;;YAAG,OAAO,CACnB,CACR;QACD,oBAAC,IAAI,IAAC,IAAI,UAAE,QAAQ,CAAQ;QAC5B,oBAAC,GAAG,IAAC,aAAa,EAAC,QAAQ,EAAC,SAAS,EAAE,CAAC,IACrC,OAAO,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE;YAC5B,MAAM,QAAQ,GAAG,KAAK,KAAK,aAAa,CAAC;YACzC,OAAO,CACL,oBAAC,GAAG,IAAC,GAAG,EAAE,KAAK;gBACb,oBAAC,eAAe,IAAC,QAAQ,EAAE,QAAQ,GAAI;gBACvC,oBAAC,IAAI,IAAC,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,gBAAgB,EAAE,IAAI,EAAE,QAAQ,IACpE,KAAK,CACD,CACH,CACP,CAAC;QACJ,CAAC,CAAC,CACE;QACN,oBAAC,UAAU,IAAC,KAAK,EAAE,KAAK,GAAI,CACxB,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HandoffConfirmationPrompt.d.ts","sourceRoot":"","sources":["../../../source/components/prompt/HandoffConfirmationPrompt.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,
|
|
1
|
+
{"version":3,"file":"HandoffConfirmationPrompt.d.ts","sourceRoot":"","sources":["../../../source/components/prompt/HandoffConfirmationPrompt.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAGlC,UAAU,8BAA8B;IACtC,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,QAAQ,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,QAAA,MAAM,yBAAyB,EAAE,EAAE,CAAC,8BAA8B,CAEjE,CAAC;eAEa,yBAAyB"}
|
|
@@ -1,39 +1,5 @@
|
|
|
1
|
-
import React
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
const HandoffConfirmationPrompt = ({ onConfirm, onDecline, onCancel }) => {
|
|
5
|
-
const [selectedIndex, setSelectedIndex] = useState(0); // 0 = Yes, 1 = No
|
|
6
|
-
useInput((input, key) => {
|
|
7
|
-
if (key.upArrow || key.downArrow) {
|
|
8
|
-
setSelectedIndex((prev) => (prev === 0 ? 1 : 0));
|
|
9
|
-
}
|
|
10
|
-
if (key.return) {
|
|
11
|
-
if (selectedIndex === 0) {
|
|
12
|
-
onConfirm();
|
|
13
|
-
}
|
|
14
|
-
else {
|
|
15
|
-
onDecline();
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
if (input === 'y') {
|
|
19
|
-
onConfirm();
|
|
20
|
-
}
|
|
21
|
-
if (input === 'n') {
|
|
22
|
-
onDecline();
|
|
23
|
-
}
|
|
24
|
-
if (key.escape) {
|
|
25
|
-
onCancel();
|
|
26
|
-
}
|
|
27
|
-
});
|
|
28
|
-
return (React.createElement(Box, { flexDirection: "column" },
|
|
29
|
-
React.createElement(Text, null, "\uD83D\uDCCB Change model?"),
|
|
30
|
-
React.createElement(Box, { flexDirection: "column", marginLeft: 1 },
|
|
31
|
-
React.createElement(Text, { color: selectedIndex === 0 ? COLOR_SUCCESS : undefined },
|
|
32
|
-
selectedIndex === 0 ? '❯ ' : ' ',
|
|
33
|
-
"Yes"),
|
|
34
|
-
React.createElement(Text, { color: selectedIndex === 1 ? COLOR_DANGER : undefined },
|
|
35
|
-
selectedIndex === 1 ? '❯ ' : ' ',
|
|
36
|
-
"No"))));
|
|
37
|
-
};
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import ConfirmPrompt from './ConfirmPrompt.js';
|
|
3
|
+
const HandoffConfirmationPrompt = (props) => (React.createElement(ConfirmPrompt, { question: "Change model?", ...props }));
|
|
38
4
|
export default HandoffConfirmationPrompt;
|
|
39
5
|
//# sourceMappingURL=HandoffConfirmationPrompt.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HandoffConfirmationPrompt.js","sourceRoot":"","sources":["../../../source/components/prompt/HandoffConfirmationPrompt.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"HandoffConfirmationPrompt.js","sourceRoot":"","sources":["../../../source/components/prompt/HandoffConfirmationPrompt.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAa,MAAM,OAAO,CAAC;AAClC,OAAO,aAAa,MAAM,oBAAoB,CAAC;AAQ/C,MAAM,yBAAyB,GAAuC,CAAC,KAAK,EAAE,EAAE,CAAC,CAC/E,oBAAC,aAAa,IAAC,QAAQ,EAAC,eAAe,KAAK,KAAK,GAAI,CACtD,CAAC;AAEF,eAAe,yBAAyB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputSurgeConfirmationPrompt.d.ts","sourceRoot":"","sources":["../../../source/components/prompt/InputSurgeConfirmationPrompt.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,
|
|
1
|
+
{"version":3,"file":"InputSurgeConfirmationPrompt.d.ts","sourceRoot":"","sources":["../../../source/components/prompt/InputSurgeConfirmationPrompt.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAGlC,MAAM,WAAW,iCAAiC;IAChD,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,SAAS,EAAE,MAAM,IAAI,CAAC;CACvB;AAED,QAAA,MAAM,4BAA4B,EAAE,EAAE,CAAC,iCAAiC,CAUvE,CAAC;eAEa,4BAA4B"}
|
|
@@ -1,45 +1,5 @@
|
|
|
1
|
-
import React
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
const InputSurgeConfirmationPrompt = ({ reason, onConfirm, onDecline }) => {
|
|
5
|
-
const [selectedIndex, setSelectedIndex] = useState(0); // 0 = Send anyway, 1 = Cancel
|
|
6
|
-
useInput((input, key) => {
|
|
7
|
-
if (key.upArrow || key.downArrow) {
|
|
8
|
-
setSelectedIndex((prev) => (prev === 0 ? 1 : 0));
|
|
9
|
-
}
|
|
10
|
-
if (key.return) {
|
|
11
|
-
if (selectedIndex === 0) {
|
|
12
|
-
onConfirm();
|
|
13
|
-
}
|
|
14
|
-
else {
|
|
15
|
-
onDecline();
|
|
16
|
-
}
|
|
17
|
-
return;
|
|
18
|
-
}
|
|
19
|
-
if (input === 'y') {
|
|
20
|
-
onConfirm();
|
|
21
|
-
return;
|
|
22
|
-
}
|
|
23
|
-
if (input === 'n') {
|
|
24
|
-
onDecline();
|
|
25
|
-
return;
|
|
26
|
-
}
|
|
27
|
-
if (key.escape) {
|
|
28
|
-
onDecline();
|
|
29
|
-
}
|
|
30
|
-
});
|
|
31
|
-
return (React.createElement(Box, { flexDirection: "column" },
|
|
32
|
-
React.createElement(Text, { color: COLOR_WARNING },
|
|
33
|
-
"\u26A0\uFE0F Input Surge Warning: ",
|
|
34
|
-
reason),
|
|
35
|
-
React.createElement(Text, { color: COLOR_WARNING }, "Send request anyway?"),
|
|
36
|
-
React.createElement(Box, { flexDirection: "column", marginLeft: 1 },
|
|
37
|
-
React.createElement(Text, { color: selectedIndex === 0 ? COLOR_SUCCESS : undefined },
|
|
38
|
-
selectedIndex === 0 ? '❯ ' : ' ',
|
|
39
|
-
"Send anyway"),
|
|
40
|
-
React.createElement(Text, { color: selectedIndex === 1 ? COLOR_DANGER : undefined },
|
|
41
|
-
selectedIndex === 1 ? '❯ ' : ' ',
|
|
42
|
-
"Cancel"))));
|
|
43
|
-
};
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import ConfirmPrompt from './ConfirmPrompt.js';
|
|
3
|
+
const InputSurgeConfirmationPrompt = ({ reason, onConfirm, onDecline }) => (React.createElement(ConfirmPrompt, { warning: `Input Surge Warning: ${reason}`, question: "Send request anyway?", confirmLabel: "Send anyway", declineLabel: "Cancel", onConfirm: onConfirm, onDecline: onDecline, onCancel: onDecline }));
|
|
44
4
|
export default InputSurgeConfirmationPrompt;
|
|
45
5
|
//# sourceMappingURL=InputSurgeConfirmationPrompt.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputSurgeConfirmationPrompt.js","sourceRoot":"","sources":["../../../source/components/prompt/InputSurgeConfirmationPrompt.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"InputSurgeConfirmationPrompt.js","sourceRoot":"","sources":["../../../source/components/prompt/InputSurgeConfirmationPrompt.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAa,MAAM,OAAO,CAAC;AAClC,OAAO,aAAa,MAAM,oBAAoB,CAAC;AAQ/C,MAAM,4BAA4B,GAA0C,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC,CAChH,oBAAC,aAAa,IACZ,OAAO,EAAE,wBAAwB,MAAM,EAAE,EACzC,QAAQ,EAAC,sBAAsB,EAC/B,YAAY,EAAC,aAAa,EAC1B,YAAY,EAAC,QAAQ,EACrB,SAAS,EAAE,SAAS,EACpB,SAAS,EAAE,SAAS,EACpB,QAAQ,EAAE,SAAS,GACnB,CACH,CAAC;AAEF,eAAe,4BAA4B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LargeUncachedConfirmationPrompt.d.ts","sourceRoot":"","sources":["../../../source/components/prompt/LargeUncachedConfirmationPrompt.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,
|
|
1
|
+
{"version":3,"file":"LargeUncachedConfirmationPrompt.d.ts","sourceRoot":"","sources":["../../../source/components/prompt/LargeUncachedConfirmationPrompt.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAGrE,UAAU,oCAAoC;IAC5C,KAAK,EAAE,eAAe,GAAG,IAAI,GAAG,SAAS,CAAC;IAC1C,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,SAAS,EAAE,MAAM,IAAI,CAAC;CACvB;AAED,QAAA,MAAM,+BAA+B,EAAE,EAAE,CAAC,oCAAoC,CAkB7E,CAAC;eAEa,+BAA+B"}
|
|
@@ -1,50 +1,11 @@
|
|
|
1
|
-
import React
|
|
2
|
-
import
|
|
3
|
-
import { COLOR_DANGER, COLOR_SUCCESS, COLOR_WARNING } from '../theme.js';
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import ConfirmPrompt from './ConfirmPrompt.js';
|
|
4
3
|
const LargeUncachedConfirmationPrompt = ({ usage, onConfirm, onDecline }) => {
|
|
5
|
-
const [selectedIndex, setSelectedIndex] = useState(0); // 0 = Send, 1 = Cancel
|
|
6
|
-
useInput((input, key) => {
|
|
7
|
-
if (key.upArrow || key.downArrow) {
|
|
8
|
-
setSelectedIndex((prev) => (prev === 0 ? 1 : 0));
|
|
9
|
-
}
|
|
10
|
-
if (key.return) {
|
|
11
|
-
if (selectedIndex === 0) {
|
|
12
|
-
onConfirm();
|
|
13
|
-
}
|
|
14
|
-
else {
|
|
15
|
-
onDecline();
|
|
16
|
-
}
|
|
17
|
-
return;
|
|
18
|
-
}
|
|
19
|
-
if (input === 'y') {
|
|
20
|
-
onConfirm();
|
|
21
|
-
return;
|
|
22
|
-
}
|
|
23
|
-
if (input === 'n') {
|
|
24
|
-
onDecline();
|
|
25
|
-
return;
|
|
26
|
-
}
|
|
27
|
-
if (key.escape) {
|
|
28
|
-
onDecline();
|
|
29
|
-
}
|
|
30
|
-
});
|
|
31
4
|
const promptTokens = usage?.prompt_tokens ?? 0;
|
|
32
5
|
const cacheReadTokens = usage?.cache_read_tokens;
|
|
33
|
-
return (React.createElement(
|
|
34
|
-
|
|
35
|
-
"Send ",
|
|
36
|
-
promptTokens.toLocaleString(),
|
|
37
|
-
" tokens anyway?",
|
|
38
|
-
cacheReadTokens != null
|
|
39
|
-
? ` (\u26A0\uFE0F ${cacheReadTokens.toLocaleString()} uncached)`
|
|
40
|
-
: ' (may miss prompt cache)'),
|
|
41
|
-
React.createElement(Box, { flexDirection: "column", marginLeft: 1 },
|
|
42
|
-
React.createElement(Text, { color: selectedIndex === 0 ? COLOR_SUCCESS : undefined },
|
|
43
|
-
selectedIndex === 0 ? '❯ ' : ' ',
|
|
44
|
-
"Send"),
|
|
45
|
-
React.createElement(Text, { color: selectedIndex === 1 ? COLOR_DANGER : undefined },
|
|
46
|
-
selectedIndex === 1 ? '❯ ' : ' ',
|
|
47
|
-
"Cancel"))));
|
|
6
|
+
return (React.createElement(ConfirmPrompt, { warning: cacheReadTokens != null
|
|
7
|
+
? `Large request — ${cacheReadTokens.toLocaleString()} uncached`
|
|
8
|
+
: 'Large request — may miss prompt cache', question: `Send ${promptTokens.toLocaleString()} tokens anyway?`, confirmLabel: "Send", declineLabel: "Cancel", onConfirm: onConfirm, onDecline: onDecline, onCancel: onDecline }));
|
|
48
9
|
};
|
|
49
10
|
export default LargeUncachedConfirmationPrompt;
|
|
50
11
|
//# sourceMappingURL=LargeUncachedConfirmationPrompt.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LargeUncachedConfirmationPrompt.js","sourceRoot":"","sources":["../../../source/components/prompt/LargeUncachedConfirmationPrompt.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"LargeUncachedConfirmationPrompt.js","sourceRoot":"","sources":["../../../source/components/prompt/LargeUncachedConfirmationPrompt.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAa,MAAM,OAAO,CAAC;AAElC,OAAO,aAAa,MAAM,oBAAoB,CAAC;AAQ/C,MAAM,+BAA+B,GAA6C,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,EAAE,EAAE;IACpH,MAAM,YAAY,GAAG,KAAK,EAAE,aAAa,IAAI,CAAC,CAAC;IAC/C,MAAM,eAAe,GAAG,KAAK,EAAE,iBAAiB,CAAC;IACjD,OAAO,CACL,oBAAC,aAAa,IACZ,OAAO,EACL,eAAe,IAAI,IAAI;YACrB,CAAC,CAAC,mBAAmB,eAAe,CAAC,cAAc,EAAE,WAAW;YAChE,CAAC,CAAC,uCAAuC,EAE7C,QAAQ,EAAE,QAAQ,YAAY,CAAC,cAAc,EAAE,iBAAiB,EAChE,YAAY,EAAC,MAAM,EACnB,YAAY,EAAC,QAAQ,EACrB,SAAS,EAAE,SAAS,EACpB,SAAS,EAAE,SAAS,EACpB,QAAQ,EAAE,SAAS,GACnB,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,+BAA+B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModeSwitchConfirmationPrompt.d.ts","sourceRoot":"","sources":["../../../source/components/prompt/ModeSwitchConfirmationPrompt.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,
|
|
1
|
+
{"version":3,"file":"ModeSwitchConfirmationPrompt.d.ts","sourceRoot":"","sources":["../../../source/components/prompt/ModeSwitchConfirmationPrompt.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAGlC,MAAM,WAAW,iCAAiC;IAChD,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB;AAED,QAAA,MAAM,4BAA4B,EAAE,EAAE,CAAC,iCAAiC,CAqBvE,CAAC;eAEa,4BAA4B"}
|
|
@@ -1,51 +1,10 @@
|
|
|
1
|
-
import React
|
|
2
|
-
import
|
|
3
|
-
import { COLOR_DANGER, COLOR_SUCCESS, COLOR_WARNING } from '../theme.js';
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import ConfirmPrompt from './ConfirmPrompt.js';
|
|
4
3
|
const ModeSwitchConfirmationPrompt = ({ modeLabel, targetValue = true, onConfirm, onDecline, onCancel = onDecline, }) => {
|
|
5
|
-
// Default to 1 ('No') for safety so pressing Enter doesn't accidentally clear session
|
|
6
|
-
const [selectedIndex, setSelectedIndex] = useState(1);
|
|
7
|
-
useInput((input, key) => {
|
|
8
|
-
if (key.upArrow || key.downArrow) {
|
|
9
|
-
setSelectedIndex((prev) => (prev === 0 ? 1 : 0));
|
|
10
|
-
}
|
|
11
|
-
if (key.return) {
|
|
12
|
-
if (selectedIndex === 0) {
|
|
13
|
-
onConfirm();
|
|
14
|
-
}
|
|
15
|
-
else {
|
|
16
|
-
onDecline();
|
|
17
|
-
}
|
|
18
|
-
return;
|
|
19
|
-
}
|
|
20
|
-
if (input === 'y' || input === 'Y') {
|
|
21
|
-
onConfirm();
|
|
22
|
-
return;
|
|
23
|
-
}
|
|
24
|
-
if (input === 'n' || input === 'N') {
|
|
25
|
-
onDecline();
|
|
26
|
-
return;
|
|
27
|
-
}
|
|
28
|
-
if (key.escape || input === '\u001B' || input === '\u001b') {
|
|
29
|
-
onCancel();
|
|
30
|
-
}
|
|
31
|
-
});
|
|
32
4
|
const actionText = targetValue ? `switch to ${modeLabel} mode` : `disable ${modeLabel} mode`;
|
|
33
|
-
return (React.createElement(
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
targetValue ? `Switching to ${modeLabel} mode` : `Disabling ${modeLabel} mode`,
|
|
37
|
-
" requires clearing the current session."),
|
|
38
|
-
React.createElement(Text, null,
|
|
39
|
-
"Clear session and ",
|
|
40
|
-
actionText,
|
|
41
|
-
"?"),
|
|
42
|
-
React.createElement(Box, { flexDirection: "column", marginLeft: 1 },
|
|
43
|
-
React.createElement(Text, { color: selectedIndex === 0 ? COLOR_SUCCESS : undefined },
|
|
44
|
-
selectedIndex === 0 ? '❯ ' : ' ',
|
|
45
|
-
"Yes"),
|
|
46
|
-
React.createElement(Text, { color: selectedIndex === 1 ? COLOR_DANGER : undefined },
|
|
47
|
-
selectedIndex === 1 ? '❯ ' : ' ',
|
|
48
|
-
"No"))));
|
|
5
|
+
return (React.createElement(ConfirmPrompt, { warning: `${targetValue ? `Switching to ${modeLabel} mode` : `Disabling ${modeLabel} mode`} requires clearing the current session.`, question: `Clear session and ${actionText}?`,
|
|
6
|
+
// Default to 'No' so pressing Enter doesn't accidentally clear the session.
|
|
7
|
+
defaultIndex: 1, onConfirm: onConfirm, onDecline: onDecline, onCancel: onCancel }));
|
|
49
8
|
};
|
|
50
9
|
export default ModeSwitchConfirmationPrompt;
|
|
51
10
|
//# sourceMappingURL=ModeSwitchConfirmationPrompt.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModeSwitchConfirmationPrompt.js","sourceRoot":"","sources":["../../../source/components/prompt/ModeSwitchConfirmationPrompt.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"ModeSwitchConfirmationPrompt.js","sourceRoot":"","sources":["../../../source/components/prompt/ModeSwitchConfirmationPrompt.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAa,MAAM,OAAO,CAAC;AAClC,OAAO,aAAa,MAAM,oBAAoB,CAAC;AAU/C,MAAM,4BAA4B,GAA0C,CAAC,EAC3E,SAAS,EACT,WAAW,GAAG,IAAI,EAClB,SAAS,EACT,SAAS,EACT,QAAQ,GAAG,SAAS,GACrB,EAAE,EAAE;IACH,MAAM,UAAU,GAAG,WAAW,CAAC,CAAC,CAAC,aAAa,SAAS,OAAO,CAAC,CAAC,CAAC,WAAW,SAAS,OAAO,CAAC;IAC7F,OAAO,CACL,oBAAC,aAAa,IACZ,OAAO,EAAE,GACP,WAAW,CAAC,CAAC,CAAC,gBAAgB,SAAS,OAAO,CAAC,CAAC,CAAC,aAAa,SAAS,OACzE,yCAAyC,EACzC,QAAQ,EAAE,qBAAqB,UAAU,GAAG;QAC5C,4EAA4E;QAC5E,YAAY,EAAE,CAAC,EACf,SAAS,EAAE,SAAS,EACpB,SAAS,EAAE,SAAS,EACpB,QAAQ,EAAE,QAAQ,GAClB,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,4BAA4B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QueuePausedPrompt.d.ts","sourceRoot":"","sources":["../../../source/components/prompt/QueuePausedPrompt.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAElC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0CAA0C,CAAC;
|
|
1
|
+
{"version":3,"file":"QueuePausedPrompt.d.ts","sourceRoot":"","sources":["../../../source/components/prompt/QueuePausedPrompt.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAElC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0CAA0C,CAAC;AAIjF,MAAM,WAAW,sBAAsB;IACrC,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,gBAAgB,CAAC;IAC/B,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,SAAS,EAAE,MAAM,IAAI,CAAC;CACvB;AAED,QAAA,MAAM,iBAAiB,EAAE,EAAE,CAAC,sBAAsB,CAiCjD,CAAC;eAEa,iBAAiB"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Box, Text, useInput } from 'ink';
|
|
3
|
-
import {
|
|
3
|
+
import { MenuFooter } from '../common/MenuContainer.js';
|
|
4
|
+
import { COLOR_BORDER_ACTIVE, COLOR_WARNING, GLYPH_WARNING } from '../theme.js';
|
|
4
5
|
const QueuePausedPrompt = ({ queueLength, pauseReason, onResume, onDiscard }) => {
|
|
5
6
|
useInput((input, key) => {
|
|
6
7
|
if (input === 'r' || input === 'R') {
|
|
@@ -16,22 +17,18 @@ const QueuePausedPrompt = ({ queueLength, pauseReason, onResume, onDiscard }) =>
|
|
|
16
17
|
return;
|
|
17
18
|
}
|
|
18
19
|
});
|
|
19
|
-
return (React.createElement(Box, { flexDirection: "column",
|
|
20
|
+
return (React.createElement(Box, { flexDirection: "column", borderStyle: "round", borderColor: COLOR_BORDER_ACTIVE, paddingX: 1 },
|
|
20
21
|
React.createElement(Text, { color: COLOR_WARNING },
|
|
21
|
-
|
|
22
|
+
GLYPH_WARNING,
|
|
23
|
+
" Queue paused: ",
|
|
22
24
|
queueLength,
|
|
23
25
|
" item(s) pending.",
|
|
24
|
-
pauseReason === 'failure' ? ' Last turn failed.' : '',
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
' ',
|
|
31
|
-
React.createElement(Text, { color: COLOR_DANGER, bold: true },
|
|
32
|
-
"[",
|
|
33
|
-
React.createElement(Text, { color: COLOR_DANGER_SOFT }, "D"),
|
|
34
|
-
"]iscard"))));
|
|
26
|
+
pauseReason === 'failure' ? ' Last turn failed.' : ''),
|
|
27
|
+
React.createElement(MenuFooter, { hints: [
|
|
28
|
+
['r', 'resume'],
|
|
29
|
+
['d', 'discard'],
|
|
30
|
+
['esc', 'discard'],
|
|
31
|
+
] })));
|
|
35
32
|
};
|
|
36
33
|
export default QueuePausedPrompt;
|
|
37
34
|
//# sourceMappingURL=QueuePausedPrompt.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QueuePausedPrompt.js","sourceRoot":"","sources":["../../../source/components/prompt/QueuePausedPrompt.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAa,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAC;AAE1C,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"QueuePausedPrompt.js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ACE,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StandardModeConfirmationPrompt.d.ts","sourceRoot":"","sources":["../../../source/components/prompt/StandardModeConfirmationPrompt.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,
|
|
1
|
+
{"version":3,"file":"StandardModeConfirmationPrompt.d.ts","sourceRoot":"","sources":["../../../source/components/prompt/StandardModeConfirmationPrompt.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAGlC,UAAU,mCAAmC;IAC3C,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,QAAQ,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,QAAA,MAAM,8BAA8B,EAAE,EAAE,CAAC,mCAAmC,CAE3E,CAAC;eAEa,8BAA8B"}
|
|
@@ -1,39 +1,5 @@
|
|
|
1
|
-
import React
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
const StandardModeConfirmationPrompt = ({ onConfirm, onDecline, onCancel, }) => {
|
|
5
|
-
const [selectedIndex, setSelectedIndex] = useState(0); // 0 = Yes, 1 = No
|
|
6
|
-
useInput((input, key) => {
|
|
7
|
-
if (key.upArrow || key.downArrow) {
|
|
8
|
-
setSelectedIndex((prev) => (prev === 0 ? 1 : 0));
|
|
9
|
-
}
|
|
10
|
-
if (key.return) {
|
|
11
|
-
if (selectedIndex === 0) {
|
|
12
|
-
onConfirm();
|
|
13
|
-
}
|
|
14
|
-
else {
|
|
15
|
-
onDecline();
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
if (input === 'y') {
|
|
19
|
-
onConfirm();
|
|
20
|
-
}
|
|
21
|
-
if (input === 'n') {
|
|
22
|
-
onDecline();
|
|
23
|
-
}
|
|
24
|
-
if (key.escape) {
|
|
25
|
-
onCancel();
|
|
26
|
-
}
|
|
27
|
-
});
|
|
28
|
-
return (React.createElement(Box, { flexDirection: "column" },
|
|
29
|
-
React.createElement(Text, null, "\uD83D\uDCCB Switch to standard mode?"),
|
|
30
|
-
React.createElement(Box, { flexDirection: "column", marginLeft: 1 },
|
|
31
|
-
React.createElement(Text, { color: selectedIndex === 0 ? COLOR_SUCCESS : undefined },
|
|
32
|
-
selectedIndex === 0 ? '❯ ' : ' ',
|
|
33
|
-
"Yes"),
|
|
34
|
-
React.createElement(Text, { color: selectedIndex === 1 ? COLOR_DANGER : undefined },
|
|
35
|
-
selectedIndex === 1 ? '❯ ' : ' ',
|
|
36
|
-
"No"))));
|
|
37
|
-
};
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import ConfirmPrompt from './ConfirmPrompt.js';
|
|
3
|
+
const StandardModeConfirmationPrompt = (props) => (React.createElement(ConfirmPrompt, { question: "Switch to standard mode?", ...props }));
|
|
38
4
|
export default StandardModeConfirmationPrompt;
|
|
39
5
|
//# sourceMappingURL=StandardModeConfirmationPrompt.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StandardModeConfirmationPrompt.js","sourceRoot":"","sources":["../../../source/components/prompt/StandardModeConfirmationPrompt.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"StandardModeConfirmationPrompt.js","sourceRoot":"","sources":["../../../source/components/prompt/StandardModeConfirmationPrompt.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAa,MAAM,OAAO,CAAC;AAClC,OAAO,aAAa,MAAM,oBAAoB,CAAC;AAQ/C,MAAM,8BAA8B,GAA4C,CAAC,KAAK,EAAE,EAAE,CAAC,CACzF,oBAAC,aAAa,IAAC,QAAQ,EAAC,0BAA0B,KAAK,KAAK,GAAI,CACjE,CAAC;AAEF,eAAe,8BAA8B,CAAC"}
|