aven-ai 0.0.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 +171 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -0
- package/dist/libs/config/config-store.d.ts +109 -0
- package/dist/libs/config/config-store.d.ts.map +1 -0
- package/dist/libs/config/config-store.js +169 -0
- package/dist/libs/config/config-store.js.map +1 -0
- package/dist/libs/config/index.d.ts +2 -0
- package/dist/libs/config/index.d.ts.map +1 -0
- package/dist/libs/config/index.js +2 -0
- package/dist/libs/config/index.js.map +1 -0
- package/dist/libs/provider-clients/index.d.ts +2 -0
- package/dist/libs/provider-clients/index.d.ts.map +1 -0
- package/dist/libs/provider-clients/index.js +2 -0
- package/dist/libs/provider-clients/index.js.map +1 -0
- package/dist/libs/provider-clients/provider-client.d.ts +34 -0
- package/dist/libs/provider-clients/provider-client.d.ts.map +1 -0
- package/dist/libs/provider-clients/provider-client.js +167 -0
- package/dist/libs/provider-clients/provider-client.js.map +1 -0
- package/dist/libs/provider-definitions/index.d.ts +2 -0
- package/dist/libs/provider-definitions/index.d.ts.map +1 -0
- package/dist/libs/provider-definitions/index.js +2 -0
- package/dist/libs/provider-definitions/index.js.map +1 -0
- package/dist/libs/provider-definitions/provider-definitions.d.ts +16 -0
- package/dist/libs/provider-definitions/provider-definitions.d.ts.map +1 -0
- package/dist/libs/provider-definitions/provider-definitions.js +59 -0
- package/dist/libs/provider-definitions/provider-definitions.js.map +1 -0
- package/dist/libs/pty/index.d.ts +2 -0
- package/dist/libs/pty/index.d.ts.map +1 -0
- package/dist/libs/pty/index.js +2 -0
- package/dist/libs/pty/index.js.map +1 -0
- package/dist/libs/pty/pty-runner.d.ts +26 -0
- package/dist/libs/pty/pty-runner.d.ts.map +1 -0
- package/dist/libs/pty/pty-runner.js +153 -0
- package/dist/libs/pty/pty-runner.js.map +1 -0
- package/dist/libs/session-storage/index.d.ts +2 -0
- package/dist/libs/session-storage/index.d.ts.map +1 -0
- package/dist/libs/session-storage/index.js +2 -0
- package/dist/libs/session-storage/index.js.map +1 -0
- package/dist/libs/session-storage/session-catalog.d.ts +19 -0
- package/dist/libs/session-storage/session-catalog.d.ts.map +1 -0
- package/dist/libs/session-storage/session-catalog.js +180 -0
- package/dist/libs/session-storage/session-catalog.js.map +1 -0
- package/dist/libs/terminal/clipboard.d.ts +3 -0
- package/dist/libs/terminal/clipboard.d.ts.map +1 -0
- package/dist/libs/terminal/clipboard.js +8 -0
- package/dist/libs/terminal/clipboard.js.map +1 -0
- package/dist/libs/terminal/index.d.ts +6 -0
- package/dist/libs/terminal/index.d.ts.map +1 -0
- package/dist/libs/terminal/index.js +6 -0
- package/dist/libs/terminal/index.js.map +1 -0
- package/dist/libs/terminal/keyboard-protocol.d.ts +3 -0
- package/dist/libs/terminal/keyboard-protocol.d.ts.map +1 -0
- package/dist/libs/terminal/keyboard-protocol.js +7 -0
- package/dist/libs/terminal/keyboard-protocol.js.map +1 -0
- package/dist/libs/terminal/mouse-protocol.d.ts +22 -0
- package/dist/libs/terminal/mouse-protocol.d.ts.map +1 -0
- package/dist/libs/terminal/mouse-protocol.js +51 -0
- package/dist/libs/terminal/mouse-protocol.js.map +1 -0
- package/dist/libs/terminal/terminal-provider.d.ts +15 -0
- package/dist/libs/terminal/terminal-provider.d.ts.map +1 -0
- package/dist/libs/terminal/terminal-provider.js +47 -0
- package/dist/libs/terminal/terminal-provider.js.map +1 -0
- package/dist/libs/terminal/theme.d.ts +24 -0
- package/dist/libs/terminal/theme.d.ts.map +1 -0
- package/dist/libs/terminal/theme.js +23 -0
- package/dist/libs/terminal/theme.js.map +1 -0
- package/dist/modules/agent/core.d.ts +41 -0
- package/dist/modules/agent/core.d.ts.map +1 -0
- package/dist/modules/agent/core.js +149 -0
- package/dist/modules/agent/core.js.map +1 -0
- package/dist/modules/agent/events/memory-message-adapter.d.ts +4 -0
- package/dist/modules/agent/events/memory-message-adapter.d.ts.map +1 -0
- package/dist/modules/agent/events/memory-message-adapter.js +48 -0
- package/dist/modules/agent/events/memory-message-adapter.js.map +1 -0
- package/dist/modules/agent/events/stream-event-adapter.d.ts +17 -0
- package/dist/modules/agent/events/stream-event-adapter.d.ts.map +1 -0
- package/dist/modules/agent/events/stream-event-adapter.js +82 -0
- package/dist/modules/agent/events/stream-event-adapter.js.map +1 -0
- package/dist/modules/agent/events/tool-message-adapter.d.ts +21 -0
- package/dist/modules/agent/events/tool-message-adapter.d.ts.map +1 -0
- package/dist/modules/agent/events/tool-message-adapter.js +123 -0
- package/dist/modules/agent/events/tool-message-adapter.js.map +1 -0
- package/dist/modules/agent/index.d.ts +5 -0
- package/dist/modules/agent/index.d.ts.map +1 -0
- package/dist/modules/agent/index.js +5 -0
- package/dist/modules/agent/index.js.map +1 -0
- package/dist/modules/agent/mock.d.ts +10 -0
- package/dist/modules/agent/mock.d.ts.map +1 -0
- package/dist/modules/agent/mock.js +60 -0
- package/dist/modules/agent/mock.js.map +1 -0
- package/dist/modules/agent/prompts/commands.d.ts +2 -0
- package/dist/modules/agent/prompts/commands.d.ts.map +1 -0
- package/dist/modules/agent/prompts/commands.js +5 -0
- package/dist/modules/agent/prompts/commands.js.map +1 -0
- package/dist/modules/agent/prompts/file-tools.d.ts +2 -0
- package/dist/modules/agent/prompts/file-tools.d.ts.map +1 -0
- package/dist/modules/agent/prompts/file-tools.js +7 -0
- package/dist/modules/agent/prompts/file-tools.js.map +1 -0
- package/dist/modules/agent/prompts/identity.d.ts +2 -0
- package/dist/modules/agent/prompts/identity.d.ts.map +1 -0
- package/dist/modules/agent/prompts/identity.js +5 -0
- package/dist/modules/agent/prompts/identity.js.map +1 -0
- package/dist/modules/agent/prompts/system.d.ts +2 -0
- package/dist/modules/agent/prompts/system.d.ts.map +1 -0
- package/dist/modules/agent/prompts/system.js +5 -0
- package/dist/modules/agent/prompts/system.js.map +1 -0
- package/dist/modules/agent/services/direct-command-executor.d.ts +10 -0
- package/dist/modules/agent/services/direct-command-executor.d.ts.map +1 -0
- package/dist/modules/agent/services/direct-command-executor.js +58 -0
- package/dist/modules/agent/services/direct-command-executor.js.map +1 -0
- package/dist/modules/agent/services/prompt-turn-executor.d.ts +12 -0
- package/dist/modules/agent/services/prompt-turn-executor.d.ts.map +1 -0
- package/dist/modules/agent/services/prompt-turn-executor.js +79 -0
- package/dist/modules/agent/services/prompt-turn-executor.js.map +1 -0
- package/dist/modules/agent/tools/exec-command.d.ts +13 -0
- package/dist/modules/agent/tools/exec-command.d.ts.map +1 -0
- package/dist/modules/agent/tools/exec-command.js +11 -0
- package/dist/modules/agent/tools/exec-command.js.map +1 -0
- package/dist/modules/agent/tools/files/contracts.d.ts +132 -0
- package/dist/modules/agent/tools/files/contracts.d.ts.map +1 -0
- package/dist/modules/agent/tools/files/contracts.js +84 -0
- package/dist/modules/agent/tools/files/contracts.js.map +1 -0
- package/dist/modules/agent/tools/files/create-file-tools.d.ts +61 -0
- package/dist/modules/agent/tools/files/create-file-tools.d.ts.map +1 -0
- package/dist/modules/agent/tools/files/create-file-tools.js +26 -0
- package/dist/modules/agent/tools/files/create-file-tools.js.map +1 -0
- package/dist/modules/agent/tools/files/edit-file-operation.d.ts +4 -0
- package/dist/modules/agent/tools/files/edit-file-operation.d.ts.map +1 -0
- package/dist/modules/agent/tools/files/edit-file-operation.js +98 -0
- package/dist/modules/agent/tools/files/edit-file-operation.js.map +1 -0
- package/dist/modules/agent/tools/files/file-path-safety.d.ts +2 -0
- package/dist/modules/agent/tools/files/file-path-safety.d.ts.map +1 -0
- package/dist/modules/agent/tools/files/file-path-safety.js +10 -0
- package/dist/modules/agent/tools/files/file-path-safety.js.map +1 -0
- package/dist/modules/agent/tools/files/file-state-cache.d.ts +21 -0
- package/dist/modules/agent/tools/files/file-state-cache.d.ts.map +1 -0
- package/dist/modules/agent/tools/files/file-state-cache.js +54 -0
- package/dist/modules/agent/tools/files/file-state-cache.js.map +1 -0
- package/dist/modules/agent/tools/files/file-tool-error.d.ts +3 -0
- package/dist/modules/agent/tools/files/file-tool-error.d.ts.map +1 -0
- package/dist/modules/agent/tools/files/file-tool-error.js +3 -0
- package/dist/modules/agent/tools/files/file-tool-error.js.map +1 -0
- package/dist/modules/agent/tools/files/file-tool-operations.d.ts +22 -0
- package/dist/modules/agent/tools/files/file-tool-operations.d.ts.map +1 -0
- package/dist/modules/agent/tools/files/file-tool-operations.js +73 -0
- package/dist/modules/agent/tools/files/file-tool-operations.js.map +1 -0
- package/dist/modules/agent/tools/files/file-tool-service.d.ts +14 -0
- package/dist/modules/agent/tools/files/file-tool-service.d.ts.map +1 -0
- package/dist/modules/agent/tools/files/file-tool-service.js +28 -0
- package/dist/modules/agent/tools/files/file-tool-service.js.map +1 -0
- package/dist/modules/agent/tools/files/mutation-journal.d.ts +12 -0
- package/dist/modules/agent/tools/files/mutation-journal.d.ts.map +1 -0
- package/dist/modules/agent/tools/files/mutation-journal.js +25 -0
- package/dist/modules/agent/tools/files/mutation-journal.js.map +1 -0
- package/dist/modules/agent/tools/files/read-file-operation.d.ts +4 -0
- package/dist/modules/agent/tools/files/read-file-operation.d.ts.map +1 -0
- package/dist/modules/agent/tools/files/read-file-operation.js +92 -0
- package/dist/modules/agent/tools/files/read-file-operation.js.map +1 -0
- package/dist/modules/agent/tools/files/text-file-codec.d.ts +13 -0
- package/dist/modules/agent/tools/files/text-file-codec.d.ts.map +1 -0
- package/dist/modules/agent/tools/files/text-file-codec.js +45 -0
- package/dist/modules/agent/tools/files/text-file-codec.js.map +1 -0
- package/dist/modules/agent/tools/files/write-file-operation.d.ts +4 -0
- package/dist/modules/agent/tools/files/write-file-operation.d.ts.map +1 -0
- package/dist/modules/agent/tools/files/write-file-operation.js +61 -0
- package/dist/modules/agent/tools/files/write-file-operation.js.map +1 -0
- package/dist/modules/agent/types.d.ts +65 -0
- package/dist/modules/agent/types.d.ts.map +1 -0
- package/dist/modules/agent/types.js +21 -0
- package/dist/modules/agent/types.js.map +1 -0
- package/dist/modules/app/cli.d.ts +2 -0
- package/dist/modules/app/cli.d.ts.map +1 -0
- package/dist/modules/app/cli.js +23 -0
- package/dist/modules/app/cli.js.map +1 -0
- package/dist/modules/app/components/app-provider.d.ts +11 -0
- package/dist/modules/app/components/app-provider.d.ts.map +1 -0
- package/dist/modules/app/components/app-provider.js +18 -0
- package/dist/modules/app/components/app-provider.js.map +1 -0
- package/dist/modules/app/components/app.d.ts +7 -0
- package/dist/modules/app/components/app.d.ts.map +1 -0
- package/dist/modules/app/components/app.js +45 -0
- package/dist/modules/app/components/app.js.map +1 -0
- package/dist/modules/app/index.d.ts +6 -0
- package/dist/modules/app/index.d.ts.map +1 -0
- package/dist/modules/app/index.js +5 -0
- package/dist/modules/app/index.js.map +1 -0
- package/dist/modules/app/input/prompt-history.d.ts +3 -0
- package/dist/modules/app/input/prompt-history.d.ts.map +1 -0
- package/dist/modules/app/input/prompt-history.js +13 -0
- package/dist/modules/app/input/prompt-history.js.map +1 -0
- package/dist/modules/app/input/use-overlay-controller.d.ts +14 -0
- package/dist/modules/app/input/use-overlay-controller.d.ts.map +1 -0
- package/dist/modules/app/input/use-overlay-controller.js +168 -0
- package/dist/modules/app/input/use-overlay-controller.js.map +1 -0
- package/dist/modules/app/services/quit-controller.d.ts +2 -0
- package/dist/modules/app/services/quit-controller.d.ts.map +1 -0
- package/dist/modules/app/services/quit-controller.js +27 -0
- package/dist/modules/app/services/quit-controller.js.map +1 -0
- package/dist/modules/app/services/runtime-event-batcher.d.ts +13 -0
- package/dist/modules/app/services/runtime-event-batcher.d.ts.map +1 -0
- package/dist/modules/app/services/runtime-event-batcher.js +41 -0
- package/dist/modules/app/services/runtime-event-batcher.js.map +1 -0
- package/dist/modules/app/services/use-app-input.d.ts +14 -0
- package/dist/modules/app/services/use-app-input.d.ts.map +1 -0
- package/dist/modules/app/services/use-app-input.js +144 -0
- package/dist/modules/app/services/use-app-input.js.map +1 -0
- package/dist/modules/app/services/use-runtime-connection.d.ts +15 -0
- package/dist/modules/app/services/use-runtime-connection.d.ts.map +1 -0
- package/dist/modules/app/services/use-runtime-connection.js +128 -0
- package/dist/modules/app/services/use-runtime-connection.js.map +1 -0
- package/dist/modules/app/services/use-runtime-session.d.ts +8 -0
- package/dist/modules/app/services/use-runtime-session.d.ts.map +1 -0
- package/dist/modules/app/services/use-runtime-session.js +79 -0
- package/dist/modules/app/services/use-runtime-session.js.map +1 -0
- package/dist/modules/app/services/use-runtime-workspace.d.ts +16 -0
- package/dist/modules/app/services/use-runtime-workspace.d.ts.map +1 -0
- package/dist/modules/app/services/use-runtime-workspace.js +134 -0
- package/dist/modules/app/services/use-runtime-workspace.js.map +1 -0
- package/dist/modules/app/store/app-state.d.ts +39 -0
- package/dist/modules/app/store/app-state.d.ts.map +1 -0
- package/dist/modules/app/store/app-state.js +2 -0
- package/dist/modules/app/store/app-state.js.map +1 -0
- package/dist/modules/app/store/apply-runtime-event.d.ts +4 -0
- package/dist/modules/app/store/apply-runtime-event.d.ts.map +1 -0
- package/dist/modules/app/store/apply-runtime-event.js +72 -0
- package/dist/modules/app/store/apply-runtime-event.js.map +1 -0
- package/dist/modules/app/store/create-app-store.d.ts +5 -0
- package/dist/modules/app/store/create-app-store.d.ts.map +1 -0
- package/dist/modules/app/store/create-app-store.js +49 -0
- package/dist/modules/app/store/create-app-store.js.map +1 -0
- package/dist/modules/app/store/selectors.d.ts +20 -0
- package/dist/modules/app/store/selectors.d.ts.map +1 -0
- package/dist/modules/app/store/selectors.js +19 -0
- package/dist/modules/app/store/selectors.js.map +1 -0
- package/dist/modules/commands/index.d.ts +2 -0
- package/dist/modules/commands/index.d.ts.map +1 -0
- package/dist/modules/commands/index.js +2 -0
- package/dist/modules/commands/index.js.map +1 -0
- package/dist/modules/commands/registry.d.ts +11 -0
- package/dist/modules/commands/registry.d.ts.map +1 -0
- package/dist/modules/commands/registry.js +16 -0
- package/dist/modules/commands/registry.js.map +1 -0
- package/dist/modules/composer/components/composer.d.ts +17 -0
- package/dist/modules/composer/components/composer.d.ts.map +1 -0
- package/dist/modules/composer/components/composer.js +35 -0
- package/dist/modules/composer/components/composer.js.map +1 -0
- package/dist/modules/composer/index.d.ts +6 -0
- package/dist/modules/composer/index.d.ts.map +1 -0
- package/dist/modules/composer/index.js +5 -0
- package/dist/modules/composer/index.js.map +1 -0
- package/dist/modules/composer/services/editor.d.ts +9 -0
- package/dist/modules/composer/services/editor.d.ts.map +1 -0
- package/dist/modules/composer/services/editor.js +39 -0
- package/dist/modules/composer/services/editor.js.map +1 -0
- package/dist/modules/composer/services/input-intent.d.ts +40 -0
- package/dist/modules/composer/services/input-intent.d.ts.map +1 -0
- package/dist/modules/composer/services/input-intent.js +58 -0
- package/dist/modules/composer/services/input-intent.js.map +1 -0
- package/dist/modules/composer/services/suggestions.d.ts +9 -0
- package/dist/modules/composer/services/suggestions.d.ts.map +1 -0
- package/dist/modules/composer/services/suggestions.js +18 -0
- package/dist/modules/composer/services/suggestions.js.map +1 -0
- package/dist/modules/composer/types.d.ts +9 -0
- package/dist/modules/composer/types.d.ts.map +1 -0
- package/dist/modules/composer/types.js +2 -0
- package/dist/modules/composer/types.js.map +1 -0
- package/dist/modules/conversation/components/transcript-row.d.ts +9 -0
- package/dist/modules/conversation/components/transcript-row.d.ts.map +1 -0
- package/dist/modules/conversation/components/transcript-row.js +13 -0
- package/dist/modules/conversation/components/transcript-row.js.map +1 -0
- package/dist/modules/conversation/components/virtual-transcript.d.ts +9 -0
- package/dist/modules/conversation/components/virtual-transcript.d.ts.map +1 -0
- package/dist/modules/conversation/components/virtual-transcript.js +24 -0
- package/dist/modules/conversation/components/virtual-transcript.js.map +1 -0
- package/dist/modules/conversation/fixtures.d.ts +3 -0
- package/dist/modules/conversation/fixtures.d.ts.map +1 -0
- package/dist/modules/conversation/fixtures.js +22 -0
- package/dist/modules/conversation/fixtures.js.map +1 -0
- package/dist/modules/conversation/index.d.ts +5 -0
- package/dist/modules/conversation/index.d.ts.map +1 -0
- package/dist/modules/conversation/index.js +4 -0
- package/dist/modules/conversation/index.js.map +1 -0
- package/dist/modules/conversation/services/input-intent.d.ts +18 -0
- package/dist/modules/conversation/services/input-intent.d.ts.map +1 -0
- package/dist/modules/conversation/services/input-intent.js +18 -0
- package/dist/modules/conversation/services/input-intent.js.map +1 -0
- package/dist/modules/conversation/services/markdown-rows.d.ts +5 -0
- package/dist/modules/conversation/services/markdown-rows.d.ts.map +1 -0
- package/dist/modules/conversation/services/markdown-rows.js +96 -0
- package/dist/modules/conversation/services/markdown-rows.js.map +1 -0
- package/dist/modules/conversation/services/message-rows.d.ts +8 -0
- package/dist/modules/conversation/services/message-rows.d.ts.map +1 -0
- package/dist/modules/conversation/services/message-rows.js +141 -0
- package/dist/modules/conversation/services/message-rows.js.map +1 -0
- package/dist/modules/conversation/services/row-model.d.ts +5 -0
- package/dist/modules/conversation/services/row-model.d.ts.map +1 -0
- package/dist/modules/conversation/services/row-model.js +11 -0
- package/dist/modules/conversation/services/row-model.js.map +1 -0
- package/dist/modules/conversation/services/selection.d.ts +10 -0
- package/dist/modules/conversation/services/selection.d.ts.map +1 -0
- package/dist/modules/conversation/services/selection.js +92 -0
- package/dist/modules/conversation/services/selection.js.map +1 -0
- package/dist/modules/conversation/services/terminal-cells.d.ts +9 -0
- package/dist/modules/conversation/services/terminal-cells.d.ts.map +1 -0
- package/dist/modules/conversation/services/terminal-cells.js +24 -0
- package/dist/modules/conversation/services/terminal-cells.js.map +1 -0
- package/dist/modules/conversation/services/transcript-row-cache.d.ts +10 -0
- package/dist/modules/conversation/services/transcript-row-cache.d.ts.map +1 -0
- package/dist/modules/conversation/services/transcript-row-cache.js +40 -0
- package/dist/modules/conversation/services/transcript-row-cache.js.map +1 -0
- package/dist/modules/conversation/services/use-transcript-controller.d.ts +17 -0
- package/dist/modules/conversation/services/use-transcript-controller.d.ts.map +1 -0
- package/dist/modules/conversation/services/use-transcript-controller.js +157 -0
- package/dist/modules/conversation/services/use-transcript-controller.js.map +1 -0
- package/dist/modules/conversation/services/wrapping.d.ts +3 -0
- package/dist/modules/conversation/services/wrapping.d.ts.map +1 -0
- package/dist/modules/conversation/services/wrapping.js +46 -0
- package/dist/modules/conversation/services/wrapping.js.map +1 -0
- package/dist/modules/conversation/types.d.ts +77 -0
- package/dist/modules/conversation/types.d.ts.map +1 -0
- package/dist/modules/conversation/types.js +2 -0
- package/dist/modules/conversation/types.js.map +1 -0
- package/dist/modules/overlays/components/overlay.d.ts +10 -0
- package/dist/modules/overlays/components/overlay.d.ts.map +1 -0
- package/dist/modules/overlays/components/overlay.js +17 -0
- package/dist/modules/overlays/components/overlay.js.map +1 -0
- package/dist/modules/overlays/index.d.ts +6 -0
- package/dist/modules/overlays/index.d.ts.map +1 -0
- package/dist/modules/overlays/index.js +5 -0
- package/dist/modules/overlays/index.js.map +1 -0
- package/dist/modules/overlays/services/overlay-items.d.ts +20 -0
- package/dist/modules/overlays/services/overlay-items.d.ts.map +1 -0
- package/dist/modules/overlays/services/overlay-items.js +56 -0
- package/dist/modules/overlays/services/overlay-items.js.map +1 -0
- package/dist/modules/overlays/services/overlay-registry.d.ts +4 -0
- package/dist/modules/overlays/services/overlay-registry.d.ts.map +1 -0
- package/dist/modules/overlays/services/overlay-registry.js +42 -0
- package/dist/modules/overlays/services/overlay-registry.js.map +1 -0
- package/dist/modules/overlays/services/overlay-selection.d.ts +23 -0
- package/dist/modules/overlays/services/overlay-selection.d.ts.map +1 -0
- package/dist/modules/overlays/services/overlay-selection.js +23 -0
- package/dist/modules/overlays/services/overlay-selection.js.map +1 -0
- package/dist/modules/overlays/types.d.ts +15 -0
- package/dist/modules/overlays/types.d.ts.map +1 -0
- package/dist/modules/overlays/types.js +2 -0
- package/dist/modules/overlays/types.js.map +1 -0
- package/dist/modules/providers/catalog.d.ts +2 -0
- package/dist/modules/providers/catalog.d.ts.map +1 -0
- package/dist/modules/providers/catalog.js +2 -0
- package/dist/modules/providers/catalog.js.map +1 -0
- package/dist/modules/providers/index.d.ts +5 -0
- package/dist/modules/providers/index.d.ts.map +1 -0
- package/dist/modules/providers/index.js +3 -0
- package/dist/modules/providers/index.js.map +1 -0
- package/dist/modules/providers/services/provider-connection-manager.d.ts +22 -0
- package/dist/modules/providers/services/provider-connection-manager.d.ts.map +1 -0
- package/dist/modules/providers/services/provider-connection-manager.js +147 -0
- package/dist/modules/providers/services/provider-connection-manager.js.map +1 -0
- package/dist/modules/providers/types.d.ts +20 -0
- package/dist/modules/providers/types.d.ts.map +1 -0
- package/dist/modules/providers/types.js +2 -0
- package/dist/modules/providers/types.js.map +1 -0
- package/dist/modules/sessions/index.d.ts +3 -0
- package/dist/modules/sessions/index.d.ts.map +1 -0
- package/dist/modules/sessions/index.js +3 -0
- package/dist/modules/sessions/index.js.map +1 -0
- package/dist/modules/sessions/services/project-session-manager.d.ts +28 -0
- package/dist/modules/sessions/services/project-session-manager.d.ts.map +1 -0
- package/dist/modules/sessions/services/project-session-manager.js +90 -0
- package/dist/modules/sessions/services/project-session-manager.js.map +1 -0
- package/dist/modules/sessions/types.d.ts +13 -0
- package/dist/modules/sessions/types.d.ts.map +1 -0
- package/dist/modules/sessions/types.js +12 -0
- package/dist/modules/sessions/types.js.map +1 -0
- package/dist/utils/safe-error.d.ts +2 -0
- package/dist/utils/safe-error.d.ts.map +1 -0
- package/dist/utils/safe-error.js +10 -0
- package/dist/utils/safe-error.js.map +1 -0
- package/dist/utils/text.d.ts +2 -0
- package/dist/utils/text.d.ts.map +1 -0
- package/dist/utils/text.js +5 -0
- package/dist/utils/text.js.map +1 -0
- package/package.json +72 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"editor.js","sourceRoot":"","sources":["../../../../src/modules/composer/services/editor.ts"],"names":[],"mappings":"AAIA,MAAM,KAAK,GAAG,CAAC,KAAa,EAAE,MAAc,EAAE,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC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CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,EAAC,CAAC;AAC9E,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,KAAa,EAAU,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { Key } from 'ink';
|
|
2
|
+
import type { InputMode } from '../../agent/index.js';
|
|
3
|
+
import type { EditorState } from '../types.js';
|
|
4
|
+
export type ComposerInputContext = {
|
|
5
|
+
editor: EditorState;
|
|
6
|
+
inputMode: InputMode;
|
|
7
|
+
suggestions: readonly {
|
|
8
|
+
label: string;
|
|
9
|
+
}[];
|
|
10
|
+
suggestionIndex: number;
|
|
11
|
+
};
|
|
12
|
+
export type ComposerInputIntent = {
|
|
13
|
+
type: 'armExit';
|
|
14
|
+
} | {
|
|
15
|
+
type: 'setEditor';
|
|
16
|
+
editor: EditorState;
|
|
17
|
+
revealSuggestions?: boolean;
|
|
18
|
+
resetSuggestion?: boolean;
|
|
19
|
+
} | {
|
|
20
|
+
type: 'hideSuggestions';
|
|
21
|
+
} | {
|
|
22
|
+
type: 'setInputMode';
|
|
23
|
+
mode: InputMode;
|
|
24
|
+
} | {
|
|
25
|
+
type: 'openHelp';
|
|
26
|
+
} | {
|
|
27
|
+
type: 'selectSuggestion';
|
|
28
|
+
amount: -1 | 1;
|
|
29
|
+
} | {
|
|
30
|
+
type: 'history';
|
|
31
|
+
amount: -1 | 1;
|
|
32
|
+
} | {
|
|
33
|
+
type: 'submit';
|
|
34
|
+
} | {
|
|
35
|
+
type: 'handled';
|
|
36
|
+
} | {
|
|
37
|
+
type: 'unhandled';
|
|
38
|
+
};
|
|
39
|
+
export declare const composerInputIntent: (input: string, key: Partial<Key>, context: ComposerInputContext) => ComposerInputIntent;
|
|
40
|
+
//# sourceMappingURL=input-intent.d.ts.map
|
|
@@ -0,0 +1 @@
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WACR,oBAAoB,KAC3B,mBA6CF,CAAC"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { backspace, deleteForward, insertText, moveCursor, moveLineBoundary } from './editor.js';
|
|
2
|
+
export const composerInputIntent = (input, key, context) => {
|
|
3
|
+
const { editor, inputMode, suggestions, suggestionIndex } = context;
|
|
4
|
+
if (key.ctrl && input === 'd') {
|
|
5
|
+
return editor.value ? { type: 'setEditor', editor: deleteForward(editor) } : { type: 'armExit' };
|
|
6
|
+
}
|
|
7
|
+
if (key.escape) {
|
|
8
|
+
if (suggestions.length > 0)
|
|
9
|
+
return { type: 'hideSuggestions' };
|
|
10
|
+
if (inputMode === 'bash' && !editor.value)
|
|
11
|
+
return { type: 'setInputMode', mode: 'prompt' };
|
|
12
|
+
if (editor.value)
|
|
13
|
+
return { type: 'setEditor', editor: { value: '', cursor: 0 } };
|
|
14
|
+
return { type: 'handled' };
|
|
15
|
+
}
|
|
16
|
+
if (editor.value === '' && input === '?' && inputMode === 'prompt')
|
|
17
|
+
return { type: 'openHelp' };
|
|
18
|
+
if (editor.value === '' && input === '!' && inputMode === 'prompt')
|
|
19
|
+
return { type: 'setInputMode', mode: 'bash' };
|
|
20
|
+
if (suggestions.length > 0 && (key.upArrow || key.downArrow)) {
|
|
21
|
+
return { type: 'selectSuggestion', amount: key.upArrow ? -1 : 1 };
|
|
22
|
+
}
|
|
23
|
+
if (suggestions.length > 0 && key.tab) {
|
|
24
|
+
const suggestion = suggestions[suggestionIndex];
|
|
25
|
+
return suggestion
|
|
26
|
+
? { type: 'setEditor', editor: { value: suggestion.label, cursor: suggestion.label.length } }
|
|
27
|
+
: { type: 'handled' };
|
|
28
|
+
}
|
|
29
|
+
if (key.return) {
|
|
30
|
+
if (key.shift || key.meta)
|
|
31
|
+
return { type: 'setEditor', editor: insertText(editor, '\n') };
|
|
32
|
+
if (editor.value.endsWith('\\'))
|
|
33
|
+
return { type: 'setEditor', editor: insertText(backspace(editor), '\n') };
|
|
34
|
+
return { type: 'submit' };
|
|
35
|
+
}
|
|
36
|
+
if (key.backspace)
|
|
37
|
+
return { type: 'setEditor', editor: backspace(editor), revealSuggestions: true };
|
|
38
|
+
if (key.delete)
|
|
39
|
+
return { type: 'setEditor', editor: deleteForward(editor), revealSuggestions: true };
|
|
40
|
+
if (key.leftArrow || key.rightArrow) {
|
|
41
|
+
return { type: 'setEditor', editor: moveCursor(editor, key.leftArrow ? -1 : 1) };
|
|
42
|
+
}
|
|
43
|
+
if (key.home || key.end) {
|
|
44
|
+
return { type: 'setEditor', editor: moveLineBoundary(editor, key.home ? 'start' : 'end') };
|
|
45
|
+
}
|
|
46
|
+
if (key.upArrow || key.downArrow)
|
|
47
|
+
return { type: 'history', amount: key.upArrow ? 1 : -1 };
|
|
48
|
+
if (!key.ctrl && !key.meta && !key.super && input) {
|
|
49
|
+
return {
|
|
50
|
+
type: 'setEditor',
|
|
51
|
+
editor: insertText(editor, input),
|
|
52
|
+
revealSuggestions: true,
|
|
53
|
+
resetSuggestion: true,
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
return { type: 'unhandled' };
|
|
57
|
+
};
|
|
58
|
+
//# sourceMappingURL=input-intent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"input-intent.js","sourceRoot":"","sources":["../../../../src/modules/composer/services/input-intent.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,SAAS,EAAE,aAAa,EAAE,UAAU,EAAE,UAAU,EAAE,gBAAgB,EAAC,MAAM,aAAa,CAAC;AAsB/F,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAClC,KAAa,EACb,GAAiB,EACjB,OAA6B,EACP,EAAE;IACxB,MAAM,EAAC,MAAM,EAAE,SAAS,EAAE,WAAW,EAAE,eAAe,EAAC,GAAG,OAAO,CAAC;IAClE,IAAI,GAAG,CAAC,IAAI,IAAI,KAAK,KAAK,GAAG,EAAE,CAAC;QAC/B,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC,CA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AAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAC,CAAC;IAChF,CAAC;IACD,IAAI,GAAG,CAAC,IAAI,IAAI,GAAG,CAAC,GAAG,EAAE,CAAC;QACzB,OAAO,EAAC,IAAI,EAAE,WAAW,EAAE,MAAM,EAAE,gBAAgB,CAAC,MAAM,EAAE,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,EAAC,CAAC;IAC1F,CAAC;IACD,IAAI,GAAG,CAAC,OAAO,IAAI,GAAG,CAAC,SAAS;QAAE,OAAO,EAAC,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAC,CAAC;IACzF,IAAI,CAAC,GAAG,CAAC,IAAI,IAAI,CAAC,GAAG,CAAC,IAAI,IAAI,CAAC,GAAG,CAAC,KAAK,IAAI,KAAK,EAAE,CAAC;QACnD,OAAO;YACN,IAAI,EAAE,WAAW;YACjB,MAAM,EAAE,UAAU,CAAC,MAAM,EAAE,KAAK,CAAC;YACjC,iBAAiB,EAAE,IAAI;YACvB,eAAe,EAAE,IAAI;SACrB,CAAC;IACH,CAAC;IACD,OAAO,EAAC,IAAI,EAAE,WAAW,EAAC,CAAC;AAC5B,CAAC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type CommandDefinition } from '../../commands/index.js';
|
|
2
|
+
import type { Suggestion } from '../types.js';
|
|
3
|
+
export declare const commandSuggestionsFor: (value: string, visible: boolean) => readonly CommandDefinition[];
|
|
4
|
+
export type VisibleSuggestion = {
|
|
5
|
+
suggestion: Suggestion;
|
|
6
|
+
index: number;
|
|
7
|
+
};
|
|
8
|
+
export declare const suggestionWindow: (suggestions: readonly Suggestion[], selectedIndex: number, windowSize?: number) => VisibleSuggestion[];
|
|
9
|
+
//# sourceMappingURL=suggestions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"suggestions.d.ts","sourceRoot":"","sources":["../../../../src/modules/composer/services/suggestions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,KAAK,iBAAiB,EAAC,MAAM,yBAAyB,CAAC;AAC7E,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,aAAa,CAAC;AAE5C,eAAO,MAAM,qBAAqB,UAAW,MAAM,WAAW,OAAO,KAAG,SAAS,iBAAiB,EAIjG,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC/B,UAAU,EAAE,UAAU,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,eAAO,MAAM,gBAAgB,gBACf,SAAS,UAAU,EAAE,iBACnB,MAAM,0BAEnB,iBAAiB,EAQnB,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { commandItems } from '../../commands/index.js';
|
|
2
|
+
export const commandSuggestionsFor = (value, visible) => {
|
|
3
|
+
if (!visible || !value.startsWith('/'))
|
|
4
|
+
return [];
|
|
5
|
+
const query = value.toLowerCase();
|
|
6
|
+
return commandItems.filter((item) => item.label.startsWith(query));
|
|
7
|
+
};
|
|
8
|
+
export const suggestionWindow = (suggestions, selectedIndex, windowSize = 6) => {
|
|
9
|
+
if (suggestions.length === 0 || windowSize <= 0)
|
|
10
|
+
return [];
|
|
11
|
+
const selected = Math.max(0, Math.min(suggestions.length - 1, selectedIndex));
|
|
12
|
+
const start = Math.max(0, Math.min(selected - windowSize + 1, suggestions.length - windowSize));
|
|
13
|
+
return suggestions.slice(start, start + windowSize).map((suggestion, offset) => ({
|
|
14
|
+
suggestion,
|
|
15
|
+
index: start + offset,
|
|
16
|
+
}));
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=suggestions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"suggestions.js","sourceRoot":"","sources":["../../../../src/modules/composer/services/suggestions.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.ts","sourceRoot":"","sources":["../../../src/modules/composer/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,WAAW,GAAG;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;CACpB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/modules/composer/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { SelectionState, TranscriptRow as TranscriptRowModel } from '../types.js';
|
|
2
|
+
type Props = {
|
|
3
|
+
row: TranscriptRowModel;
|
|
4
|
+
rowIndex: number;
|
|
5
|
+
selection: SelectionState | null;
|
|
6
|
+
};
|
|
7
|
+
export declare const TranscriptRow: ({ row, rowIndex, selection }: Props) => import("react").JSX.Element;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=transcript-row.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transcript-row.d.ts","sourceRoot":"","sources":["../../../../src/modules/conversation/components/transcript-row.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAC,cAAc,EAAE,aAAa,IAAI,kBAAkB,EAAC,MAAM,aAAa,CAAC;AAErF,KAAK,KAAK,GAAG;IACZ,GAAG,EAAE,kBAAkB,CAAC;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,cAAc,GAAG,IAAI,CAAC;CACjC,CAAC;AAKF,eAAO,MAAM,aAAa,iCAAgC,KAAK,gCAuB9D,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Box, Text } from 'ink';
|
|
3
|
+
import stringWidth from 'string-width';
|
|
4
|
+
import { theme, toneColor } from '../../../libs/terminal/index.js';
|
|
5
|
+
import { rowText } from '../services/row-model.js';
|
|
6
|
+
import { selectionColumnsForRow, splitSegmentsForSelection } from '../services/selection.js';
|
|
7
|
+
const backgroundFor = (row) => row.background === 'user' ? theme.userBackground : row.background === 'code' ? theme.codeBackground : undefined;
|
|
8
|
+
export const TranscriptRow = ({ row, rowIndex, selection }) => {
|
|
9
|
+
const columns = selectionColumnsForRow(selection, rowIndex, stringWidth(rowText(row)));
|
|
10
|
+
const segments = splitSegmentsForSelection(row.segments, columns);
|
|
11
|
+
return (_jsx(Box, { height: 1, paddingX: 1, backgroundColor: backgroundFor(row), overflow: "hidden", children: _jsx(Text, { wrap: "truncate-end", children: segments.map((segment, segmentIndex) => (_jsx(Text, { color: toneColor(segment.tone), ...(segment.selected ? { backgroundColor: theme.selectionBackground } : {}), ...(segment.bold ? { bold: true } : {}), ...(segment.dim ? { dimColor: true } : {}), ...(segment.italic ? { italic: true } : {}), ...(segment.underline ? { underline: true } : {}), children: segment.text }, `${row.id}:${segmentIndex}`))) }) }));
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=transcript-row.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transcript-row.js","sourceRoot":"","sources":["../../../../src/modules/conversation/components/transcript-row.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAC,GAAG,EAAE,IAAI,EAAC,MAAM,KAAK,CAAC;AAC9B,OAAO,WAAW,MAAM,cAAc,CAAC;AACvC,OAAO,EAAC,KAAK,EAAE,SAAS,EAAC,MAAM,iCAAiC,CAAC;AACjE,OAAO,EAAC,OAAO,EAAC,MAAM,0BAA0B,CAAC;AACjD,OAAO,EAAC,sBAAsB,EAAE,yBAAyB,EAAC,MAAM,0BAA0B,CAAC;AAS3F,MAAM,aAAa,GAAG,CAAC,GAAuB,EAAsB,EAAE,CACrE,GAAG,CAAC,UAAU,KAAK,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC,C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AAC,EAAC,SAAS,EAAE,IAAI,EAAC,CAAC,CAAC,CAAC,EAAE,CAAC,YAE/C,OAAO,CAAC,IAAI,IARR,GAAG,GAAG,CAAC,EAAE,IAAI,YAAY,EAAE,CAS1B,CACP,CAAC,GACI,GACF,CACN,CAAC;AACH,CAAC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { UiMessage } from '../types.js';
|
|
2
|
+
import type { TranscriptHandle } from '../types.js';
|
|
3
|
+
export type { TranscriptHandle } from '../types.js';
|
|
4
|
+
type Props = {
|
|
5
|
+
messages: readonly UiMessage[];
|
|
6
|
+
active: boolean;
|
|
7
|
+
};
|
|
8
|
+
export declare const VirtualTranscript: import("react").ForwardRefExoticComponent<Props & import("react").RefAttributes<TranscriptHandle>>;
|
|
9
|
+
//# sourceMappingURL=virtual-transcript.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"virtual-transcript.d.ts","sourceRoot":"","sources":["../../../../src/modules/conversation/components/virtual-transcript.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AAI3C,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,aAAa,CAAC;AAGlD,YAAY,EAAC,gBAAgB,EAAC,MAAM,aAAa,CAAC;AAElD,KAAK,KAAK,GAAG;IACZ,QAAQ,EAAE,SAAS,SAAS,EAAE,CAAC;IAC/B,MAAM,EAAE,OAAO,CAAC;CAChB,CAAC;AAEF,eAAO,MAAM,iBAAiB,oGA4C5B,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef, useRef } from 'react';
|
|
3
|
+
import { Box, Text, useBoxMetrics } from 'ink';
|
|
4
|
+
import { theme } from '../../../libs/terminal/index.js';
|
|
5
|
+
import { rowText } from '../services/row-model.js';
|
|
6
|
+
import { TranscriptRow } from './transcript-row.js';
|
|
7
|
+
import { useTranscriptController } from '../services/use-transcript-controller.js';
|
|
8
|
+
export const VirtualTranscript = forwardRef(({ messages, active }, handleRef) => {
|
|
9
|
+
const boxRef = useRef(null);
|
|
10
|
+
const metrics = useBoxMetrics(boxRef);
|
|
11
|
+
const controller = useTranscriptController(messages, metrics, handleRef, active);
|
|
12
|
+
const visibleEnd = Math.min(controller.rowCount, controller.scrollTop + controller.visibleRows.length);
|
|
13
|
+
const position = controller.rowCount === 0 ? '0/0' : `${controller.scrollTop + 1}–${visibleEnd}/${controller.rowCount}`;
|
|
14
|
+
const navigationHint = active
|
|
15
|
+
? '↑↓/jk scroll · pgup/pgdn page · g/G ends · esc close'
|
|
16
|
+
: 'pgup/pgdn scroll · ctrl+o navigate';
|
|
17
|
+
return (_jsxs(Box, { ref: boxRef, flexDirection: "column", flexBasis: 0, flexGrow: 1, flexShrink: 1, minHeight: 0, overflow: "hidden", children: [_jsxs(Box, { height: 1, flexShrink: 0, paddingX: 1, justifyContent: "space-between", overflow: "hidden", children: [_jsx(Text, { color: active ? theme.accent : theme.muted, bold: active, children: active ? 'TRANSCRIPT' : 'CONVERSATION' }), _jsx(Text, { color: controller.hasUnseen ? theme.accent : theme.subtle, wrap: "truncate-end", children: controller.hasUnseen
|
|
18
|
+
? `↓ new output · ${position} · ${active ? 'G/end' : 'ctrl+end'} to follow`
|
|
19
|
+
: controller.pinned
|
|
20
|
+
? navigationHint
|
|
21
|
+
: `${position} · ${navigationHint}` })] }), controller.stickyRow ? (_jsxs(Box, { height: 1, paddingX: 1, backgroundColor: theme.codeBackground, overflow: "hidden", children: [_jsx(Text, { color: theme.muted, children: "\u2191 " }), _jsx(Text, { color: theme.text, wrap: "truncate-end", children: rowText(controller.stickyRow).trim() })] })) : null, controller.topPadding > 0 ? _jsx(Box, { height: controller.topPadding }) : null, controller.visibleRows.map((row, visibleIndex) => (_jsx(TranscriptRow, { row: row, rowIndex: controller.scrollTop + visibleIndex, selection: controller.selection }, row.id)))] }));
|
|
22
|
+
});
|
|
23
|
+
VirtualTranscript.displayName = 'VirtualTranscript';
|
|
24
|
+
//# sourceMappingURL=virtual-transcript.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"virtual-transcript.js","sourceRoot":"","sources":["../../../../src/modules/conversation/components/virtual-transcript.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAC,UAAU,EAAE,MAAM,EAAC,MAAM,OAAO,CAAC;AACzC,OAAO,EAAC,GAAG,EAAE,IAAI,EAAE,aAAa,EAAkB,MAAM,KAAK,CAAC;AAE9D,OAAO,EAAC,KAAK,EAAC,MAAM,iCAAiC,CAAC;AACtD,OAAO,EAAC,OAAO,EAAC,MAAM,0BAA0B,CAAC;AACjD,OAAO,EAAC,aAAa,EAAC,MAAM,qBAAqB,CAAC;AAElD,OAAO,EAAC,uBAAuB,EAAC,MAAM,0CAA0C,CAAC;AASjF,MAAM,CAAC,MAAM,iBAAiB,GAAG,UAAU,CAA0B,CAAC,EAAC,QAAQ,EAAE,MAAM,EAAC,EAAE,SAAS,EAAE,EAAE;IACtG,MAAM,MAAM,GAAG,MAAM,CAAa,IAAI,CAAC,CAAC;IACxC,MAAM,OAAO,GAAG,aAAa,CAAC,MAAM,CAAC,CAAC;IACtC,MAAM,UAAU,GAAG,uBAAuB,CAAC,QAAQ,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC;IACjF,MAAM,UAAU,GAAG,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,QAAQ,EAAE,UAAU,CAAC,SAAS,GAAG,UAAU,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;IACvG,MAAM,QAAQ,GACb,UAAU,CAAC,QAAQ,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,UAAU,CAAC,SAAS,GAAG,CAAC,IAAI,UAAU,IAAI,UAAU,CAAC,QAAQ,EAAE,CAAC;IACxG,MAAM,cAAc,GAAG,MAAM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KAAK,wBAAW,EACnC,KAAC,IAAI,IAAC,KAAK,EAAE,KAAK,CAAC,IAAI,EAAE,IAAI,EAAC,cAAc,YAC1C,OAAO,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,IAAI,EAAE,GAC/B,IACF,CACN,CAAC,CAAC,CAAC,IAAI,EACP,UAAU,CAAC,UAAU,GAAG,CAAC,CAAC,CAAC,CAAC,KAAC,GAAG,IAAC,MAAM,EAAE,UAAU,CAAC,UAAU,GAAI,CAAC,CAAC,CAAC,IAAI,EACzE,UAAU,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,YAAY,EAAE,EAAE,CAAC,CAClD,KAAC,aAAa,IAEb,GAAG,EAAE,GAAG,EACR,QAAQ,EAAE,UAAU,CAAC,SAAS,GAAG,YAAY,EAC7C,SAAS,EAAE,UAAU,CAAC,SAAS,IAH1B,GAAG,CAAC,EAAE,CAIV,CACF,CAAC,IACG,CACN,CAAC;AACH,CAAC,CAAC,CAAC;AAEH,iBAAiB,CAAC,WAAW,GAAG,mBAAmB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fixtures.d.ts","sourceRoot":"","sources":["../../../src/modules/conversation/fixtures.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,YAAY,CAAC;AAG1C,eAAO,MAAM,YAAY,EAAE,SAAS,EAmBnC,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// Rendering-only fixtures. The production app starts with live runtime state.
|
|
2
|
+
export const demoMessages = [
|
|
3
|
+
{ id: 'user-1', kind: 'user', variant: 'prompt', content: 'Inspect the workspace.' },
|
|
4
|
+
{
|
|
5
|
+
id: 'assistant-1',
|
|
6
|
+
kind: 'assistant',
|
|
7
|
+
variant: 'text',
|
|
8
|
+
content: 'Example output:\n\n```ts\nconst ready = true;\n```',
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
id: 'tool-1',
|
|
12
|
+
kind: 'tool',
|
|
13
|
+
name: 'ExecCommand',
|
|
14
|
+
status: 'success',
|
|
15
|
+
summary: 'pwd',
|
|
16
|
+
detail: '/workspace',
|
|
17
|
+
group: 'bash',
|
|
18
|
+
},
|
|
19
|
+
{ id: 'system-1', kind: 'system', level: 'info', content: 'Rendering fixture' },
|
|
20
|
+
{ id: 'diff-1', kind: 'diff', file: 'source/server.ts', before: 'old\n', after: 'new\n' },
|
|
21
|
+
];
|
|
22
|
+
//# sourceMappingURL=fixtures.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fixtures.js","sourceRoot":"","sources":["../../../src/modules/conversation/fixtures.ts"],"names":[],"mappings":"AAEA,8EAA8E;AAC9E,MAAM,CAAC,MAAM,YAAY,GAAgB;IACxC,EAAC,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,wBAAwB,EAAC;IAClF;QACC,EAAE,EAAE,aAAa;QACjB,IAAI,EAAE,WAAW;QACjB,OAAO,EAAE,MAAM;QACf,OAAO,EAAE,oDAAoD;KAC7D;IACD;QACC,EAAE,EAAE,QAAQ;QACZ,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,aAAa;QACnB,MAAM,EAAE,SAAS;QACjB,OAAO,EAAE,KAAK;QACd,MAAM,EAAE,YAAY;QACpB,KAAK,EAAE,MAAM;KACb;IACD,EAAC,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,mBAAmB,EAAC;IAC7E,EAAC,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,kBAAkB,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAC;CACvF,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { VirtualTranscript } from './components/virtual-transcript.js';
|
|
2
|
+
export { TranscriptRow } from './components/transcript-row.js';
|
|
3
|
+
export { transcriptInputIntent, type TranscriptInputIntent } from './services/input-intent.js';
|
|
4
|
+
export type { AssistantMessage, DiffMessage, RowSegment, RowTone, SelectionState, SystemMessage, TextPoint, ToolMessage, TranscriptHandle, TranscriptRow as TranscriptRowModel, UiMessage, UserMessage, } from './types.js';
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/modules/conversation/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,iBAAiB,EAAC,MAAM,oCAAoC,CAAC;AACrE,OAAO,EAAC,aAAa,EAAC,MAAM,gCAAgC,CAAC;AAC7D,OAAO,EAAC,qBAAqB,EAAE,KAAK,qBAAqB,EAAC,MAAM,4BAA4B,CAAC;AAC7F,YAAY,EACX,gBAAgB,EAChB,WAAW,EACX,UAAU,EACV,OAAO,EACP,cAAc,EACd,aAAa,EACb,SAAS,EACT,WAAW,EACX,gBAAgB,EAChB,aAAa,IAAI,kBAAkB,EACnC,SAAS,EACT,WAAW,GACX,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/modules/conversation/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,iBAAiB,EAAC,MAAM,oCAAoC,CAAC;AACrE,OAAO,EAAC,aAAa,EAAC,MAAM,gCAAgC,CAAC;AAC7D,OAAO,EAAC,qBAAqB,EAA6B,MAAM,4BAA4B,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { Key } from 'ink';
|
|
2
|
+
export type TranscriptInputIntent = {
|
|
3
|
+
type: 'close';
|
|
4
|
+
} | {
|
|
5
|
+
type: 'scroll';
|
|
6
|
+
amount: number;
|
|
7
|
+
} | {
|
|
8
|
+
type: 'page';
|
|
9
|
+
direction: -1 | 1;
|
|
10
|
+
} | {
|
|
11
|
+
type: 'start';
|
|
12
|
+
} | {
|
|
13
|
+
type: 'end';
|
|
14
|
+
} | {
|
|
15
|
+
type: 'handled';
|
|
16
|
+
};
|
|
17
|
+
export declare const transcriptInputIntent: (input: string, key: Partial<Key>) => TranscriptInputIntent;
|
|
18
|
+
//# sourceMappingURL=input-intent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"input-intent.d.ts","sourceRoot":"","sources":["../../../../src/modules/conversation/services/input-intent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,GAAG,EAAC,MAAM,KAAK,CAAC;AAE7B,MAAM,MAAM,qBAAqB,GAC9B;IAAC,IAAI,EAAE,OAAO,CAAA;CAAC,GACf;IAAC,IAAI,EAAE,QAAQ,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAC,GAChC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,CAAC,CAAC,GAAG,CAAC,CAAA;CAAC,GACjC;IAAC,IAAI,EAAE,OAAO,CAAA;CAAC,GACf;IAAC,IAAI,EAAE,KAAK,CAAA;CAAC,GACb;IAAC,IAAI,EAAE,SAAS,CAAA;CAAC,CAAC;AAErB,eAAO,MAAM,qBAAqB,UAAW,MAAM,OAAO,OAAO,CAAC,GAAG,CAAC,KAAG,qBASxE,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export const transcriptInputIntent = (input, key) => {
|
|
2
|
+
if (key.escape || input === 'q' || (key.ctrl && input === 'o'))
|
|
3
|
+
return { type: 'close' };
|
|
4
|
+
if (key.upArrow || input === 'k')
|
|
5
|
+
return { type: 'scroll', amount: -1 };
|
|
6
|
+
if (key.downArrow || input === 'j')
|
|
7
|
+
return { type: 'scroll', amount: 1 };
|
|
8
|
+
if (key.pageUp)
|
|
9
|
+
return { type: 'page', direction: -1 };
|
|
10
|
+
if (key.pageDown)
|
|
11
|
+
return { type: 'page', direction: 1 };
|
|
12
|
+
if (input === 'g' || key.home)
|
|
13
|
+
return { type: 'start' };
|
|
14
|
+
if (input === 'G' || key.end)
|
|
15
|
+
return { type: 'end' };
|
|
16
|
+
return { type: 'handled' };
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=input-intent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"input-intent.js","sourceRoot":"","sources":["../../../../src/modules/conversation/services/input-intent.ts"],"names":[],"mappings":"AAUA,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,KAAa,EAAE,GAAiB,EAAyB,EAAE;IAChG,IAAI,GAAG,CAAC,MAAM,IAAI,KAAK,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,IAAI,KAAK,KAAK,GAAG,CAAC;QAAE,OAAO,EAAC,IAAI,EAAE,OAAO,EAAC,CAAC;IACvF,IAAI,GAAG,CAAC,OAAO,IAAI,KAAK,KAAK,GAAG;QAAE,OAAO,EAAC,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC,CAAC,EAAC,CAAC;IACtE,IAAI,GAAG,CAAC,SAAS,IAAI,KAAK,KAAK,GAAG;QAAE,OAAO,EAAC,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC,EAAC,CAAC;IACvE,IAAI,GAAG,CAAC,MAAM;QAAE,OAAO,EAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,CAAC,EAAC,CAAC;IACrD,IAAI,GAAG,CAAC,QAAQ;QAAE,OAAO,EAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,EAAC,CAAC;IACtD,IAAI,KAAK,KAAK,GAAG,IAAI,GAAG,CAAC,IAAI;QAAE,OAAO,EAAC,IAAI,EAAE,OAAO,EAAC,CAAC;IACtD,IAAI,KAAK,KAAK,GAAG,IAAI,GAAG,CAAC,GAAG;QAAE,OAAO,EAAC,IAAI,EAAE,KAAK,EAAC,CAAC;IACnD,OAAO,EAAC,IAAI,EAAE,SAAS,EAAC,CAAC;AAC1B,CAAC,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { UiMessage } from '../types.js';
|
|
2
|
+
import type { RowSegment, TranscriptRow } from '../types.js';
|
|
3
|
+
export declare const inlineSegments: (text: string) => RowSegment[];
|
|
4
|
+
export declare const markdownRows: (message: UiMessage, content: string, width: number) => TranscriptRow[];
|
|
5
|
+
//# sourceMappingURL=markdown-rows.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"markdown-rows.d.ts","sourceRoot":"","sources":["../../../../src/modules/conversation/services/markdown-rows.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AAE3C,OAAO,KAAK,EAAC,UAAU,EAAE,aAAa,EAAC,MAAM,aAAa,CAAC;AAG3D,eAAO,MAAM,cAAc,SAAU,MAAM,KAAG,UAAU,EAkBvD,CAAC;AA2BF,eAAO,MAAM,YAAY,YAAa,SAAS,WAAW,MAAM,SAAS,MAAM,KAAG,aAAa,EAmD9F,CAAC"}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { marked } from 'marked';
|
|
2
|
+
import { makeRow } from './row-model.js';
|
|
3
|
+
import { wrapSegments } from './wrapping.js';
|
|
4
|
+
export const inlineSegments = (text) => {
|
|
5
|
+
const pattern = /(\*\*[^*]+\*\*|`[^`]+`|\[[^\]]+\]\([^)]+\)|\*[^*]+\*)/gu;
|
|
6
|
+
const output = [];
|
|
7
|
+
let cursor = 0;
|
|
8
|
+
for (const match of text.matchAll(pattern)) {
|
|
9
|
+
const index = match.index;
|
|
10
|
+
if (index > cursor)
|
|
11
|
+
output.push({ text: text.slice(cursor, index) });
|
|
12
|
+
const value = match[0];
|
|
13
|
+
if (value.startsWith('**'))
|
|
14
|
+
output.push({ text: value.slice(2, -2), bold: true });
|
|
15
|
+
else if (value.startsWith('`'))
|
|
16
|
+
output.push({ text: value.slice(1, -1), tone: 'code' });
|
|
17
|
+
else if (value.startsWith('[')) {
|
|
18
|
+
const link = /^\[([^\]]+)\]\(([^)]+)\)$/u.exec(value);
|
|
19
|
+
output.push({ text: link?.[1] ?? value, tone: 'accent', underline: true, ...(link?.[2] ? { link: link[2] } : {}) });
|
|
20
|
+
}
|
|
21
|
+
else
|
|
22
|
+
output.push({ text: value.slice(1, -1), italic: true });
|
|
23
|
+
cursor = index + value.length;
|
|
24
|
+
}
|
|
25
|
+
if (cursor < text.length)
|
|
26
|
+
output.push({ text: text.slice(cursor) });
|
|
27
|
+
return output;
|
|
28
|
+
};
|
|
29
|
+
const syntaxSegments = (line) => {
|
|
30
|
+
const pattern = /(\/\/.*$|#.*$|"(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*'|\b(?:const|let|function|return|type|interface|import|export|async|await|if|else|true|false|null)\b)/gu;
|
|
31
|
+
const output = [];
|
|
32
|
+
let cursor = 0;
|
|
33
|
+
for (const match of line.matchAll(pattern)) {
|
|
34
|
+
const index = match.index;
|
|
35
|
+
if (index > cursor)
|
|
36
|
+
output.push({ text: line.slice(cursor, index), tone: 'code' });
|
|
37
|
+
const value = match[0];
|
|
38
|
+
output.push({
|
|
39
|
+
text: value,
|
|
40
|
+
tone: value.startsWith('//') || value.startsWith('#')
|
|
41
|
+
? 'muted'
|
|
42
|
+
: value.startsWith('"') || value.startsWith("'")
|
|
43
|
+
? 'success'
|
|
44
|
+
: 'accent',
|
|
45
|
+
bold: !value.startsWith('/') && !value.startsWith('#') && !value.startsWith('"') && !value.startsWith("'"),
|
|
46
|
+
});
|
|
47
|
+
cursor = index + value.length;
|
|
48
|
+
}
|
|
49
|
+
if (cursor < line.length)
|
|
50
|
+
output.push({ text: line.slice(cursor), tone: 'code' });
|
|
51
|
+
return output;
|
|
52
|
+
};
|
|
53
|
+
export const markdownRows = (message, content, width) => {
|
|
54
|
+
const rows = [];
|
|
55
|
+
let index = 0;
|
|
56
|
+
const pushWrapped = (segments, background) => {
|
|
57
|
+
for (const line of wrapSegments(segments, width))
|
|
58
|
+
rows.push(makeRow(message, index++, line, background));
|
|
59
|
+
};
|
|
60
|
+
for (const token of marked.lexer(content)) {
|
|
61
|
+
switch (token.type) {
|
|
62
|
+
case 'space':
|
|
63
|
+
rows.push(makeRow(message, index++, [{ text: '' }]));
|
|
64
|
+
break;
|
|
65
|
+
case 'heading':
|
|
66
|
+
pushWrapped([{ text: token.text, bold: true, tone: 'text' }]);
|
|
67
|
+
break;
|
|
68
|
+
case 'code': {
|
|
69
|
+
const code = token;
|
|
70
|
+
rows.push(makeRow(message, index++, [{ text: ` ${code.lang ?? 'code'} `, tone: 'muted', bold: true }], 'code'));
|
|
71
|
+
for (const line of code.text.split('\n'))
|
|
72
|
+
rows.push(makeRow(message, index++, [{ text: '│ ', tone: 'subtle', selectable: false }, ...syntaxSegments(line)], 'code'));
|
|
73
|
+
break;
|
|
74
|
+
}
|
|
75
|
+
case 'list':
|
|
76
|
+
for (const item of token.items)
|
|
77
|
+
pushWrapped([{ text: ' • ', tone: 'muted', selectable: false }, ...inlineSegments(item.text)]);
|
|
78
|
+
break;
|
|
79
|
+
case 'blockquote':
|
|
80
|
+
pushWrapped([
|
|
81
|
+
{ text: '│ ', tone: 'subtle', selectable: false },
|
|
82
|
+
{ text: token.text.trim(), tone: 'muted' },
|
|
83
|
+
]);
|
|
84
|
+
break;
|
|
85
|
+
case 'hr':
|
|
86
|
+
rows.push(makeRow(message, index++, [{ text: '─'.repeat(Math.max(1, width)), tone: 'subtle', selectable: false }]));
|
|
87
|
+
break;
|
|
88
|
+
default: {
|
|
89
|
+
const text = 'text' in token && typeof token.text === 'string' ? token.text : token.raw;
|
|
90
|
+
pushWrapped(inlineSegments(text.trim()));
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
return rows;
|
|
95
|
+
};
|
|
96
|
+
//# sourceMappingURL=markdown-rows.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"markdown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AE,KAAK,EAAC,EAAE,GAAG,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;gBAC/F,MAAM;YACP,KAAK,YAAY;gBAChB,WAAW,CAAC;oBACX,EAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,KAAK,EAAC;oBAC/C,EAAC,IAAI,EAAG,KAA2B,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,IAAI,EAAE,OAAO,EAAC;iBAC/D,CAAC,CAAC;gBACH,MAAM;YACP,KAAK,IAAI;gBACR,IAAI,CAAC,IAAI,CACR,OAAO,CAAC,OAAO,EAAE,KAAK,EAAE,EAAE,CAAC,EAAC,IAAI,EAAE,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,KAAK,EAAC,CAAC,CAAC,CACtG,CAAC;gBACF,MAAM;YACP,SAAS,CAAC;gBACT,MAAM,IAAI,GAAG,MAAM,IAAI,KAAK,IAAI,OAAO,KAAK,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC;gBACxF,WAAW,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;YAC1C,CAAC;QACF,CAAC;IACF,CAAC;IACD,OAAO,IAAI,CAAC;AACb,CAAC,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { UiMessage } from '../types.js';
|
|
2
|
+
import type { TranscriptRow } from '../types.js';
|
|
3
|
+
export declare const messageToRows: (message: UiMessage, width: number, expanded?: boolean) => TranscriptRow[];
|
|
4
|
+
export declare const shouldSeparateMessages: (previous: UiMessage, current: UiMessage) => boolean;
|
|
5
|
+
export declare const messagesToRows: (messages: readonly UiMessage[], width: number, expanded?: boolean) => TranscriptRow[];
|
|
6
|
+
export { rowText } from './row-model.js';
|
|
7
|
+
export { wrapSegments } from './wrapping.js';
|
|
8
|
+
//# sourceMappingURL=message-rows.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"message-rows.d.ts","sourceRoot":"","sources":["../../../../src/modules/conversation/services/message-rows.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAc,SAAS,EAAC,MAAM,aAAa,CAAC;AAGxD,OAAO,KAAK,EAAa,aAAa,EAAC,MAAM,aAAa,CAAC;AA4D3D,eAAO,MAAM,aAAa,YAAa,SAAS,SAAS,MAAM,yBAAqB,aAAa,EAsFhG,CAAC;AAEF,eAAO,MAAM,sBAAsB,aAAc,SAAS,WAAW,SAAS,KAAG,OAIhF,CAAC;AAEF,eAAO,MAAM,cAAc,aAAc,SAAS,SAAS,EAAE,SAAS,MAAM,yBAAqB,aAAa,EAY7G,CAAC;AAEF,OAAO,EAAC,OAAO,EAAC,MAAM,gBAAgB,CAAC;AACvC,OAAO,EAAC,YAAY,EAAC,MAAM,eAAe,CAAC"}
|