@noorm/marie-cli 0.1.17 → 0.1.25
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/README.md +7 -15
- package/SENTINEL.md +4 -7
- package/dist/cli-new/components/AgenticSpinner.js +28 -0
- package/dist/cli-new/components/AgenticSpinner.js.map +1 -0
- package/dist/cli-new/components/App.js +16 -63
- package/dist/cli-new/components/App.js.map +1 -1
- package/dist/cli-new/components/ApprovalDialog.js +3 -2
- package/dist/cli-new/components/ApprovalDialog.js.map +1 -1
- package/dist/cli-new/components/Banner.js +16 -5
- package/dist/cli-new/components/Banner.js.map +1 -1
- package/dist/cli-new/components/ChatArea.js +6 -7
- package/dist/cli-new/components/ChatArea.js.map +1 -1
- package/dist/cli-new/components/Header.js +14 -8
- package/dist/cli-new/components/Header.js.map +1 -1
- package/dist/cli-new/components/InputArea.js +98 -31
- package/dist/cli-new/components/InputArea.js.map +1 -1
- package/dist/cli-new/components/MessageBubble.js +28 -19
- package/dist/cli-new/components/MessageBubble.js.map +1 -1
- package/dist/cli-new/components/SessionSwitcher.js +6 -9
- package/dist/cli-new/components/SessionSwitcher.js.map +1 -1
- package/dist/cli-new/components/SetupWizard.js +80 -257
- package/dist/cli-new/components/SetupWizard.js.map +1 -1
- package/dist/cli-new/components/ToolCallDisplay.js +20 -5
- package/dist/cli-new/components/ToolCallDisplay.js.map +1 -1
- package/dist/cli-new/components/WizardSteps.js +22 -0
- package/dist/cli-new/components/WizardSteps.js.map +1 -0
- package/dist/cli-new/constants/SetupConstants.js +42 -0
- package/dist/cli-new/constants/SetupConstants.js.map +1 -0
- package/dist/cli-new/hooks/useGit.js +19 -62
- package/dist/cli-new/hooks/useGit.js.map +1 -1
- package/dist/cli-new/hooks/useMarie.js +26 -18
- package/dist/cli-new/hooks/useMarie.js.map +1 -1
- package/dist/cli-new/hooks/useSessions.js +1 -1
- package/dist/cli-new/hooks/useSessions.js.map +1 -1
- package/dist/cli-new/hooks/useSetupWizard.js +88 -0
- package/dist/cli-new/hooks/useSetupWizard.js.map +1 -0
- package/dist/cli-new/hooks/useUpdateCheck.js +4 -3
- package/dist/cli-new/hooks/useUpdateCheck.js.map +1 -1
- package/dist/cli-new/index.js +2 -4
- package/dist/cli-new/index.js.map +1 -1
- package/dist/cli-new/services/CommandService.js +104 -0
- package/dist/cli-new/services/CommandService.js.map +1 -0
- package/dist/cli-new/services/GitService.js +91 -0
- package/dist/cli-new/services/GitService.js.map +1 -0
- package/dist/cli-new/services/MarieService.js +77 -0
- package/dist/cli-new/services/MarieService.js.map +1 -0
- package/dist/cli-new/services/auth-server.js +128 -0
- package/dist/cli-new/services/auth-server.js.map +1 -0
- package/dist/cli-new/styles/theme.js +17 -17
- package/dist/cli-new/styles/theme.js.map +1 -1
- package/dist/cli-new/utils/version.js +24 -0
- package/dist/cli-new/utils/version.js.map +1 -0
- package/dist/monolith/adapters/CliMarieAdapter.js +19 -18
- package/dist/monolith/adapters/CliMarieAdapter.js.map +1 -1
- package/dist/monolith/cli/CliFileSystemPort.js +17 -3
- package/dist/monolith/cli/CliFileSystemPort.js.map +1 -1
- package/dist/monolith/cli/MarieToolDefinitionsCLI.js +44 -33
- package/dist/monolith/cli/MarieToolDefinitionsCLI.js.map +1 -1
- package/dist/monolith/cli/index.js +11 -20
- package/dist/monolith/cli/index.js.map +1 -1
- package/dist/monolith/cli/services/JoyAutomationServiceCLI.js +15 -62
- package/dist/monolith/cli/services/JoyAutomationServiceCLI.js.map +1 -1
- package/dist/monolith/cli/storage.js +154 -65
- package/dist/monolith/cli/storage.js.map +1 -1
- package/dist/monolith/domain/joy/RitualService.js +44 -46
- package/dist/monolith/domain/joy/RitualService.js.map +1 -1
- package/dist/monolith/domain/marie/MarieCortex.js +148 -0
- package/dist/monolith/domain/marie/MarieCortex.js.map +1 -0
- package/dist/monolith/domain/marie/PersonalityRenderer.js +97 -0
- package/dist/monolith/domain/marie/PersonalityRenderer.js.map +1 -0
- package/dist/monolith/infrastructure/Configuration.js +68 -0
- package/dist/monolith/infrastructure/Configuration.js.map +1 -0
- package/dist/monolith/infrastructure/CoreInfrastructure.js +204 -0
- package/dist/monolith/infrastructure/CoreInfrastructure.js.map +1 -0
- package/dist/monolith/infrastructure/ai/agents/MarieAscendant.js +3 -3
- package/dist/monolith/infrastructure/ai/agents/MarieAscendant.js.map +1 -1
- package/dist/monolith/infrastructure/ai/context/ContextArchiveService.js +51 -57
- package/dist/monolith/infrastructure/ai/context/ContextArchiveService.js.map +1 -1
- package/dist/monolith/infrastructure/ai/context/ContextManager.js +142 -98
- package/dist/monolith/infrastructure/ai/context/ContextManager.js.map +1 -1
- package/dist/monolith/infrastructure/ai/core/MarieEngine.js +104 -556
- package/dist/monolith/infrastructure/ai/core/MarieEngine.js.map +1 -1
- package/dist/monolith/infrastructure/ai/core/MarieEventDispatcher.js +1 -37
- package/dist/monolith/infrastructure/ai/core/MarieEventDispatcher.js.map +1 -1
- package/dist/monolith/infrastructure/ai/core/MarieLockManager.js +30 -5
- package/dist/monolith/infrastructure/ai/core/MarieLockManager.js.map +1 -1
- package/dist/monolith/infrastructure/ai/core/MarieProgressTracker.js +176 -196
- package/dist/monolith/infrastructure/ai/core/MarieProgressTracker.js.map +1 -1
- package/dist/monolith/infrastructure/ai/core/MariePulseService.js +41 -7
- package/dist/monolith/infrastructure/ai/core/MariePulseService.js.map +1 -1
- package/dist/monolith/infrastructure/ai/core/MarieSanitizer.js +303 -63
- package/dist/monolith/infrastructure/ai/core/MarieSanitizer.js.map +1 -1
- package/dist/monolith/infrastructure/ai/core/MarieSemaphore.js +47 -4
- package/dist/monolith/infrastructure/ai/core/MarieSemaphore.js.map +1 -1
- package/dist/monolith/infrastructure/ai/core/MarieSession.js +95 -15
- package/dist/monolith/infrastructure/ai/core/MarieSession.js.map +1 -1
- package/dist/monolith/infrastructure/ai/core/MarieStabilityMonitor.js +21 -0
- package/dist/monolith/infrastructure/ai/core/MarieStabilityMonitor.js.map +1 -1
- package/dist/monolith/infrastructure/ai/core/MarieToolMender.js +12 -0
- package/dist/monolith/infrastructure/ai/core/MarieToolMender.js.map +1 -1
- package/dist/monolith/infrastructure/ai/core/MarieToolProcessor.js +339 -481
- package/dist/monolith/infrastructure/ai/core/MarieToolProcessor.js.map +1 -1
- package/dist/monolith/infrastructure/ai/core/MarieVitality.js +238 -0
- package/dist/monolith/infrastructure/ai/core/MarieVitality.js.map +1 -0
- package/dist/monolith/infrastructure/ai/core/ReasoningBudget.js +23 -12
- package/dist/monolith/infrastructure/ai/core/ReasoningBudget.js.map +1 -1
- package/dist/monolith/infrastructure/ai/core/SessionLogService.js +9 -2
- package/dist/monolith/infrastructure/ai/core/SessionLogService.js.map +1 -1
- package/dist/monolith/infrastructure/ai/providers/AIProvider.js +402 -1
- package/dist/monolith/infrastructure/ai/providers/AIProvider.js.map +1 -1
- package/dist/monolith/infrastructure/ai/providers/DreamBeesProvider.js +114 -0
- package/dist/monolith/infrastructure/ai/providers/DreamBeesProvider.js.map +1 -0
- package/dist/monolith/infrastructure/ai/providers/OpenRouterProvider.js +426 -370
- package/dist/monolith/infrastructure/ai/providers/OpenRouterProvider.js.map +1 -1
- package/dist/monolith/infrastructure/ai/providers/OpenRouterStreamParser.js +235 -241
- package/dist/monolith/infrastructure/ai/providers/OpenRouterStreamParser.js.map +1 -1
- package/dist/monolith/infrastructure/ai/workerAi.js +185 -0
- package/dist/monolith/infrastructure/ai/workerAi.js.map +1 -0
- package/dist/monolith/infrastructure/config/ConfigService.js +216 -359
- package/dist/monolith/infrastructure/config/ConfigService.js.map +1 -1
- package/dist/monolith/infrastructure/joy/CognitiveRituals.js +8 -0
- package/dist/monolith/infrastructure/joy/CognitiveRituals.js.map +1 -0
- package/dist/monolith/infrastructure/joy/JoyTools.js +23 -43
- package/dist/monolith/infrastructure/joy/JoyTools.js.map +1 -1
- package/dist/monolith/infrastructure/persistence/MarieMindAutonomics.js +4 -0
- package/dist/monolith/infrastructure/persistence/MarieMindAutonomics.js.map +1 -0
- package/dist/monolith/infrastructure/persistence/MarieMindEngine.js +11 -0
- package/dist/monolith/infrastructure/persistence/MarieMindEngine.js.map +1 -0
- package/dist/monolith/infrastructure/persistence/NoormmeAutonomics.js +135 -0
- package/dist/monolith/infrastructure/persistence/NoormmeAutonomics.js.map +1 -0
- package/dist/monolith/infrastructure/persistence/NoormmeEngine.js +523 -0
- package/dist/monolith/infrastructure/persistence/NoormmeEngine.js.map +1 -0
- package/dist/monolith/infrastructure/persistence/NoormmeSchema.js +179 -0
- package/dist/monolith/infrastructure/persistence/NoormmeSchema.js.map +1 -0
- package/dist/monolith/infrastructure/persistence/NoormmeSeeder.js +94 -0
- package/dist/monolith/infrastructure/persistence/NoormmeSeeder.js.map +1 -0
- package/dist/monolith/infrastructure/persistence/NoormmeTools.js +371 -0
- package/dist/monolith/infrastructure/persistence/NoormmeTools.js.map +1 -0
- package/dist/monolith/infrastructure/services/MarieMemoryStore.js +133 -134
- package/dist/monolith/infrastructure/services/MarieMemoryStore.js.map +1 -1
- package/dist/monolith/infrastructure/tools/MarieToolDefinitions.js +6 -1578
- package/dist/monolith/infrastructure/tools/MarieToolDefinitions.js.map +1 -1
- package/dist/monolith/infrastructure/tools/PureStreamParser.js +68 -80
- package/dist/monolith/infrastructure/tools/PureStreamParser.js.map +1 -1
- package/dist/monolith/infrastructure/tools/SharedToolDefinitions.js +12 -11
- package/dist/monolith/infrastructure/tools/SharedToolDefinitions.js.map +1 -1
- package/dist/monolith/infrastructure/tools/SovereignTools.js +326 -0
- package/dist/monolith/infrastructure/tools/SovereignTools.js.map +1 -0
- package/dist/monolith/infrastructure/tools/ToolRegistry.js +45 -26
- package/dist/monolith/infrastructure/tools/ToolRegistry.js.map +1 -1
- package/dist/monolith/infrastructure/tools/definitions/AnalysisTools.js +232 -0
- package/dist/monolith/infrastructure/tools/definitions/AnalysisTools.js.map +1 -0
- package/dist/monolith/infrastructure/tools/definitions/AutomationTools.js +274 -0
- package/dist/monolith/infrastructure/tools/definitions/AutomationTools.js.map +1 -0
- package/dist/monolith/infrastructure/tools/definitions/ContextTools.js +71 -0
- package/dist/monolith/infrastructure/tools/definitions/ContextTools.js.map +1 -0
- package/dist/monolith/infrastructure/tools/definitions/CoreTools.js +37 -0
- package/dist/monolith/infrastructure/tools/definitions/CoreTools.js.map +1 -0
- package/dist/monolith/infrastructure/tools/definitions/DiagnosticTools.js +154 -0
- package/dist/monolith/infrastructure/tools/definitions/DiagnosticTools.js.map +1 -0
- package/dist/monolith/infrastructure/tools/definitions/NavigationTools.js +197 -0
- package/dist/monolith/infrastructure/tools/definitions/NavigationTools.js.map +1 -0
- package/dist/monolith/infrastructure/tools/definitions/PlanningTools.js +300 -0
- package/dist/monolith/infrastructure/tools/definitions/PlanningTools.js.map +1 -0
- package/dist/monolith/plumbing/Plumbing.js +238 -0
- package/dist/monolith/plumbing/Plumbing.js.map +1 -0
- package/dist/monolith/plumbing/PlumbingAnalysis.js +109 -0
- package/dist/monolith/plumbing/PlumbingAnalysis.js.map +1 -0
- package/dist/monolith/plumbing/PlumbingSystem.js +169 -0
- package/dist/monolith/plumbing/PlumbingSystem.js.map +1 -0
- package/dist/monolith/plumbing/analysis/ComplexityService.js +30 -34
- package/dist/monolith/plumbing/analysis/ComplexityService.js.map +1 -1
- package/dist/monolith/plumbing/analysis/DependencyService.js +55 -44
- package/dist/monolith/plumbing/analysis/DependencyService.js.map +1 -1
- package/dist/monolith/plumbing/analysis/DiscoveryService.js +40 -42
- package/dist/monolith/plumbing/analysis/DiscoveryService.js.map +1 -1
- package/dist/monolith/plumbing/analysis/JoyMapService.js +52 -56
- package/dist/monolith/plumbing/analysis/JoyMapService.js.map +1 -1
- package/dist/monolith/plumbing/analysis/LintService.js +118 -118
- package/dist/monolith/plumbing/analysis/LintService.js.map +1 -1
- package/dist/monolith/plumbing/analysis/MarieSentinelService.js +278 -269
- package/dist/monolith/plumbing/analysis/MarieSentinelService.js.map +1 -1
- package/dist/monolith/plumbing/analysis/QualityGuardrailService.js +116 -114
- package/dist/monolith/plumbing/analysis/QualityGuardrailService.js.map +1 -1
- package/dist/monolith/plumbing/analysis/SurgicalMender.js +57 -59
- package/dist/monolith/plumbing/analysis/SurgicalMender.js.map +1 -1
- package/dist/monolith/plumbing/analysis/TestService.js +89 -89
- package/dist/monolith/plumbing/analysis/TestService.js.map +1 -1
- package/dist/monolith/plumbing/filesystem/FileService.js +123 -195
- package/dist/monolith/plumbing/filesystem/FileService.js.map +1 -1
- package/dist/monolith/plumbing/filesystem/PathResolver.js +7 -8
- package/dist/monolith/plumbing/filesystem/PathResolver.js.map +1 -1
- package/dist/monolith/plumbing/git/GitService.js +4 -4
- package/dist/monolith/plumbing/git/GitService.js.map +1 -1
- package/dist/monolith/plumbing/lsp/SymbolService.js +5 -34
- package/dist/monolith/plumbing/lsp/SymbolService.js.map +1 -1
- package/dist/monolith/plumbing/terminal/ProcessRegistry.js +20 -22
- package/dist/monolith/plumbing/terminal/ProcessRegistry.js.map +1 -1
- package/dist/monolith/plumbing/terminal/TerminalService.js +127 -136
- package/dist/monolith/plumbing/terminal/TerminalService.js.map +1 -1
- package/dist/monolith/plumbing/utils/EnvironmentUtils.js +3 -23
- package/dist/monolith/plumbing/utils/EnvironmentUtils.js.map +1 -1
- package/dist/monolith/plumbing/utils/JsonUtils.js +252 -311
- package/dist/monolith/plumbing/utils/JsonUtils.js.map +1 -1
- package/dist/monolith/plumbing/utils/MutexUtils.js.map +1 -1
- package/dist/monolith/plumbing/utils/PlumbingCore.js +549 -0
- package/dist/monolith/plumbing/utils/PlumbingCore.js.map +1 -0
- package/dist/monolith/plumbing/utils/PrefixTree.js +61 -114
- package/dist/monolith/plumbing/utils/PrefixTree.js.map +1 -1
- package/dist/monolith/plumbing/utils/StreamTagDetector.js +89 -127
- package/dist/monolith/plumbing/utils/StreamTagDetector.js.map +1 -1
- package/dist/monolith/plumbing/utils/StringUtils.js +87 -89
- package/dist/monolith/plumbing/utils/StringUtils.js.map +1 -1
- package/dist/monolith/runtime/MarieRuntime.js +76 -417
- package/dist/monolith/runtime/MarieRuntime.js.map +1 -1
- package/dist/monolith/runtime/RuntimeAdapterBase.js +1 -1
- package/dist/monolith/runtime/RuntimeAdapterBase.js.map +1 -1
- package/dist/monolith/runtime/providerFactory.js +1 -7
- package/dist/monolith/runtime/providerFactory.js.map +1 -1
- package/dist/monolith/services/HealthService.js +29 -32
- package/dist/monolith/services/HealthService.js.map +1 -1
- package/dist/monolith/services/JoyAutomationService.js +58 -95
- package/dist/monolith/services/JoyAutomationService.js.map +1 -1
- package/dist/monolith/services/MarieAutomationService.js +59 -0
- package/dist/monolith/services/MarieAutomationService.js.map +1 -0
- package/dist/monolith/services/MarieGhostService.js +46 -161
- package/dist/monolith/services/MarieGhostService.js.map +1 -1
- package/dist/monolith/services/MarieServices.js +102 -0
- package/dist/monolith/services/MarieServices.js.map +1 -0
- package/dist/monolith/services/MarieTypes.js +2 -0
- package/dist/monolith/services/MarieTypes.js.map +1 -0
- package/dist/monolith/services/UpdateService.js +47 -49
- package/dist/monolith/services/UpdateService.js.map +1 -1
- package/dist/prompts.js +11 -5
- package/dist/prompts.js.map +1 -1
- package/dist/test_prefix_tree.js +9 -9
- package/dist/test_prefix_tree.js.map +1 -1
- package/package.json +18 -88
- package/run_test.js +5 -0
- package/.marie_visual_verify_1771225696548/progress_bar_check.txt +0 -1
- package/dist/extension.cjs +0 -635
- package/dist/extension.js +0 -473
- package/dist/extension.js.map +0 -1
- package/dist/monolith/adapters/VscodeMarieAdapter.js +0 -81
- package/dist/monolith/adapters/VscodeMarieAdapter.js.map +0 -1
- package/dist/monolith/domain/joy/JoyTools.js +0 -535
- package/dist/monolith/domain/joy/JoyTools.js.map +0 -1
- package/dist/monolith/infrastructure/ai/agents/MarieYOLO.js +0 -207
- package/dist/monolith/infrastructure/ai/agents/MarieYOLO.js.map +0 -1
- package/dist/monolith/infrastructure/ai/core/GhostPort.js +0 -2
- package/dist/monolith/infrastructure/ai/core/GhostPort.js.map +0 -1
- package/dist/monolith/infrastructure/ai/core/MarieYOLOTypes.js +0 -2
- package/dist/monolith/infrastructure/ai/core/MarieYOLOTypes.js.map +0 -1
- package/dist/monolith/infrastructure/ai/core/VscodeFileSystemPort.js +0 -33
- package/dist/monolith/infrastructure/ai/core/VscodeFileSystemPort.js.map +0 -1
- package/dist/monolith/infrastructure/ai/providers/AnthropicProvider.js +0 -148
- package/dist/monolith/infrastructure/ai/providers/AnthropicProvider.js.map +0 -1
- package/dist/monolith/infrastructure/ai/providers/CerebrasProvider.js +0 -208
- package/dist/monolith/infrastructure/ai/providers/CerebrasProvider.js.map +0 -1
- package/dist/monolith/plumbing/ui/DecorationService.js +0 -54
- package/dist/monolith/plumbing/ui/DecorationService.js.map +0 -1
- package/dist/monolith/services/JoyLogService.js +0 -48
- package/dist/monolith/services/JoyLogService.js.map +0 -1
- package/dist/monolith/services/JoyService.js +0 -209
- package/dist/monolith/services/JoyService.js.map +0 -1
- package/dist/monolith/services/MarieSCMProvider.js +0 -41
- package/dist/monolith/services/MarieSCMProvider.js.map +0 -1
- package/dist/test_agent_stream_control_plane.js +0 -170
- package/dist/test_agent_stream_control_plane.js.map +0 -1
- package/dist/test_strategy_integration.js +0 -114
- package/dist/test_strategy_integration.js.map +0 -1
- package/dist/test_streaming_fragility.js +0 -191
- package/dist/test_streaming_fragility.js.map +0 -1
- package/dist/webview-ui/App.js +0 -16
- package/dist/webview-ui/App.js.map +0 -1
- package/dist/webview-ui/Providers.js +0 -6
- package/dist/webview-ui/Providers.js.map +0 -1
- package/dist/webview-ui/components/ApprovalPanel.js +0 -8
- package/dist/webview-ui/components/ApprovalPanel.js.map +0 -1
- package/dist/webview-ui/components/ChatPanel.js +0 -19
- package/dist/webview-ui/components/ChatPanel.js.map +0 -1
- package/dist/webview-ui/components/Composer.js +0 -19
- package/dist/webview-ui/components/Composer.js.map +0 -1
- package/dist/webview-ui/components/HeaderBar.js +0 -5
- package/dist/webview-ui/components/HeaderBar.js.map +0 -1
- package/dist/webview-ui/components/SessionList.js +0 -14
- package/dist/webview-ui/components/SessionList.js.map +0 -1
- package/dist/webview-ui/context/WebviewStateContext.js +0 -146
- package/dist/webview-ui/context/WebviewStateContext.js.map +0 -1
- package/dist/webview-ui/main.css +0 -1
- package/dist/webview-ui/main.js +0 -108
- package/dist/webview-ui/main.js.map +0 -1
- package/dist/webview-ui/types.js +0 -2
- package/dist/webview-ui/types.js.map +0 -1
- package/dist/webview-ui/vscode.js +0 -4
- package/dist/webview-ui/vscode.js.map +0 -1
- package/lint_output.txt +0 -705
- package/lint_output_v2.txt +0 -711
- package/marie-coder-0.1.16.vsix +0 -0
|
@@ -3,59 +3,96 @@ import { useState, useCallback } from "react";
|
|
|
3
3
|
import { Box, Text, useInput, useApp } from "ink";
|
|
4
4
|
import TextInput from "ink-text-input";
|
|
5
5
|
import { marieTheme } from "../styles/theme.js";
|
|
6
|
+
import { AgenticSpinner } from "./AgenticSpinner.js";
|
|
7
|
+
import { openrouterModels } from "../constants/SetupConstants.js";
|
|
6
8
|
const COMMANDS = [
|
|
7
9
|
{
|
|
8
|
-
label: "
|
|
10
|
+
label: "Incantations",
|
|
9
11
|
value: "/help",
|
|
10
|
-
description: "Show available
|
|
11
|
-
icon: "
|
|
12
|
+
description: "Show available incantations",
|
|
13
|
+
icon: "📖",
|
|
12
14
|
},
|
|
13
15
|
{
|
|
14
|
-
label: "
|
|
16
|
+
label: "Purge",
|
|
15
17
|
value: "/clear",
|
|
16
|
-
description: "
|
|
18
|
+
description: "Purge the scroll of history",
|
|
17
19
|
icon: "🧹",
|
|
18
20
|
},
|
|
19
21
|
{
|
|
20
|
-
label: "
|
|
22
|
+
label: "Manifest",
|
|
21
23
|
value: "/new",
|
|
22
|
-
description: "
|
|
23
|
-
icon: "
|
|
24
|
+
description: "Birth a fresh manifestation",
|
|
25
|
+
icon: "✨",
|
|
24
26
|
},
|
|
25
27
|
{
|
|
26
|
-
label: "
|
|
28
|
+
label: "Timeline",
|
|
27
29
|
value: "/sessions",
|
|
28
|
-
description: "
|
|
29
|
-
icon: "
|
|
30
|
+
description: "Traverse alternate timelines",
|
|
31
|
+
icon: "🕸️",
|
|
30
32
|
},
|
|
31
33
|
{
|
|
32
|
-
label: "
|
|
34
|
+
label: "Chronicle",
|
|
33
35
|
value: "/checkpoint",
|
|
34
|
-
description: "
|
|
35
|
-
icon: "
|
|
36
|
+
description: "Chronicle this timeline in git",
|
|
37
|
+
icon: "📜",
|
|
36
38
|
},
|
|
37
39
|
{
|
|
38
|
-
label: "
|
|
40
|
+
label: "Soul Mirror",
|
|
41
|
+
value: "/model",
|
|
42
|
+
description: "Switch the neural architecture",
|
|
43
|
+
icon: "🧠",
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
label: "Sovereignty",
|
|
39
47
|
value: "/autonomy",
|
|
40
|
-
description: "
|
|
48
|
+
description: "Tune the levels of agentic soul",
|
|
41
49
|
icon: "🤖",
|
|
42
50
|
},
|
|
43
51
|
{
|
|
44
|
-
label: "
|
|
52
|
+
label: "Rewind",
|
|
45
53
|
value: "/undo",
|
|
46
|
-
description: "
|
|
47
|
-
icon: "
|
|
54
|
+
description: "Rewind the fabric of reality",
|
|
55
|
+
icon: "⏪",
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
label: "Depart",
|
|
59
|
+
value: "/exit",
|
|
60
|
+
description: "Depart from this manifestation",
|
|
61
|
+
icon: "🌌",
|
|
48
62
|
},
|
|
49
|
-
{ label: "Exit", value: "/exit", description: "Exit Marie", icon: "👋" },
|
|
50
63
|
];
|
|
51
|
-
|
|
64
|
+
const MODEL_SUGGESTIONS = [
|
|
65
|
+
...openrouterModels
|
|
66
|
+
.filter((m) => m.value !== "custom")
|
|
67
|
+
.map((m) => ({
|
|
68
|
+
label: m.label,
|
|
69
|
+
value: `/model ${m.value}`,
|
|
70
|
+
description: m.description,
|
|
71
|
+
icon: "🧠",
|
|
72
|
+
})),
|
|
73
|
+
{
|
|
74
|
+
label: "✏️ Enter Custom Model ID",
|
|
75
|
+
value: "/model ",
|
|
76
|
+
description: "Type any OpenRouter model ID (e.g. anthropic/claude-3.7-sonnet)",
|
|
77
|
+
icon: "🧠",
|
|
78
|
+
},
|
|
79
|
+
];
|
|
80
|
+
export const InputArea = ({ onSubmit, isLoading, placeholder = "Whisper your intent to the muse...", suggestions = [], }) => {
|
|
52
81
|
const [input, setInput] = useState("");
|
|
53
82
|
const [showCommands, setShowCommands] = useState(false);
|
|
54
83
|
const [selectedCommand, setSelectedCommand] = useState(0);
|
|
55
84
|
const { exit } = useApp();
|
|
56
|
-
const
|
|
57
|
-
|
|
58
|
-
|
|
85
|
+
const isModelCmd = input.startsWith("/model ");
|
|
86
|
+
const filteredCommands = isModelCmd
|
|
87
|
+
? [
|
|
88
|
+
...MODEL_SUGGESTIONS.filter((m) => m.value !== "/model " &&
|
|
89
|
+
m.value.toLowerCase().startsWith(input.toLowerCase())),
|
|
90
|
+
// Always show the custom option if we're in /model mode and it's not an exact match of a hardcoded one
|
|
91
|
+
...MODEL_SUGGESTIONS.filter((m) => m.value === "/model "),
|
|
92
|
+
]
|
|
93
|
+
: input.startsWith("/")
|
|
94
|
+
? COMMANDS.filter((cmd) => cmd.value.startsWith(input.toLowerCase()))
|
|
95
|
+
: [];
|
|
59
96
|
useInput((char, key) => {
|
|
60
97
|
if (key.upArrow && showCommands) {
|
|
61
98
|
setSelectedCommand((prev) => Math.max(0, prev - 1));
|
|
@@ -69,8 +106,31 @@ export const InputArea = ({ onSubmit, isLoading, placeholder = "Type your messag
|
|
|
69
106
|
}
|
|
70
107
|
else if (key.return && !isLoading) {
|
|
71
108
|
if (showCommands && filteredCommands.length > 0) {
|
|
72
|
-
|
|
73
|
-
|
|
109
|
+
const selected = filteredCommands[selectedCommand].value;
|
|
110
|
+
if (isModelCmd || selected === "/model") {
|
|
111
|
+
// If we have typed something after "/model ", and the selected command is just "/model ",
|
|
112
|
+
// we should prefer the current input to allow custom models.
|
|
113
|
+
if (isModelCmd && selected === "/model " && input.trim().length > "/model ".length) {
|
|
114
|
+
onSubmit(input.trim());
|
|
115
|
+
setInput("");
|
|
116
|
+
setShowCommands(false);
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
119
|
+
setInput(selected + (selected === "/model" ? " " : ""));
|
|
120
|
+
// If we just selected a full /model [id], submit it
|
|
121
|
+
if (selected.startsWith("/model ") && selected !== "/model ") {
|
|
122
|
+
onSubmit(selected);
|
|
123
|
+
setInput("");
|
|
124
|
+
setShowCommands(false);
|
|
125
|
+
}
|
|
126
|
+
else {
|
|
127
|
+
setShowCommands(true);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
else {
|
|
131
|
+
setInput(selected + " ");
|
|
132
|
+
setShowCommands(false);
|
|
133
|
+
}
|
|
74
134
|
}
|
|
75
135
|
else if (input.trim()) {
|
|
76
136
|
onSubmit(input);
|
|
@@ -87,11 +147,18 @@ export const InputArea = ({ onSubmit, isLoading, placeholder = "Type your messag
|
|
|
87
147
|
setShowCommands(value.startsWith("/"));
|
|
88
148
|
setSelectedCommand(0);
|
|
89
149
|
}, []);
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
150
|
+
const borderColor = isLoading
|
|
151
|
+
? marieTheme.colors.warning
|
|
152
|
+
: input.startsWith("/")
|
|
153
|
+
? marieTheme.colors.secondary
|
|
154
|
+
: marieTheme.colors.primary;
|
|
155
|
+
const modeTag = input.startsWith("/") ? "[CMD]" : "[CHAT]";
|
|
156
|
+
return (_jsxs(Box, { flexDirection: "column", marginY: 0, children: [showCommands && filteredCommands.length > 0 && (_jsx(Box, { flexDirection: "column", paddingX: 1, paddingY: 0, borderStyle: "round", borderColor: marieTheme.colors.secondary, marginLeft: 2, marginBottom: 0, children: filteredCommands.map((cmd, index) => (_jsx(Box, { children: _jsxs(Text, { color: index === selectedCommand
|
|
94
157
|
? marieTheme.colors.primary
|
|
95
|
-
: marieTheme.colors.muted, children: [index === selectedCommand ? "
|
|
158
|
+
: marieTheme.colors.muted, bold: index === selectedCommand, children: [index === selectedCommand ? "❯ " : " ", cmd.icon, " ", cmd.value.padEnd(12), _jsxs(Text, { dimColor: true, italic: true, children: [" ", "- ", cmd.description] })] }) }, cmd.value))) })), _jsxs(Box, { borderStyle: "round", borderColor: borderColor, paddingX: 1, paddingY: 0, children: [_jsxs(Box, { flexGrow: 1, children: [_jsxs(Text, { color: borderColor, bold: true, children: [modeTag, " ", isLoading
|
|
159
|
+
? marieTheme.icons.spinner
|
|
160
|
+
: input.startsWith("/")
|
|
161
|
+
? "λ"
|
|
162
|
+
: marieTheme.icons.user, " "] }), isLoading ? (_jsx(Box, { flexGrow: 1, children: _jsx(AgenticSpinner, { prefix: "Marie is orchestrating reality... " }) })) : (_jsx(TextInput, { value: input, onChange: handleChange, placeholder: placeholder, focus: true }))] }), input.length > 0 && !isLoading && (_jsx(Box, { marginLeft: 1, children: _jsxs(Text, { color: marieTheme.colors.muted, dimColor: true, italic: true, children: [input.length, " intent tokens"] }) }))] })] }));
|
|
96
163
|
};
|
|
97
164
|
//# sourceMappingURL=InputArea.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputArea.js","sourceRoot":"","sources":["../../../src/cli-new/components/InputArea.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAC9C,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,KAAK,CAAC;AAClD,OAAO,SAAS,MAAM,gBAAgB,CAAC;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"InputArea.js","sourceRoot":"","sources":["../../../src/cli-new/components/InputArea.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAC9C,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,KAAK,CAAC;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
@@ -3,6 +3,7 @@ import { useMemo } from "react";
|
|
|
3
3
|
import { Box, Text, useStdout } from "ink";
|
|
4
4
|
import { marieTheme } from "../styles/theme.js";
|
|
5
5
|
import { ToolCallDisplay } from "./ToolCallDisplay.js";
|
|
6
|
+
import { AgenticSpinner } from "./AgenticSpinner.js";
|
|
6
7
|
// Format timestamp to readable time
|
|
7
8
|
function formatTime(timestamp) {
|
|
8
9
|
const date = new Date(timestamp);
|
|
@@ -53,7 +54,7 @@ function truncateContent(content, maxLines = 50) {
|
|
|
53
54
|
return {
|
|
54
55
|
lines: [
|
|
55
56
|
...lines.slice(0, maxLines),
|
|
56
|
-
"...
|
|
57
|
+
"🌀 ... the archives of history recede ... (Whisper /expand to reveal the forbidden scrolls)",
|
|
57
58
|
],
|
|
58
59
|
wasTruncated: true,
|
|
59
60
|
};
|
|
@@ -64,12 +65,17 @@ function formatContent(content) {
|
|
|
64
65
|
const codeBlockRegex = /```(\w+)?\n([\s\S]*?)```/g;
|
|
65
66
|
let lastIndex = 0;
|
|
66
67
|
let match;
|
|
68
|
+
if (!content)
|
|
69
|
+
return [{ type: "text", content: "" }];
|
|
67
70
|
while ((match = codeBlockRegex.exec(content)) !== null) {
|
|
68
71
|
if (match.index > lastIndex) {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
72
|
+
const text = content.slice(lastIndex, match.index).trim();
|
|
73
|
+
if (text) {
|
|
74
|
+
parts.push({
|
|
75
|
+
type: "text",
|
|
76
|
+
content: text,
|
|
77
|
+
});
|
|
78
|
+
}
|
|
73
79
|
}
|
|
74
80
|
parts.push({
|
|
75
81
|
type: "code",
|
|
@@ -79,10 +85,13 @@ function formatContent(content) {
|
|
|
79
85
|
lastIndex = match.index + match[0].length;
|
|
80
86
|
}
|
|
81
87
|
if (lastIndex < content.length) {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
88
|
+
const remaining = content.slice(lastIndex).trim();
|
|
89
|
+
if (remaining) {
|
|
90
|
+
parts.push({
|
|
91
|
+
type: "text",
|
|
92
|
+
content: remaining,
|
|
93
|
+
});
|
|
94
|
+
}
|
|
86
95
|
}
|
|
87
96
|
return parts.length > 0 ? parts : [{ type: "text", content }];
|
|
88
97
|
}
|
|
@@ -90,28 +99,28 @@ export const MessageBubble = ({ message, isStreaming, showTimestamp = true, }) =
|
|
|
90
99
|
const { stdout } = useStdout();
|
|
91
100
|
const isUser = message.role === "user";
|
|
92
101
|
const isSystem = message.role === "system";
|
|
93
|
-
const maxWidth = Math.max(20, stdout
|
|
102
|
+
const maxWidth = Math.max(20, (stdout?.columns || 80) - 8);
|
|
94
103
|
const contentParts = useMemo(() => formatContent(message.content), [message.content]);
|
|
95
104
|
const timeStr = showTimestamp ? formatTime(message.timestamp) : "";
|
|
96
105
|
if (isSystem) {
|
|
97
106
|
const wrappedLines = wrapText(message.content, maxWidth);
|
|
98
|
-
return (_jsx(Box, { marginY: 0, paddingY: 0, justifyContent: "center", children:
|
|
107
|
+
return (_jsx(Box, { marginY: 0, paddingY: 0, justifyContent: "center", width: "100%", children: _jsx(Box, { flexDirection: "column", alignItems: "center", children: wrappedLines.map((line, i) => (_jsx(Text, { color: marieTheme.colors.info, italic: true, dimColor: true, children: line || " " }, i))) }) }));
|
|
99
108
|
}
|
|
100
109
|
if (isUser) {
|
|
101
|
-
const wrappedLines = wrapText(message.content, maxWidth -
|
|
102
|
-
return (_jsxs(Box, { flexDirection: "column", marginTop:
|
|
110
|
+
const wrappedLines = wrapText(message.content, maxWidth - 4);
|
|
111
|
+
return (_jsxs(Box, { flexDirection: "column", marginTop: 1, marginBottom: 0, paddingX: 1, paddingY: 0, borderStyle: "single", borderColor: marieTheme.colors.primary, children: [_jsxs(Box, { justifyContent: "space-between", marginBottom: 0, children: [_jsx(Box, { children: _jsxs(Text, { bold: true, color: marieTheme.colors.primary, children: [marieTheme.icons.user, " Operator"] }) }), showTimestamp && (_jsx(Text, { color: marieTheme.colors.muted, dimColor: true, children: timeStr }))] }), _jsx(Box, { flexDirection: "column", marginTop: 0, paddingLeft: 1, children: wrappedLines.map((line, i) => (_jsx(Text, { color: marieTheme.colors.foreground, children: line || " " }, i))) })] }));
|
|
103
112
|
}
|
|
104
113
|
const streamingToolName = message.activeToolName;
|
|
105
114
|
const streamingToolBuffer = message.toolStreamingBuffer;
|
|
106
115
|
const activeFilePath = message.activeFilePath;
|
|
107
|
-
return (_jsxs(Box, { flexDirection: "column", marginTop:
|
|
116
|
+
return (_jsxs(Box, { flexDirection: "column", marginTop: 1, marginBottom: 0, paddingX: 1, borderStyle: "round", borderColor: marieTheme.colors.secondary, children: [_jsxs(Box, { justifyContent: "space-between", children: [_jsxs(Box, { children: [_jsxs(Text, { bold: true, color: marieTheme.colors.success, children: [marieTheme.icons.assistant, " Marie"] }), isStreaming && (_jsxs(Text, { color: marieTheme.colors.muted, children: [" ", marieTheme.icons.spinner] })), activeFilePath && (_jsxs(Text, { color: marieTheme.colors.info, dimColor: true, children: [" ", marieTheme.icons.file, " ", activeFilePath] }))] }), showTimestamp && (_jsx(Text, { color: marieTheme.colors.muted, dimColor: true, children: timeStr }))] }), _jsxs(Box, { flexDirection: "column", marginLeft: 1, children: [contentParts.map((part, partIndex) => {
|
|
108
117
|
if (part.type === "code") {
|
|
109
|
-
const codeLines = wrapText(part.content, maxWidth -
|
|
110
|
-
return (_jsxs(Box, { flexDirection: "column", marginY: 1, paddingX: 1, borderStyle: "single", borderColor: marieTheme.colors.
|
|
118
|
+
const codeLines = wrapText(part.content, maxWidth - 6);
|
|
119
|
+
return (_jsxs(Box, { flexDirection: "column", marginY: 1, paddingX: 1, borderStyle: "single", borderColor: marieTheme.colors.border, children: [part.language && (_jsx(Box, { marginBottom: 0, children: _jsx(Text, { color: marieTheme.colors.secondary, bold: true, dimColor: true, children: part.language.toUpperCase() }) })), codeLines.map((line, i) => (_jsx(Text, { color: marieTheme.colors.foreground, children: line || " " }, i)))] }, partIndex));
|
|
111
120
|
}
|
|
112
|
-
const textLines = wrapText(part.content, maxWidth -
|
|
113
|
-
return textLines.map((line, i) => (_jsx(Text, { color: marieTheme.colors.foreground, children: line || " " },
|
|
114
|
-
}), isStreaming && !streamingToolBuffer && (_jsx(Text, { color: marieTheme.colors.primary, children: "\u258A" })), isStreaming && streamingToolBuffer && (_jsxs(Box, { flexDirection: "column", marginY: 1, paddingX: 1, borderStyle: "single", borderColor: marieTheme.colors.warning, children: [_jsxs(Box, { children: [_jsxs(Text, { color: marieTheme.colors.warning, children: [marieTheme.icons.tool, " ", streamingToolName || "Executing Technique..."] }),
|
|
121
|
+
const textLines = wrapText(part.content, maxWidth - 4);
|
|
122
|
+
return (_jsx(Box, { flexDirection: "column", marginY: 0, children: textLines.map((line, i) => (_jsx(Text, { color: marieTheme.colors.foreground, children: line || " " }, i))) }, partIndex));
|
|
123
|
+
}), isStreaming && !streamingToolBuffer && (_jsx(Text, { color: marieTheme.colors.primary, children: "\u258A" })), isStreaming && streamingToolBuffer && (_jsxs(Box, { flexDirection: "column", marginY: 1, paddingX: 1, borderStyle: "single", borderColor: marieTheme.colors.warning, children: [_jsxs(Box, { children: [_jsxs(Text, { color: marieTheme.colors.warning, children: [marieTheme.icons.tool, " ", streamingToolName || "Executing Technique..."] }), _jsx(Text, { color: marieTheme.colors.muted, children: " " }), _jsx(AgenticSpinner, {})] }), _jsxs(Text, { color: marieTheme.colors.muted, dimColor: true, italic: true, children: [streamingToolBuffer.length > 200 ? "..." : "", streamingToolBuffer.slice(-200)] })] }))] }), message.toolCalls &&
|
|
115
124
|
message.toolCalls.map((tool) => (_jsx(ToolCallDisplay, { tool: tool }, tool.id)))] }));
|
|
116
125
|
};
|
|
117
126
|
//# sourceMappingURL=MessageBubble.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MessageBubble.js","sourceRoot":"","sources":["../../../src/cli-new/components/MessageBubble.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;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mB,IAAI,CACrC,MAAC,GAAG,IACF,aAAa,EAAC,QAAQ,EACtB,OAAO,EAAE,CAAC,EACV,QAAQ,EAAE,CAAC,EACX,WAAW,EAAC,QAAQ,EACpB,WAAW,EAAE,UAAU,CAAC,MAAM,CAAC,OAAO,aAEtC,MAAC,GAAG,eACF,MAAC,IAAI,IAAC,KAAK,EAAE,UAAU,CAAC,MAAM,CAAC,OAAO,aACnC,UAAU,CAAC,KAAK,CAAC,IAAI,EAAE,GAAG,EAC1B,iBAAiB,IAAI,wBAAwB,IACzC,EACP,KAAC,IAAI,IAAC,KAAK,EAAE,UAAU,CAAC,MAAM,CAAC,KAAK,kBAAU,EAC9C,KAAC,cAAc,KAAG,IACd,EACN,MAAC,IAAI,IAAC,KAAK,EAAE,UAAU,CAAC,MAAM,CAAC,KAAK,EAAE,QAAQ,QAAC,MAAM,mBAClD,mBAAmB,CAAC,MAAM,GAAG,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAC7C,mBAAmB,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,IAC3B,IACH,CACP,IACG,EAEL,OAAO,CAAC,SAAS;gBAChB,OAAO,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAC9B,KAAC,eAAe,IAAe,IAAI,EAAE,IAAI,IAAnB,IAAI,CAAC,EAAE,CAAgB,CAC9C,CAAC,IACA,CACP,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -14,13 +14,10 @@ export const SessionSwitcher = ({ sessions, currentSessionId, onSelect, onCreate
|
|
|
14
14
|
return 1;
|
|
15
15
|
return b.lastModified - a.lastModified;
|
|
16
16
|
});
|
|
17
|
-
const items = [
|
|
18
|
-
{
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
value: s.id,
|
|
22
|
-
})),
|
|
23
|
-
];
|
|
17
|
+
const items = [{ label: "✨ Birth New Timeline", value: "__new__" }].concat(sortedSessions.map((s) => ({
|
|
18
|
+
label: `${s.isPinned ? "⭐ " : " "}${s.title}${s.id === currentSessionId ? " (current)" : ""}`,
|
|
19
|
+
value: s.id,
|
|
20
|
+
})));
|
|
24
21
|
useInput((input, key) => {
|
|
25
22
|
if (key.escape || (input === "q" && mode === "list")) {
|
|
26
23
|
onClose();
|
|
@@ -37,9 +34,9 @@ export const SessionSwitcher = ({ sessions, currentSessionId, onSelect, onCreate
|
|
|
37
34
|
}
|
|
38
35
|
};
|
|
39
36
|
if (mode === "confirm-delete" && sessionToDelete) {
|
|
40
|
-
return (_jsxs(Box, { flexDirection: "column", borderStyle: "single", borderColor: marieTheme.colors.error, paddingX: 1, children: [_jsx(Text, { color: marieTheme.colors.error, bold: true, children: "
|
|
37
|
+
return (_jsxs(Box, { flexDirection: "column", borderStyle: "single", borderColor: marieTheme.colors.error, paddingX: 1, children: [_jsx(Text, { color: marieTheme.colors.error, bold: true, children: "Sever this memory thread?" }), _jsx(Text, { color: marieTheme.colors.muted, children: "This action cannot be undone." }), _jsxs(Box, { marginTop: 0, gap: 2, children: [_jsx(Text, { color: marieTheme.colors.error, children: "y - Yes, delete" }), _jsx(Text, { color: marieTheme.colors.muted, children: "n - Cancel" })] })] }));
|
|
41
38
|
}
|
|
42
|
-
return (_jsxs(Box, { flexDirection: "column", borderStyle: "single", borderColor: marieTheme.colors.primary, paddingX: 1, children: [_jsx(Box, { marginBottom: 0, children:
|
|
39
|
+
return (_jsxs(Box, { flexDirection: "column", borderStyle: "single", borderColor: marieTheme.colors.primary, paddingX: 1, children: [_jsx(Box, { marginBottom: 0, children: _jsx(Text, { color: marieTheme.colors.primary, bold: true, children: "\uD83D\uDD78\uFE0F Memory Weaver" }) }), _jsx(Text, { color: marieTheme.colors.muted, dimColor: true, children: "\u2191\u2193 Navigate \u2022 Enter Select \u2022 D Delete \u2022 P Pin \u2022 R Rename \u2022 Q Quit" }), _jsx(Box, { marginTop: 0, children: _jsx(SelectInput, { items: items, onSelect: handleSelect, indicatorComponent: ({ isSelected }) => (_jsx(Text, { color: isSelected ? marieTheme.colors.primary : marieTheme.colors.muted, children: isSelected ? "▸ " : " " })), itemComponent: ({ isSelected, label }) => (_jsx(Text, { color: isSelected
|
|
43
40
|
? marieTheme.colors.foreground
|
|
44
41
|
: marieTheme.colors.muted, children: label })) }) })] }));
|
|
45
42
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SessionSwitcher.js","sourceRoot":"","sources":["../../../src/cli-new/components/SessionSwitcher.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAC;AAC1C,OAAO,WAAW,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAchD,MAAM,CAAC,MAAM,eAAe,GAAmC,CAAC,EAC9D,QAAQ,EACR,gBAAgB,EAChB,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,WAAW,EACX,OAAO,GACR,EAAE,EAAE;IACH,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,QAAQ,CAA4B,MAAM,CAAC,CAAC;IACpE,MAAM,CAAC,eAAe,EAAE,kBAAkB,CAAC,GAAG,QAAQ,CAAgB,IAAI,CAAC,CAAC;IAE5E,qDAAqD;IACrD,MAAM,cAAc,GAAG,CAAC,GAAG,QAAQ,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;QACjD,IAAI,CAAC,CAAC,QAAQ,IAAI,CAAC,CAAC,CAAC,QAAQ;YAAE,OAAO,CAAC,CAAC,CAAC;QACzC,IAAI,CAAC,CAAC,CAAC,QAAQ,IAAI,CAAC,CAAC,QAAQ;YAAE,OAAO,CAAC,CAAC;QACxC,OAAO,CAAC,CAAC,YAAY,GAAG,CAAC,CAAC,YAAY,CAAC;IACzC,CAAC,CAAC,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