dexto 1.4.0 → 1.5.1
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 +62 -7
- package/dist/agents/agent-template.yml +2 -2
- package/dist/agents/coding-agent/coding-agent.yml +22 -16
- package/dist/agents/database-agent/database-agent.yml +2 -2
- package/dist/agents/default-agent.yml +7 -5
- package/dist/agents/github-agent/github-agent.yml +2 -2
- package/dist/agents/product-name-researcher/product-name-researcher.yml +2 -2
- package/dist/agents/talk2pdf-agent/talk2pdf-agent.yml +2 -2
- package/dist/analytics/events.d.ts +13 -6
- package/dist/analytics/events.d.ts.map +1 -1
- package/dist/analytics/index.d.ts +1 -1
- package/dist/analytics/index.d.ts.map +1 -1
- package/dist/analytics/index.js +6 -2
- package/dist/api/server-hono.d.ts.map +1 -1
- package/dist/api/server-hono.js +27 -5
- package/dist/cli/cli-subscriber.d.ts +4 -0
- package/dist/cli/cli-subscriber.d.ts.map +1 -1
- package/dist/cli/cli-subscriber.js +40 -2
- package/dist/cli/commands/create-app.d.ts +16 -14
- package/dist/cli/commands/create-app.d.ts.map +1 -1
- package/dist/cli/commands/create-app.js +626 -102
- package/dist/cli/commands/create-image.d.ts +7 -0
- package/dist/cli/commands/create-image.d.ts.map +1 -0
- package/dist/cli/commands/create-image.js +201 -0
- package/dist/cli/commands/helpers/formatters.js +7 -7
- package/dist/cli/commands/index.d.ts +2 -1
- package/dist/cli/commands/index.d.ts.map +1 -1
- package/dist/cli/commands/index.js +2 -1
- package/dist/cli/commands/init-app.js +7 -7
- package/dist/cli/commands/install.d.ts +0 -3
- package/dist/cli/commands/install.d.ts.map +1 -1
- package/dist/cli/commands/install.js +10 -35
- package/dist/cli/commands/interactive-commands/command-parser.d.ts +1 -1
- package/dist/cli/commands/interactive-commands/command-parser.d.ts.map +1 -1
- package/dist/cli/commands/interactive-commands/command-parser.js +18 -8
- package/dist/cli/commands/interactive-commands/general-commands.d.ts.map +1 -1
- package/dist/cli/commands/interactive-commands/general-commands.js +64 -1
- package/dist/cli/commands/interactive-commands/prompt-commands.js +11 -11
- package/dist/cli/commands/interactive-commands/system/system-commands.d.ts.map +1 -1
- package/dist/cli/commands/interactive-commands/system/system-commands.js +6 -5
- package/dist/cli/commands/list-agents.js +2 -2
- package/dist/cli/commands/session-commands.js +16 -16
- package/dist/cli/commands/setup.d.ts +13 -5
- package/dist/cli/commands/setup.d.ts.map +1 -1
- package/dist/cli/commands/setup.js +995 -65
- package/dist/cli/commands/which.js +1 -1
- package/dist/cli/ink-cli/components/ApprovalPrompt.d.ts +2 -0
- package/dist/cli/ink-cli/components/ApprovalPrompt.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/ApprovalPrompt.js +29 -7
- package/dist/cli/ink-cli/components/CustomInput.js +1 -1
- package/dist/cli/ink-cli/components/EditableMultiLineInput.js +4 -4
- package/dist/cli/ink-cli/components/ElicitationForm.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/ElicitationForm.js +6 -6
- package/dist/cli/ink-cli/components/ErrorBoundary.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/ErrorBoundary.js +1 -1
- package/dist/cli/ink-cli/components/Footer.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/Footer.js +1 -1
- package/dist/cli/ink-cli/components/HistorySearchBar.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/HistorySearchBar.js +1 -1
- package/dist/cli/ink-cli/components/MultiLineInput.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/MultiLineInput.js +3 -3
- package/dist/cli/ink-cli/components/ResourceAutocomplete.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/ResourceAutocomplete.js +4 -4
- package/dist/cli/ink-cli/components/SlashCommandAutocomplete.js +3 -3
- package/dist/cli/ink-cli/components/StatusBar.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/StatusBar.js +7 -5
- package/dist/cli/ink-cli/components/TextBufferInput.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/TextBufferInput.js +13 -9
- package/dist/cli/ink-cli/components/base/BaseAutocomplete.js +4 -4
- package/dist/cli/ink-cli/components/base/BaseSelector.js +2 -2
- package/dist/cli/ink-cli/components/chat/Footer.js +1 -1
- package/dist/cli/ink-cli/components/chat/Header.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/chat/Header.js +2 -4
- package/dist/cli/ink-cli/components/chat/MessageItem.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/chat/MessageItem.js +9 -6
- package/dist/cli/ink-cli/components/chat/MessageList.js +1 -1
- package/dist/cli/ink-cli/components/chat/QueuedMessagesDisplay.js +1 -1
- package/dist/cli/ink-cli/components/chat/ToolIcon.d.ts +1 -1
- package/dist/cli/ink-cli/components/chat/ToolIcon.js +4 -4
- package/dist/cli/ink-cli/components/chat/styled-boxes/ConfigBox.js +1 -1
- package/dist/cli/ink-cli/components/chat/styled-boxes/HelpBox.js +1 -1
- package/dist/cli/ink-cli/components/chat/styled-boxes/LogConfigBox.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/chat/styled-boxes/LogConfigBox.js +2 -2
- package/dist/cli/ink-cli/components/chat/styled-boxes/SessionHistoryBox.js +5 -5
- package/dist/cli/ink-cli/components/chat/styled-boxes/SessionListBox.js +2 -2
- package/dist/cli/ink-cli/components/chat/styled-boxes/ShortcutsBox.js +1 -1
- package/dist/cli/ink-cli/components/chat/styled-boxes/StatsBox.js +1 -1
- package/dist/cli/ink-cli/components/chat/styled-boxes/StyledBox.js +2 -2
- package/dist/cli/ink-cli/components/modes/AlternateBufferCLI.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/modes/AlternateBufferCLI.js +1 -1
- package/dist/cli/ink-cli/components/modes/StaticCLI.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/modes/StaticCLI.js +1 -1
- package/dist/cli/ink-cli/components/overlays/ApiKeyInput.js +1 -1
- package/dist/cli/ink-cli/components/overlays/CustomModelWizard.d.ts +10 -2
- package/dist/cli/ink-cli/components/overlays/CustomModelWizard.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/overlays/CustomModelWizard.js +209 -89
- package/dist/cli/ink-cli/components/overlays/LogLevelSelector.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/overlays/LogLevelSelector.js +2 -2
- package/dist/cli/ink-cli/components/overlays/McpAddChoice.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/overlays/McpAddChoice.js +1 -1
- package/dist/cli/ink-cli/components/overlays/McpAddSelector.js +1 -1
- package/dist/cli/ink-cli/components/overlays/McpCustomTypeSelector.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/overlays/McpCustomTypeSelector.js +2 -2
- package/dist/cli/ink-cli/components/overlays/McpCustomWizard.js +1 -1
- package/dist/cli/ink-cli/components/overlays/McpRemoveSelector.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/overlays/McpRemoveSelector.js +1 -1
- package/dist/cli/ink-cli/components/overlays/McpSelector.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/overlays/McpSelector.js +1 -1
- package/dist/cli/ink-cli/components/overlays/McpServerActions.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/overlays/McpServerActions.js +2 -2
- package/dist/cli/ink-cli/components/overlays/McpServerList.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/overlays/McpServerList.js +1 -1
- package/dist/cli/ink-cli/components/overlays/ModelSelectorRefactored.d.ts +6 -5
- package/dist/cli/ink-cli/components/overlays/ModelSelectorRefactored.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/overlays/ModelSelectorRefactored.js +284 -68
- package/dist/cli/ink-cli/components/overlays/PromptAddChoice.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/overlays/PromptAddChoice.js +2 -2
- package/dist/cli/ink-cli/components/overlays/PromptAddWizard.js +1 -1
- package/dist/cli/ink-cli/components/overlays/PromptDeleteSelector.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/overlays/PromptDeleteSelector.js +2 -2
- package/dist/cli/ink-cli/components/overlays/PromptList.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/overlays/PromptList.js +2 -2
- package/dist/cli/ink-cli/components/overlays/SearchOverlay.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/overlays/SearchOverlay.js +4 -4
- package/dist/cli/ink-cli/components/overlays/SessionSubcommandSelector.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/overlays/SessionSubcommandSelector.js +1 -1
- package/dist/cli/ink-cli/components/overlays/StreamSelector.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/overlays/StreamSelector.js +1 -1
- package/dist/cli/ink-cli/components/overlays/ToolBrowser.js +12 -12
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/LocalModelWizard.d.ts +25 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/LocalModelWizard.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/LocalModelWizard.js +609 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/index.d.ts +15 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/index.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/index.js +14 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/provider-config.d.ts +33 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/provider-config.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/provider-config.js +462 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/ApiKeyStep.d.ts +25 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/ApiKeyStep.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/ApiKeyStep.js +29 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/ProviderSelector.d.ts +17 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/ProviderSelector.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/ProviderSelector.js +11 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/SetupInfoBanner.d.ts +20 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/SetupInfoBanner.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/SetupInfoBanner.js +10 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/WizardStepInput.d.ts +30 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/WizardStepInput.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/WizardStepInput.js +13 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/index.d.ts +8 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/index.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/shared/index.js +7 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/types.d.ts +85 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/types.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/custom-model-wizard/types.js +38 -0
- package/dist/cli/ink-cli/components/renderers/DiffRenderer.js +2 -2
- package/dist/cli/ink-cli/components/renderers/FilePreviewRenderer.js +1 -1
- package/dist/cli/ink-cli/components/renderers/FileRenderer.js +4 -4
- package/dist/cli/ink-cli/components/renderers/GenericRenderer.js +2 -2
- package/dist/cli/ink-cli/components/renderers/SearchRenderer.js +1 -1
- package/dist/cli/ink-cli/components/renderers/ShellRenderer.js +3 -3
- package/dist/cli/ink-cli/components/renderers/diff-shared.js +1 -1
- package/dist/cli/ink-cli/components/shared/MarkdownText.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/shared/MarkdownText.js +8 -6
- package/dist/cli/ink-cli/containers/InputContainer.d.ts.map +1 -1
- package/dist/cli/ink-cli/containers/InputContainer.js +23 -1
- package/dist/cli/ink-cli/containers/OverlayContainer.d.ts.map +1 -1
- package/dist/cli/ink-cli/containers/OverlayContainer.js +81 -25
- package/dist/cli/ink-cli/hooks/useAgentEvents.d.ts +9 -2
- package/dist/cli/ink-cli/hooks/useAgentEvents.d.ts.map +1 -1
- package/dist/cli/ink-cli/hooks/useAgentEvents.js +148 -6
- package/dist/cli/ink-cli/hooks/useCLIState.d.ts +1 -1
- package/dist/cli/ink-cli/hooks/useCLIState.d.ts.map +1 -1
- package/dist/cli/ink-cli/hooks/useCLIState.js +7 -2
- package/dist/cli/ink-cli/hooks/useTokenCounter.d.ts +11 -7
- package/dist/cli/ink-cli/hooks/useTokenCounter.d.ts.map +1 -1
- package/dist/cli/ink-cli/hooks/useTokenCounter.js +41 -18
- package/dist/cli/ink-cli/services/processStream.d.ts.map +1 -1
- package/dist/cli/ink-cli/services/processStream.js +97 -17
- package/dist/cli/ink-cli/state/types.d.ts +5 -4
- package/dist/cli/ink-cli/state/types.d.ts.map +1 -1
- package/dist/cli/ink-cli/utils/messageFormatting.d.ts +5 -0
- package/dist/cli/ink-cli/utils/messageFormatting.d.ts.map +1 -1
- package/dist/cli/ink-cli/utils/messageFormatting.js +59 -1
- package/dist/cli/ink-cli/utils/toolUtils.d.ts.map +1 -1
- package/dist/cli/ink-cli/utils/toolUtils.js +2 -0
- package/dist/cli/utils/api-key-setup.d.ts +54 -4
- package/dist/cli/utils/api-key-setup.d.ts.map +1 -1
- package/dist/cli/utils/api-key-setup.js +433 -107
- package/dist/cli/utils/api-key-verification.d.ts +17 -0
- package/dist/cli/utils/api-key-verification.d.ts.map +1 -0
- package/dist/cli/utils/api-key-verification.js +211 -0
- package/dist/cli/utils/config-validation.d.ts +22 -2
- package/dist/cli/utils/config-validation.d.ts.map +1 -1
- package/dist/cli/utils/config-validation.js +354 -25
- package/dist/cli/utils/local-model-setup.d.ts +46 -0
- package/dist/cli/utils/local-model-setup.d.ts.map +1 -0
- package/dist/cli/utils/local-model-setup.js +662 -0
- package/dist/cli/utils/options.js +1 -1
- package/dist/cli/utils/prompt-helpers.d.ts +47 -0
- package/dist/cli/utils/prompt-helpers.d.ts.map +1 -0
- package/dist/cli/utils/prompt-helpers.js +66 -0
- package/dist/cli/utils/provider-setup.d.ts +66 -8
- package/dist/cli/utils/provider-setup.d.ts.map +1 -1
- package/dist/cli/utils/provider-setup.js +324 -84
- package/dist/cli/utils/scaffolding-utils.d.ts +76 -0
- package/dist/cli/utils/scaffolding-utils.d.ts.map +1 -0
- package/dist/cli/utils/scaffolding-utils.js +246 -0
- package/dist/cli/utils/setup-utils.d.ts +16 -0
- package/dist/cli/utils/setup-utils.d.ts.map +1 -1
- package/dist/cli/utils/setup-utils.js +72 -21
- package/dist/cli/utils/template-engine.d.ts +65 -0
- package/dist/cli/utils/template-engine.d.ts.map +1 -0
- package/dist/cli/utils/template-engine.js +1089 -0
- package/dist/config/cli-overrides.d.ts +44 -1
- package/dist/config/cli-overrides.d.ts.map +1 -1
- package/dist/config/cli-overrides.js +102 -0
- package/dist/index.js +339 -56
- package/dist/webui/assets/index-8j-KMkX1.js +2054 -0
- package/dist/webui/assets/index-c_AX24V4.css +1 -0
- package/dist/webui/index.html +3 -9
- package/dist/webui/logos/aws-color.svg +1 -0
- package/dist/webui/logos/dexto/dexto_logo.svg +1 -1
- package/dist/webui/logos/dexto/dexto_logo_light.svg +6 -6
- package/dist/webui/logos/glama.svg +7 -0
- package/dist/webui/logos/litellm.svg +7 -0
- package/dist/webui/logos/openrouter.svg +1 -0
- package/package.json +8 -7
- package/dist/webui/assets/index-BkwPkZpd.css +0 -1
- package/dist/webui/assets/index-D9u1XfyH.js +0 -2025
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { jsxs as _jsxs, jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { Box, Text } from 'ink';
|
|
3
|
+
/**
|
|
4
|
+
* Renders a wizard step with:
|
|
5
|
+
* - Step label and placeholder text
|
|
6
|
+
* - Text input field with cursor
|
|
7
|
+
* - Error message (if any)
|
|
8
|
+
* - Validation/saving indicators
|
|
9
|
+
*/
|
|
10
|
+
export function WizardStepInput({ step, currentInput, error, isValidating, isSaving, additionalContent, }) {
|
|
11
|
+
return (_jsxs(_Fragment, { children: [_jsxs(Box, { flexDirection: "column", children: [_jsxs(Text, { bold: true, children: [step.label, ":"] }), _jsx(Text, { color: "gray", children: step.placeholder }), additionalContent] }), _jsxs(Box, { marginTop: 1, children: [_jsx(Text, { color: "cyan", children: "> " }), _jsx(Text, { children: currentInput }), _jsx(Text, { color: "cyan", children: "_" })] }), error && (_jsx(Box, { marginTop: 1, children: _jsx(Text, { color: "red", children: error }) })), isValidating && (_jsx(Box, { marginTop: 1, children: _jsx(Text, { color: "yellowBright", children: "Validating model..." }) })), isSaving && (_jsx(Box, { marginTop: 1, children: _jsx(Text, { color: "yellowBright", children: "Saving..." }) }))] }));
|
|
12
|
+
}
|
|
13
|
+
export default WizardStepInput;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared components for the CustomModelWizard.
|
|
3
|
+
*/
|
|
4
|
+
export { ApiKeyStep, getProviderEnvVar, hasApiKeyConfigured } from './ApiKeyStep.js';
|
|
5
|
+
export { SetupInfoBanner } from './SetupInfoBanner.js';
|
|
6
|
+
export { WizardStepInput } from './WizardStepInput.js';
|
|
7
|
+
export { ProviderSelector } from './ProviderSelector.js';
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/cli/ink-cli/components/overlays/custom-model-wizard/shared/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACrF,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared components for the CustomModelWizard.
|
|
3
|
+
*/
|
|
4
|
+
export { ApiKeyStep, getProviderEnvVar, hasApiKeyConfigured } from './ApiKeyStep.js';
|
|
5
|
+
export { SetupInfoBanner } from './SetupInfoBanner.js';
|
|
6
|
+
export { WizardStepInput } from './WizardStepInput.js';
|
|
7
|
+
export { ProviderSelector } from './ProviderSelector.js';
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared types for the CustomModelWizard component architecture.
|
|
3
|
+
*/
|
|
4
|
+
import type { CustomModel, CustomModelProvider } from '@dexto/agent-management';
|
|
5
|
+
import type { Key } from '../../../hooks/useInputOrchestrator.js';
|
|
6
|
+
/**
|
|
7
|
+
* A single step in the wizard flow.
|
|
8
|
+
*/
|
|
9
|
+
export interface WizardStep {
|
|
10
|
+
field: string;
|
|
11
|
+
label: string;
|
|
12
|
+
placeholder: string;
|
|
13
|
+
required: boolean;
|
|
14
|
+
validate?: (value: string) => string | null;
|
|
15
|
+
/**
|
|
16
|
+
* Optional condition to determine if this step should be shown.
|
|
17
|
+
* Takes the current accumulated values and returns true if the step should be shown.
|
|
18
|
+
* If omitted, the step is always shown.
|
|
19
|
+
*/
|
|
20
|
+
condition?: (values: Record<string, string>) => boolean;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Props passed to each provider-specific wizard component.
|
|
24
|
+
*/
|
|
25
|
+
export interface ProviderWizardProps {
|
|
26
|
+
/** Current accumulated values from all steps */
|
|
27
|
+
values: Record<string, string>;
|
|
28
|
+
/** Current step index within the provider's steps */
|
|
29
|
+
currentStep: number;
|
|
30
|
+
/** Current text input value */
|
|
31
|
+
currentInput: string;
|
|
32
|
+
/** Validation error message (if any) */
|
|
33
|
+
error: string | null;
|
|
34
|
+
/** Whether async validation is in progress */
|
|
35
|
+
isValidating: boolean;
|
|
36
|
+
/** Whether the model is being saved */
|
|
37
|
+
isSaving: boolean;
|
|
38
|
+
/** Whether we're editing an existing model */
|
|
39
|
+
isEditing: boolean;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Handle returned by provider components for input handling.
|
|
43
|
+
*/
|
|
44
|
+
export interface ProviderWizardHandle {
|
|
45
|
+
/** Handle keyboard input. Returns true if handled. */
|
|
46
|
+
handleInput: (input: string, key: Key) => boolean;
|
|
47
|
+
/** Get the steps for this provider */
|
|
48
|
+
getSteps: () => WizardStep[];
|
|
49
|
+
/** Get current step config */
|
|
50
|
+
getCurrentStepConfig: () => WizardStep | undefined;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Configuration for a custom model provider.
|
|
54
|
+
*/
|
|
55
|
+
export interface ProviderConfig {
|
|
56
|
+
/** Display name shown in provider selector */
|
|
57
|
+
displayName: string;
|
|
58
|
+
/** Short description of the provider */
|
|
59
|
+
description: string;
|
|
60
|
+
/** Wizard steps for this provider */
|
|
61
|
+
steps: WizardStep[];
|
|
62
|
+
/** Build a CustomModel from accumulated values */
|
|
63
|
+
buildModel: (values: Record<string, string>, provider: CustomModelProvider) => CustomModel;
|
|
64
|
+
/** Optional async validation for specific fields */
|
|
65
|
+
asyncValidation?: {
|
|
66
|
+
field: string;
|
|
67
|
+
validate: (value: string) => Promise<string | null>;
|
|
68
|
+
};
|
|
69
|
+
/** Whether this provider needs a setup info banner */
|
|
70
|
+
setupInfo?: {
|
|
71
|
+
title: string;
|
|
72
|
+
description: string;
|
|
73
|
+
docsUrl?: string;
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Common validation functions
|
|
78
|
+
*/
|
|
79
|
+
export declare const validators: {
|
|
80
|
+
required: (label: string) => (v: string) => string | null;
|
|
81
|
+
url: (v: string) => "URL is required" | "Invalid URL format" | "URL must use http:// or https://" | null;
|
|
82
|
+
positiveNumber: (v: string) => "Must be a positive number" | null;
|
|
83
|
+
slashFormat: (v: string) => "Model ID is required" | "Must use format: provider/model-name" | null;
|
|
84
|
+
};
|
|
85
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/cli/ink-cli/components/overlays/custom-model-wizard/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAChF,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,wCAAwC,CAAC;AAElE;;GAEG;AACH,MAAM,WAAW,UAAU;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,GAAG,IAAI,CAAC;IAC5C;;;;OAIG;IACH,SAAS,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,OAAO,CAAC;CAC3D;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAChC,gDAAgD;IAChD,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC/B,qDAAqD;IACrD,WAAW,EAAE,MAAM,CAAC;IACpB,+BAA+B;IAC/B,YAAY,EAAE,MAAM,CAAC;IACrB,wCAAwC;IACxC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,8CAA8C;IAC9C,YAAY,EAAE,OAAO,CAAC;IACtB,uCAAuC;IACvC,QAAQ,EAAE,OAAO,CAAC;IAClB,8CAA8C;IAC9C,SAAS,EAAE,OAAO,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACjC,sDAAsD;IACtD,WAAW,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,KAAK,OAAO,CAAC;IAClD,sCAAsC;IACtC,QAAQ,EAAE,MAAM,UAAU,EAAE,CAAC;IAC7B,8BAA8B;IAC9B,oBAAoB,EAAE,MAAM,UAAU,GAAG,SAAS,CAAC;CACtD;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC3B,8CAA8C;IAC9C,WAAW,EAAE,MAAM,CAAC;IACpB,wCAAwC;IACxC,WAAW,EAAE,MAAM,CAAC;IACpB,qCAAqC;IACrC,KAAK,EAAE,UAAU,EAAE,CAAC;IACpB,kDAAkD;IAClD,UAAU,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,QAAQ,EAAE,mBAAmB,KAAK,WAAW,CAAC;IAC3F,oDAAoD;IACpD,eAAe,CAAC,EAAE;QACd,KAAK,EAAE,MAAM,CAAC;QACd,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;KACvD,CAAC;IACF,sDAAsD;IACtD,SAAS,CAAC,EAAE;QACR,KAAK,EAAE,MAAM,CAAC;QACd,WAAW,EAAE,MAAM,CAAC;QACpB,OAAO,CAAC,EAAE,MAAM,CAAC;KACpB,CAAC;CACL;AAED;;GAEG;AACH,eAAO,MAAM,UAAU;sBACD,MAAM,MAAM,GAAG,MAAM;aAE9B,MAAM;wBAaK,MAAM;qBAOT,MAAM;CAK1B,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared types for the CustomModelWizard component architecture.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Common validation functions
|
|
6
|
+
*/
|
|
7
|
+
export const validators = {
|
|
8
|
+
required: (label) => (v) => (v.trim() ? null : `${label} is required`),
|
|
9
|
+
url: (v) => {
|
|
10
|
+
if (!v.trim())
|
|
11
|
+
return 'URL is required';
|
|
12
|
+
try {
|
|
13
|
+
const url = new URL(v);
|
|
14
|
+
if (!['http:', 'https:'].includes(url.protocol)) {
|
|
15
|
+
return 'URL must use http:// or https://';
|
|
16
|
+
}
|
|
17
|
+
return null;
|
|
18
|
+
}
|
|
19
|
+
catch {
|
|
20
|
+
return 'Invalid URL format';
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
positiveNumber: (v) => {
|
|
24
|
+
if (!v.trim())
|
|
25
|
+
return null; // Optional field
|
|
26
|
+
const num = parseInt(v, 10);
|
|
27
|
+
if (isNaN(num) || num <= 0)
|
|
28
|
+
return 'Must be a positive number';
|
|
29
|
+
return null;
|
|
30
|
+
},
|
|
31
|
+
slashFormat: (v) => {
|
|
32
|
+
if (!v.trim())
|
|
33
|
+
return 'Model ID is required';
|
|
34
|
+
if (!v.includes('/'))
|
|
35
|
+
return 'Must use format: provider/model-name';
|
|
36
|
+
return null;
|
|
37
|
+
},
|
|
38
|
+
};
|
|
@@ -34,7 +34,7 @@ export function DiffRenderer({ data, maxLines = Infinity }) {
|
|
|
34
34
|
}
|
|
35
35
|
const shouldTruncate = totalLines > maxLines;
|
|
36
36
|
let linesRendered = 0;
|
|
37
|
-
return (_jsxs(Box, { flexDirection: "column", children: [_jsxs(Box, { children: [_jsx(Text, {
|
|
37
|
+
return (_jsxs(Box, { flexDirection: "column", children: [_jsxs(Box, { children: [_jsx(Text, { color: "gray", children: ' ⎿ ' }), _jsx(Text, { children: makeRelativePath(filename) }), _jsxs(Text, { color: "green", children: [" +", additions] }), _jsxs(Text, { color: "red", children: [" -", deletions] })] }), _jsxs(Box, { flexDirection: "column", paddingLeft: 2, children: [hunks.map((hunk, hunkIndex) => {
|
|
38
38
|
if (shouldTruncate && linesRendered >= maxLines) {
|
|
39
39
|
return null;
|
|
40
40
|
}
|
|
@@ -61,5 +61,5 @@ export function DiffRenderer({ data, maxLines = Infinity }) {
|
|
|
61
61
|
linesRendered++;
|
|
62
62
|
return (_jsx(DiffLine, { type: line.type, lineNum: line.lineNum, lineNumWidth: lineNumWidth, content: line.content }, lineIndex));
|
|
63
63
|
})] }, hunkIndex));
|
|
64
|
-
}), shouldTruncate && _jsxs(Text, {
|
|
64
|
+
}), shouldTruncate && _jsxs(Text, { color: "gray", children: ["... +", totalLines - maxLines, " lines"] })] })] }));
|
|
65
65
|
}
|
|
@@ -58,7 +58,7 @@ export function CreateFilePreview({ data }) {
|
|
|
58
58
|
const { path, content, lineCount } = data;
|
|
59
59
|
if (!content) {
|
|
60
60
|
// Fallback if content not provided
|
|
61
|
-
return (_jsxs(Box, { flexDirection: "column", marginBottom: 1, children: [_jsx(Box, { marginBottom: 0, children: _jsx(Text, { color: "cyan", bold: true, children: "Create file" }) }), _jsxs(Box, { flexDirection: "column", borderStyle: "round", borderColor: "gray", paddingX: 1, children: [_jsx(Text, { children: makeRelativePath(path) }), lineCount && _jsxs(Text, {
|
|
61
|
+
return (_jsxs(Box, { flexDirection: "column", marginBottom: 1, children: [_jsx(Box, { marginBottom: 0, children: _jsx(Text, { color: "cyan", bold: true, children: "Create file" }) }), _jsxs(Box, { flexDirection: "column", borderStyle: "round", borderColor: "gray", paddingX: 1, children: [_jsx(Text, { children: makeRelativePath(path) }), lineCount && _jsxs(Text, { color: "gray", children: [lineCount, " lines"] })] })] }));
|
|
62
62
|
}
|
|
63
63
|
const lines = content.split('\n');
|
|
64
64
|
const lineNumWidth = getLineNumWidth(lines.length);
|
|
@@ -10,17 +10,17 @@ export function FileRenderer({ data }) {
|
|
|
10
10
|
if (operation === 'read') {
|
|
11
11
|
// Format: "Read N lines"
|
|
12
12
|
const lineText = lineCount !== undefined ? `${lineCount} lines` : 'file';
|
|
13
|
-
return (_jsxs(Text, {
|
|
13
|
+
return (_jsxs(Text, { color: "gray", children: [' ⎿ ', "Read ", lineText] }));
|
|
14
14
|
}
|
|
15
15
|
// For write/create operations
|
|
16
16
|
if (operation === 'write' || operation === 'create') {
|
|
17
17
|
const lineText = lineCount !== undefined ? `${lineCount} lines` : 'content';
|
|
18
|
-
return (_jsxs(Text, {
|
|
18
|
+
return (_jsxs(Text, { color: "gray", children: [' ⎿ ', "Wrote ", lineText] }));
|
|
19
19
|
}
|
|
20
20
|
// Delete operation
|
|
21
21
|
if (operation === 'delete') {
|
|
22
|
-
return _jsxs(Text, {
|
|
22
|
+
return _jsxs(Text, { color: "gray", children: [' ⎿ ', "Deleted file"] });
|
|
23
23
|
}
|
|
24
24
|
// Fallback
|
|
25
|
-
return (_jsxs(Text, {
|
|
25
|
+
return (_jsxs(Text, { color: "gray", children: [' ⎿ ', operation] }));
|
|
26
26
|
}
|
|
@@ -20,7 +20,7 @@ export function GenericRenderer({ content, maxLines = 15 }) {
|
|
|
20
20
|
// For single line results, show inline
|
|
21
21
|
if (lines.length === 1 && lines[0]) {
|
|
22
22
|
const line = lines[0];
|
|
23
|
-
return (_jsxs(Text, {
|
|
23
|
+
return (_jsxs(Text, { color: "gray", children: [' ⎿ ', line.slice(0, 80), line.length > 80 ? '...' : ''] }));
|
|
24
24
|
}
|
|
25
|
-
return (_jsxs(Box, { flexDirection: "column", children: [_jsxs(Text, {
|
|
25
|
+
return (_jsxs(Box, { flexDirection: "column", children: [_jsxs(Text, { color: "gray", children: [' ⎿ ', displayLines.length, " lines"] }), displayLines.map((line, i) => (_jsxs(Text, { color: "gray", wrap: "truncate", children: [' ', line] }, i))), truncated && (_jsxs(Text, { color: "gray", children: [' ', "... ", lines.length - maxLines, " more lines"] }))] }));
|
|
26
26
|
}
|
|
@@ -8,5 +8,5 @@ export function SearchRenderer({ data, maxMatches = 5 }) {
|
|
|
8
8
|
const { pattern, matches, totalMatches, truncated: dataTruncated } = data;
|
|
9
9
|
const displayMatches = matches.slice(0, maxMatches);
|
|
10
10
|
const truncated = dataTruncated || matches.length > maxMatches;
|
|
11
|
-
return (_jsxs(Box, { flexDirection: "column", children: [_jsxs(Text, {
|
|
11
|
+
return (_jsxs(Box, { flexDirection: "column", children: [_jsxs(Text, { color: "gray", children: [' ⎿ ', totalMatches, " match", totalMatches !== 1 ? 'es' : '', " for \"", pattern, "\"", truncated && ' (truncated)'] }), displayMatches.map((match, i) => (_jsxs(Text, { color: "gray", children: [' ', match.file, match.line > 0 && `:${match.line}`] }, i))), matches.length > maxMatches && (_jsxs(Text, { color: "gray", children: [' ', "... ", matches.length - maxMatches, " more"] }))] }));
|
|
12
12
|
}
|
|
@@ -13,13 +13,13 @@ export function ShellRenderer({ data, maxLines = 5 }) {
|
|
|
13
13
|
const truncatedCount = lines.length - maxLines;
|
|
14
14
|
// No output - show "(No content)"
|
|
15
15
|
if (lines.length === 0) {
|
|
16
|
-
return _jsxs(Text, {
|
|
16
|
+
return _jsxs(Text, { color: "gray", children: [' ⎿ ', "(No content)"] });
|
|
17
17
|
}
|
|
18
18
|
// Single line output - show inline
|
|
19
19
|
if (lines.length === 1 && lines[0]) {
|
|
20
|
-
return (_jsxs(Text, {
|
|
20
|
+
return (_jsxs(Text, { color: "gray", children: [' ⎿ ', lines[0]] }));
|
|
21
21
|
}
|
|
22
22
|
// Multi-line output
|
|
23
23
|
// TODO: Add ctrl+o expansion to show full output
|
|
24
|
-
return (_jsxs(Box, { flexDirection: "column", children: [displayLines.map((line, i) => (_jsxs(Text, {
|
|
24
|
+
return (_jsxs(Box, { flexDirection: "column", children: [displayLines.map((line, i) => (_jsxs(Text, { color: "gray", wrap: "truncate", children: [i === 0 ? ' ⎿ ' : ' ', line] }, i))), truncatedCount > 0 && (_jsxs(Text, { color: "gray", children: [' ', "+", truncatedCount, " lines"] }))] }));
|
|
25
25
|
}
|
|
@@ -148,7 +148,7 @@ export function DiffLine({ type, lineNum, lineNumWidth, content, wordDiffParts }
|
|
|
148
148
|
}
|
|
149
149
|
return content;
|
|
150
150
|
};
|
|
151
|
-
return (_jsxs(Box, { children: [_jsxs(Box, { width: gutterWidth, flexShrink: 0, children: [_jsx(Text, {
|
|
151
|
+
return (_jsxs(Box, { children: [_jsxs(Box, { width: gutterWidth, flexShrink: 0, children: [_jsx(Text, { color: "gray", children: lineNumStr }), _jsxs(Text, { color: colors.symbolColor, children: [" ", colors.symbol, " "] })] }), _jsx(Box, { width: contentWidth, flexShrink: 0, children: _jsx(Text, { backgroundColor: colors.bg, color: colors.fg, wrap: "wrap", children: renderContent() }) })] }));
|
|
152
152
|
}
|
|
153
153
|
/**
|
|
154
154
|
* Hunk separator component
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MarkdownText.d.ts","sourceRoot":"","sources":["../../../../../src/cli/ink-cli/components/shared/MarkdownText.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAwB,MAAM,OAAO,CAAC;AAU7C,UAAU,aAAa;IACnB,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,QAAQ,GAAG,eAAe,GAAG,MAAM,GAAG,KAAK,CAAC;IAC7E,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;GAGG;AACH,iBAAS,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,aAAa,EAAE,CAuE1D;
|
|
1
|
+
{"version":3,"file":"MarkdownText.d.ts","sourceRoot":"","sources":["../../../../../src/cli/ink-cli/components/shared/MarkdownText.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAwB,MAAM,OAAO,CAAC;AAU7C,UAAU,aAAa;IACnB,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,QAAQ,GAAG,eAAe,GAAG,MAAM,GAAG,KAAK,CAAC;IAC7E,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;GAGG;AACH,iBAAS,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,aAAa,EAAE,CAuE1D;AA0ID,UAAU,iBAAiB;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,iEAAiE;IACjE,IAAI,CAAC,EAAE,OAAO,CAAC;CAClB;AAkED,QAAA,MAAM,YAAY,+CAA6B,CAAC;AAMhD,UAAU,iBAAiB;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,yBAAyB;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,yEAAyE;IACzE,YAAY,CAAC,EAAE,MAAM,CAAC;CACzB;AA4RD,eAAO,MAAM,YAAY,+CAA6B,CAAC;AAGvD,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,CAAC"}
|
|
@@ -105,7 +105,7 @@ function segmentsToAnsi(segments, defaultColor) {
|
|
|
105
105
|
case 'code':
|
|
106
106
|
return chalk.cyan(segment.content);
|
|
107
107
|
case 'italic':
|
|
108
|
-
return
|
|
108
|
+
return chalk.gray(segment.content);
|
|
109
109
|
case 'strikethrough':
|
|
110
110
|
return colorFn.strikethrough(segment.content);
|
|
111
111
|
case 'link':
|
|
@@ -134,11 +134,13 @@ function getChalkColor(color) {
|
|
|
134
134
|
case 'green':
|
|
135
135
|
return chalk.green;
|
|
136
136
|
case 'yellow':
|
|
137
|
-
return chalk.
|
|
137
|
+
return chalk.rgb(255, 165, 0);
|
|
138
|
+
case 'orange':
|
|
139
|
+
return chalk.rgb(255, 165, 0);
|
|
138
140
|
case 'red':
|
|
139
141
|
return chalk.red;
|
|
140
142
|
case 'magenta':
|
|
141
|
-
return chalk.
|
|
143
|
+
return chalk.green;
|
|
142
144
|
default:
|
|
143
145
|
return chalk.white;
|
|
144
146
|
}
|
|
@@ -189,7 +191,7 @@ const RenderInlineInternal = ({ text, defaultColor = 'white', bold: baseBold = f
|
|
|
189
191
|
case 'code':
|
|
190
192
|
return (_jsx(Text, { bold: baseBold, color: "cyan", children: segment.content }, i));
|
|
191
193
|
case 'italic':
|
|
192
|
-
return (_jsx(Text, { bold: baseBold,
|
|
194
|
+
return (_jsx(Text, { bold: baseBold, color: "gray", children: segment.content }, i));
|
|
193
195
|
case 'strikethrough':
|
|
194
196
|
return (_jsx(Text, { bold: baseBold, strikethrough: true, color: defaultColor, children: segment.content }, i));
|
|
195
197
|
case 'link':
|
|
@@ -267,7 +269,7 @@ const MarkdownTextInternal = ({ children, color = 'white', bulletPrefix, }) => {
|
|
|
267
269
|
}
|
|
268
270
|
// Horizontal rule
|
|
269
271
|
if (hrRegex.test(trimmedLine)) {
|
|
270
|
-
blocks.push(_jsx(Box, { children: _jsx(Text, {
|
|
272
|
+
blocks.push(_jsx(Box, { children: _jsx(Text, { color: "gray", children: '─'.repeat(40) }) }, key));
|
|
271
273
|
return;
|
|
272
274
|
}
|
|
273
275
|
// Unordered list
|
|
@@ -349,7 +351,7 @@ const RenderListItemInternal = ({ indent, marker, text, defaultColor, }) => {
|
|
|
349
351
|
};
|
|
350
352
|
const RenderListItem = memo(RenderListItemInternal);
|
|
351
353
|
const RenderCodeBlockInternal = ({ lines, language, isPending, }) => {
|
|
352
|
-
return (_jsxs(Box, { flexDirection: "column", marginTop: 1, marginBottom: 1, children: [language &&
|
|
354
|
+
return (_jsxs(Box, { flexDirection: "column", marginTop: 1, marginBottom: 1, children: [language && _jsx(Text, { color: "gray", children: language }), _jsxs(Box, { flexDirection: "column", paddingLeft: 1, children: [lines.map((line, i) => (_jsx(Text, { color: "cyan", children: line }, i))), isPending && _jsx(Text, { color: "gray", children: "..." })] })] }));
|
|
353
355
|
};
|
|
354
356
|
const RenderCodeBlock = memo(RenderCodeBlockInternal);
|
|
355
357
|
// ============================================================================
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputContainer.d.ts","sourceRoot":"","sources":["../../../../src/cli/ink-cli/containers/InputContainer.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAA0E,MAAM,OAAO,CAAC;AAC/F,OAAO,KAAK,EAAE,UAAU,EAAoC,aAAa,EAAE,MAAM,aAAa,CAAC;AAE/F,OAAO,EAAE,YAAY,EAAiB,MAAM,sBAAsB,CAAC;AACnE,OAAO,KAAK,EACR,OAAO,EACP,OAAO,EACP,UAAU,EACV,YAAY,EAGf,MAAM,mBAAmB,CAAC;AAG3B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AACvE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;
|
|
1
|
+
{"version":3,"file":"InputContainer.d.ts","sourceRoot":"","sources":["../../../../src/cli/ink-cli/containers/InputContainer.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAA0E,MAAM,OAAO,CAAC;AAC/F,OAAO,KAAK,EAAE,UAAU,EAAoC,aAAa,EAAE,MAAM,aAAa,CAAC;AAE/F,OAAO,EAAE,YAAY,EAAiB,MAAM,sBAAsB,CAAC;AACnE,OAAO,KAAK,EACR,OAAO,EACP,OAAO,EACP,UAAU,EACV,YAAY,EAGf,MAAM,mBAAmB,CAAC;AAG3B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AACvE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;AAMtE,qDAAqD;AACrD,MAAM,WAAW,oBAAoB;IACjC,yEAAyE;IACzE,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CAC3C;AAED,UAAU,mBAAmB;IACzB,yCAAyC;IACzC,MAAM,EAAE,UAAU,CAAC;IACnB,KAAK,EAAE,UAAU,CAAC;IAClB,EAAE,EAAE,OAAO,CAAC;IACZ,OAAO,EAAE,YAAY,CAAC;IACtB,QAAQ,EAAE,eAAe,GAAG,IAAI,CAAC;IACjC,8CAA8C;IAC9C,cAAc,EAAE,aAAa,EAAE,CAAC;IAChC,QAAQ,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,UAAU,CAAC,CAAC,CAAC;IAC3D,KAAK,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC;IACrD,UAAU,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,YAAY,CAAC,CAAC,CAAC;IAC/D,2DAA2D;IAC3D,WAAW,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;IAC7D,mEAAmE;IACnE,kBAAkB,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;IACpE,iFAAiF;IACjF,iBAAiB,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;IACnE,iCAAiC;IACjC,iBAAiB,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,aAAa,EAAE,CAAC,CAAC,CAAC;IACzE,8EAA8E;IAC9E,WAAW,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,eAAe,GAAG,IAAI,CAAC,CAAC,CAAC;IAC1E,yEAAyE;IACzE,gBAAgB,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,eAAe,EAAE,CAAC,CAAC,CAAC;IAC1E,KAAK,EAAE,UAAU,CAAC;IAClB,YAAY,EAAE,YAAY,CAAC;IAC3B,mEAAmE;IACnE,gBAAgB,CAAC,EAAE,CAAC,SAAS,EAAE,IAAI,GAAG,MAAM,KAAK,IAAI,CAAC;IACtD,6EAA6E;IAC7E,YAAY,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED;;;GAGG;AACH,eAAO,MAAM,cAAc,kGA8qB1B,CAAC"}
|
|
@@ -11,6 +11,7 @@ import { InputArea } from '../components/input/InputArea.js';
|
|
|
11
11
|
import { processStream } from '../services/index.js';
|
|
12
12
|
import { createUserMessage } from '../utils/messageFormatting.js';
|
|
13
13
|
import { generateMessageId } from '../utils/idGenerator.js';
|
|
14
|
+
import { capture } from '../../../analytics/index.js';
|
|
14
15
|
/**
|
|
15
16
|
* Smart container for input area
|
|
16
17
|
* Manages submission, history, and overlay triggers
|
|
@@ -147,11 +148,20 @@ export const InputContainer = forwardRef(function InputContainer({ buffer, input
|
|
|
147
148
|
}, [setUi, ui.isProcessing, ui.activeOverlay, approval]);
|
|
148
149
|
// Handle image paste from clipboard
|
|
149
150
|
const handleImagePaste = useCallback((image) => {
|
|
151
|
+
// Track image attachment analytics (only if session exists)
|
|
152
|
+
if (session.id) {
|
|
153
|
+
capture('dexto_image_attached', {
|
|
154
|
+
source: 'cli',
|
|
155
|
+
sessionId: session.id,
|
|
156
|
+
imageType: image.mimeType,
|
|
157
|
+
imageSizeBytes: Math.floor(image.data.length * 0.75), // Approx base64 decode
|
|
158
|
+
});
|
|
159
|
+
}
|
|
150
160
|
setInput((prev) => ({
|
|
151
161
|
...prev,
|
|
152
162
|
images: [...prev.images, image],
|
|
153
163
|
}));
|
|
154
|
-
}, [setInput]);
|
|
164
|
+
}, [setInput, session.id]);
|
|
155
165
|
// Handle image removal (when placeholder is deleted from text)
|
|
156
166
|
const handleImageRemove = useCallback((imageId) => {
|
|
157
167
|
setInput((prev) => ({
|
|
@@ -456,6 +466,18 @@ export const InputContainer = forwardRef(function InputContainer({ buffer, input
|
|
|
456
466
|
else {
|
|
457
467
|
content = trimmed;
|
|
458
468
|
}
|
|
469
|
+
// Get current LLM config for analytics
|
|
470
|
+
const llmConfig = agent.getCurrentLLMConfig();
|
|
471
|
+
// Track message sent analytics
|
|
472
|
+
capture('dexto_message_sent', {
|
|
473
|
+
source: 'cli',
|
|
474
|
+
sessionId: currentSessionId,
|
|
475
|
+
provider: llmConfig.provider,
|
|
476
|
+
model: llmConfig.model,
|
|
477
|
+
hasImage: pendingImages.length > 0,
|
|
478
|
+
hasFile: false,
|
|
479
|
+
messageLength: trimmed.length,
|
|
480
|
+
});
|
|
459
481
|
// Use streaming API and process events directly
|
|
460
482
|
const iterator = await agent.stream(content, currentSessionId);
|
|
461
483
|
await processStream(iterator, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OverlayContainer.d.ts","sourceRoot":"","sources":["../../../../src/cli/ink-cli/containers/OverlayContainer.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"OverlayContainer.d.ts","sourceRoot":"","sources":["../../../../src/cli/ink-cli/containers/OverlayContainer.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAyE,MAAM,OAAO,CAAC;AAE9F,OAAO,KAAK,EAAE,UAAU,EAAmD,MAAM,aAAa,CAAC;AAC/F,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;AACtE,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,kCAAkC,CAAC;AAE5D,OAAO,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACpF,OAAO,EAGH,KAAK,eAAe,EACvB,MAAM,iCAAiC,CAAC;AA0EzC,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAK3D,MAAM,WAAW,sBAAsB;IACnC,WAAW,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,KAAK,OAAO,CAAC;CACrD;AAED,UAAU,qBAAqB;IAC3B,EAAE,EAAE,OAAO,CAAC;IACZ,KAAK,EAAE,UAAU,CAAC;IAClB,OAAO,EAAE,YAAY,CAAC;IACtB,QAAQ,EAAE,eAAe,GAAG,IAAI,CAAC;IACjC,QAAQ,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,UAAU,CAAC,CAAC,CAAC;IAC3D,KAAK,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC;IACrD,UAAU,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,YAAY,CAAC,CAAC,CAAC;IAC/D,WAAW,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;IAC7D,WAAW,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,eAAe,GAAG,IAAI,CAAC,CAAC,CAAC;IAC1E,gBAAgB,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,eAAe,EAAE,CAAC,CAAC,CAAC;IAC1E,KAAK,EAAE,UAAU,CAAC;IAClB,YAAY,EAAE,YAAY,CAAC;IAC3B,MAAM,EAAE,UAAU,CAAC;IACnB,8EAA8E;IAC9E,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B,4EAA4E;IAC5E,qBAAqB,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CAClE;AAED;;;GAGG;AACH,eAAO,MAAM,gBAAgB,sGAm1D5B,CAAC"}
|