@travisennis/acai 0.0.6 → 0.0.8
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 +225 -39
- package/dist/agent/index.d.ts +30 -21
- package/dist/agent/index.d.ts.map +1 -1
- package/dist/agent/index.js +237 -198
- package/dist/cli.d.ts +4 -3
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +56 -18
- package/dist/commands/add-directory/index.d.ts +3 -0
- package/dist/commands/add-directory/index.d.ts.map +1 -0
- package/dist/commands/add-directory/index.js +50 -0
- package/dist/commands/add-directory/types.d.ts +6 -0
- package/dist/commands/add-directory/types.d.ts.map +1 -0
- package/dist/commands/add-directory/utils.d.ts +3 -0
- package/dist/commands/add-directory/utils.d.ts.map +1 -0
- package/dist/commands/add-directory/utils.js +15 -0
- package/dist/commands/clear/index.d.ts +3 -0
- package/dist/commands/clear/index.d.ts.map +1 -0
- package/dist/commands/{clear-command.js → clear/index.js} +1 -7
- package/dist/commands/copy/index.d.ts +3 -0
- package/dist/commands/copy/index.d.ts.map +1 -0
- package/dist/commands/copy/index.js +39 -0
- package/dist/commands/copy/types.d.ts +3 -0
- package/dist/commands/copy/types.d.ts.map +1 -0
- package/dist/commands/copy/types.js +1 -0
- package/dist/commands/copy/utils.d.ts +3 -0
- package/dist/commands/copy/utils.d.ts.map +1 -0
- package/dist/commands/copy/utils.js +22 -0
- package/dist/commands/exit/index.d.ts +10 -0
- package/dist/commands/exit/index.d.ts.map +1 -0
- package/dist/commands/exit/index.js +21 -0
- package/dist/commands/exit/types.d.ts +8 -0
- package/dist/commands/exit/types.d.ts.map +1 -0
- package/dist/commands/exit/types.js +1 -0
- package/dist/commands/exit/utils.d.ts +2 -0
- package/dist/commands/exit/utils.d.ts.map +1 -0
- package/dist/commands/exit/utils.js +13 -0
- package/dist/commands/generate-rules/index.d.ts +3 -0
- package/dist/commands/generate-rules/index.d.ts.map +1 -0
- package/dist/commands/{generate-rules-command.js → generate-rules/index.js} +65 -147
- package/dist/commands/generate-rules/utils.d.ts +5 -0
- package/dist/commands/generate-rules/utils.d.ts.map +1 -0
- package/dist/commands/generate-rules/utils.js +25 -0
- package/dist/commands/handoff/index.d.ts +3 -0
- package/dist/commands/handoff/index.d.ts.map +1 -0
- package/dist/commands/handoff/index.js +97 -0
- package/dist/commands/handoff/utils.d.ts +4 -0
- package/dist/commands/handoff/utils.d.ts.map +1 -0
- package/dist/commands/handoff/utils.js +123 -0
- package/dist/commands/health/index.d.ts +3 -0
- package/dist/commands/health/index.d.ts.map +1 -0
- package/dist/commands/health/index.js +56 -0
- package/dist/commands/health/utils.d.ts +15 -0
- package/dist/commands/health/utils.d.ts.map +1 -0
- package/dist/commands/health/utils.js +52 -0
- package/dist/commands/help/index.d.ts +3 -0
- package/dist/commands/help/index.d.ts.map +1 -0
- package/dist/commands/{help-command.js → help/index.js} +6 -14
- package/dist/commands/history/index.d.ts +3 -0
- package/dist/commands/history/index.d.ts.map +1 -0
- package/dist/commands/{history-command.js → history/index.js} +40 -200
- package/dist/commands/history/types.d.ts +11 -0
- package/dist/commands/history/types.d.ts.map +1 -0
- package/dist/commands/history/types.js +1 -0
- package/dist/commands/history/utils.d.ts +4 -0
- package/dist/commands/history/utils.d.ts.map +1 -0
- package/dist/commands/history/utils.js +86 -0
- package/dist/commands/init/index.d.ts +3 -0
- package/dist/commands/init/index.d.ts.map +1 -0
- package/dist/commands/{init-command.js → init/index.js} +17 -27
- package/dist/commands/init-project/index.d.ts +3 -0
- package/dist/commands/init-project/index.d.ts.map +1 -0
- package/dist/commands/init-project/index.js +51 -0
- package/dist/commands/init-project/utils.d.ts +9 -0
- package/dist/commands/init-project/utils.d.ts.map +1 -0
- package/dist/commands/init-project/utils.js +43 -0
- package/dist/commands/list-directories/index.d.ts +3 -0
- package/dist/commands/list-directories/index.d.ts.map +1 -0
- package/dist/commands/{list-directories-command.js → list-directories/index.js} +2 -15
- package/dist/commands/list-tools/index.d.ts +3 -0
- package/dist/commands/list-tools/index.d.ts.map +1 -0
- package/dist/commands/list-tools/index.js +89 -0
- package/dist/commands/manager.d.ts +2 -9
- package/dist/commands/manager.d.ts.map +1 -1
- package/dist/commands/manager.js +38 -83
- package/dist/commands/model/index.d.ts +3 -0
- package/dist/commands/model/index.d.ts.map +1 -0
- package/dist/commands/model/index.js +182 -0
- package/dist/commands/model/utils.d.ts +3 -0
- package/dist/commands/model/utils.d.ts.map +1 -0
- package/dist/commands/model/utils.js +5 -0
- package/dist/commands/paste/index.d.ts +3 -0
- package/dist/commands/paste/index.d.ts.map +1 -0
- package/dist/commands/paste/index.js +94 -0
- package/dist/commands/paste/utils.d.ts +5 -0
- package/dist/commands/paste/utils.d.ts.map +1 -0
- package/dist/commands/paste/utils.js +86 -0
- package/dist/commands/pickup/index.d.ts +3 -0
- package/dist/commands/pickup/index.d.ts.map +1 -0
- package/dist/commands/pickup/index.js +138 -0
- package/dist/commands/pickup/types.d.ts +6 -0
- package/dist/commands/pickup/types.d.ts.map +1 -0
- package/dist/commands/pickup/types.js +1 -0
- package/dist/commands/pickup/utils.d.ts +7 -0
- package/dist/commands/pickup/utils.d.ts.map +1 -0
- package/dist/commands/pickup/utils.js +56 -0
- package/dist/commands/prompt/index.d.ts +5 -0
- package/dist/commands/prompt/index.d.ts.map +1 -0
- package/dist/commands/prompt/index.js +126 -0
- package/dist/commands/prompt/types.d.ts +15 -0
- package/dist/commands/prompt/types.d.ts.map +1 -0
- package/dist/commands/prompt/types.js +1 -0
- package/dist/commands/prompt/utils.d.ts +12 -0
- package/dist/commands/prompt/utils.d.ts.map +1 -0
- package/dist/commands/prompt/utils.js +107 -0
- package/dist/commands/remove-directory/index.d.ts +3 -0
- package/dist/commands/remove-directory/index.d.ts.map +1 -0
- package/dist/commands/{remove-directory-command.js → remove-directory/index.js} +3 -35
- package/dist/commands/reset/index.d.ts +3 -0
- package/dist/commands/reset/index.d.ts.map +1 -0
- package/dist/commands/{reset-command.js → reset/index.js} +8 -11
- package/dist/commands/reset/types.d.ts +1 -0
- package/dist/commands/reset/types.d.ts.map +1 -0
- package/dist/commands/reset/types.js +3 -0
- package/dist/commands/resources/index.d.ts +3 -0
- package/dist/commands/resources/index.d.ts.map +1 -0
- package/dist/commands/resources/index.js +84 -0
- package/dist/commands/review/index.d.ts +3 -0
- package/dist/commands/review/index.d.ts.map +1 -0
- package/dist/commands/review/index.js +126 -0
- package/dist/commands/review/types.d.ts +12 -0
- package/dist/commands/review/types.d.ts.map +1 -0
- package/dist/commands/review/types.js +1 -0
- package/dist/commands/review/utils.d.ts +4 -0
- package/dist/commands/review/utils.d.ts.map +1 -0
- package/dist/commands/review/utils.js +87 -0
- package/dist/commands/save/index.d.ts +3 -0
- package/dist/commands/save/index.d.ts.map +1 -0
- package/dist/commands/{save-command.js → save/index.js} +3 -10
- package/dist/commands/session/index.d.ts +3 -0
- package/dist/commands/session/index.d.ts.map +1 -0
- package/dist/commands/session/index.js +197 -0
- package/dist/commands/session/types.d.ts +13 -0
- package/dist/commands/session/types.d.ts.map +1 -0
- package/dist/commands/session/types.js +7 -0
- package/dist/commands/shell/index.d.ts +3 -0
- package/dist/commands/shell/index.d.ts.map +1 -0
- package/dist/commands/{shell-command.js → shell/index.js} +4 -51
- package/dist/commands/types.d.ts +2 -5
- package/dist/commands/types.d.ts.map +1 -1
- package/dist/config.d.ts +36 -7
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +118 -60
- package/dist/dedent.d.ts.map +1 -1
- package/dist/dedent.js +7 -7
- package/dist/execution/index.d.ts +18 -2
- package/dist/execution/index.d.ts.map +1 -1
- package/dist/execution/index.js +119 -81
- package/dist/formatting.d.ts +46 -0
- package/dist/formatting.d.ts.map +1 -1
- package/dist/formatting.js +94 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +299 -177
- package/dist/logger.d.ts.map +1 -1
- package/dist/logger.js +4 -11
- package/dist/mentions.d.ts.map +1 -1
- package/dist/mentions.js +3 -53
- package/dist/middleware/audit-message.d.ts +2 -2
- package/dist/middleware/audit-message.d.ts.map +1 -1
- package/dist/middleware/audit-message.js +40 -2
- package/dist/middleware/cache.d.ts +2 -2
- package/dist/middleware/cache.d.ts.map +1 -1
- package/dist/middleware/cache.js +111 -27
- package/dist/middleware/rate-limit.d.ts +2 -2
- package/dist/middleware/rate-limit.d.ts.map +1 -1
- package/dist/middleware/rate-limit.js +1 -0
- package/dist/models/ai-config.d.ts.map +1 -1
- package/dist/models/ai-config.js +46 -29
- package/dist/models/anthropic-provider.d.ts +14 -13
- package/dist/models/anthropic-provider.d.ts.map +1 -1
- package/dist/models/anthropic-provider.js +0 -7
- package/dist/models/deepseek-provider.d.ts +9 -8
- package/dist/models/deepseek-provider.d.ts.map +1 -1
- package/dist/models/deepseek-provider.js +0 -2
- package/dist/models/google-provider.d.ts +10 -9
- package/dist/models/google-provider.d.ts.map +1 -1
- package/dist/models/google-provider.js +0 -3
- package/dist/models/groq-provider.d.ts +8 -7
- package/dist/models/groq-provider.d.ts.map +1 -1
- package/dist/models/groq-provider.js +0 -1
- package/dist/models/manager.d.ts +7 -4
- package/dist/models/manager.d.ts.map +1 -1
- package/dist/models/manager.js +5 -25
- package/dist/models/openai-provider.d.ts +11 -10
- package/dist/models/openai-provider.d.ts.map +1 -1
- package/dist/models/openai-provider.js +0 -4
- package/dist/models/opencode-zen-provider.d.ts +23 -0
- package/dist/models/opencode-zen-provider.d.ts.map +1 -0
- package/dist/models/opencode-zen-provider.js +76 -0
- package/dist/models/openrouter-provider.d.ts +34 -28
- package/dist/models/openrouter-provider.d.ts.map +1 -1
- package/dist/models/openrouter-provider.js +148 -139
- package/dist/models/providers.d.ts +6 -16
- package/dist/models/providers.d.ts.map +1 -1
- package/dist/models/providers.js +8 -58
- package/dist/models/xai-provider.d.ts +9 -8
- package/dist/models/xai-provider.d.ts.map +1 -1
- package/dist/models/xai-provider.js +0 -2
- package/dist/prompts/manager.d.ts +1 -1
- package/dist/prompts/manager.d.ts.map +1 -1
- package/dist/prompts/manager.js +1 -1
- package/dist/prompts.d.ts +8 -4
- package/dist/prompts.d.ts.map +1 -1
- package/dist/prompts.js +155 -177
- package/dist/repl/project-status.d.ts +19 -0
- package/dist/repl/project-status.d.ts.map +1 -0
- package/dist/repl/project-status.js +78 -0
- package/dist/repl-new.d.ts +15 -6
- package/dist/repl-new.d.ts.map +1 -1
- package/dist/repl-new.js +266 -83
- package/dist/{messages.d.ts → sessions/manager.d.ts} +13 -4
- package/dist/sessions/manager.d.ts.map +1 -0
- package/dist/{messages.js → sessions/manager.js} +126 -16
- package/dist/skills.d.ts +16 -0
- package/dist/skills.d.ts.map +1 -0
- package/dist/skills.js +233 -0
- package/dist/terminal/control.d.ts +56 -0
- package/dist/terminal/control.d.ts.map +1 -0
- package/dist/terminal/control.js +111 -0
- package/dist/terminal/default-theme.d.ts +1 -1
- package/dist/terminal/default-theme.d.ts.map +1 -1
- package/dist/terminal/default-theme.js +24 -28
- package/dist/terminal/formatting.d.ts +23 -26
- package/dist/terminal/formatting.d.ts.map +1 -1
- package/dist/terminal/formatting.js +35 -53
- package/dist/terminal/highlight/index.d.ts.map +1 -1
- package/dist/terminal/highlight/index.js +3 -6
- package/dist/terminal/highlight/theme.d.ts.map +1 -1
- package/dist/terminal/highlight/theme.js +2 -6
- package/dist/terminal/index.d.ts +2 -101
- package/dist/terminal/index.d.ts.map +1 -1
- package/dist/terminal/index.js +2 -464
- package/dist/terminal/keys.d.ts +211 -0
- package/dist/terminal/keys.d.ts.map +1 -0
- package/dist/terminal/keys.js +546 -0
- package/dist/terminal/segmenter.d.ts +6 -0
- package/dist/terminal/segmenter.d.ts.map +1 -0
- package/dist/terminal/segmenter.js +11 -0
- package/dist/terminal/select-prompt.d.ts.map +1 -1
- package/dist/terminal/select-prompt.js +9 -21
- package/dist/terminal/string-width.d.ts.map +1 -1
- package/dist/terminal/string-width.js +40 -21
- package/dist/terminal/strip-ansi.d.ts.map +1 -1
- package/dist/terminal/strip-ansi.js +9 -15
- package/dist/terminal/table/cell.d.ts +114 -0
- package/dist/terminal/table/cell.d.ts.map +1 -0
- package/dist/terminal/table/cell.js +407 -0
- package/dist/terminal/table/debug.d.ts +15 -0
- package/dist/terminal/table/debug.d.ts.map +1 -0
- package/dist/terminal/table/debug.js +32 -0
- package/dist/terminal/table/index.d.ts +3 -0
- package/dist/terminal/table/index.d.ts.map +1 -0
- package/dist/terminal/table/index.js +2 -0
- package/dist/terminal/table/layout-manager.d.ts +27 -0
- package/dist/terminal/table/layout-manager.d.ts.map +1 -0
- package/dist/terminal/table/layout-manager.js +257 -0
- package/dist/terminal/table/table.d.ts +9 -0
- package/dist/terminal/table/table.d.ts.map +1 -0
- package/dist/terminal/table/table.js +97 -0
- package/dist/terminal/table/utils.d.ts +63 -0
- package/dist/terminal/table/utils.d.ts.map +1 -0
- package/dist/terminal/table/utils.js +326 -0
- package/dist/tokens/tracker.d.ts.map +1 -1
- package/dist/tokens/tracker.js +58 -16
- package/dist/tools/bash.d.ts +11 -11
- package/dist/tools/bash.d.ts.map +1 -1
- package/dist/tools/bash.js +189 -81
- package/dist/tools/directory-tree.d.ts +9 -13
- package/dist/tools/directory-tree.d.ts.map +1 -1
- package/dist/tools/directory-tree.js +90 -60
- package/dist/tools/dynamic-tool-loader.d.ts +22 -8
- package/dist/tools/dynamic-tool-loader.d.ts.map +1 -1
- package/dist/tools/dynamic-tool-loader.js +41 -46
- package/dist/tools/edit-file.d.ts +6 -16
- package/dist/tools/edit-file.d.ts.map +1 -1
- package/dist/tools/edit-file.js +22 -66
- package/dist/tools/glob.d.ts +15 -16
- package/dist/tools/glob.d.ts.map +1 -1
- package/dist/tools/glob.js +78 -109
- package/dist/tools/grep.d.ts +19 -22
- package/dist/tools/grep.d.ts.map +1 -1
- package/dist/tools/grep.js +61 -93
- package/dist/tools/index.d.ts +202 -167
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +17 -273
- package/dist/tools/ls.d.ts +26 -0
- package/dist/tools/ls.d.ts.map +1 -0
- package/dist/tools/ls.js +80 -0
- package/dist/tools/read-file.d.ts +15 -15
- package/dist/tools/read-file.d.ts.map +1 -1
- package/dist/tools/read-file.js +52 -76
- package/dist/tools/save-file.d.ts +8 -8
- package/dist/tools/save-file.d.ts.map +1 -1
- package/dist/tools/save-file.js +42 -53
- package/dist/tools/think.d.ts +4 -4
- package/dist/tools/think.d.ts.map +1 -1
- package/dist/tools/think.js +9 -32
- package/dist/tools/types.d.ts +5 -21
- package/dist/tools/types.d.ts.map +1 -1
- package/dist/tools/types.js +0 -9
- package/dist/tui/autocomplete/attachment-provider.d.ts +18 -0
- package/dist/tui/autocomplete/attachment-provider.d.ts.map +1 -0
- package/dist/tui/autocomplete/attachment-provider.js +159 -0
- package/dist/tui/autocomplete/base-provider.d.ts +17 -0
- package/dist/tui/autocomplete/base-provider.d.ts.map +1 -0
- package/dist/tui/autocomplete/base-provider.js +1 -0
- package/dist/tui/autocomplete/combined-provider.d.ts +20 -0
- package/dist/tui/autocomplete/combined-provider.d.ts.map +1 -0
- package/dist/tui/autocomplete/combined-provider.js +61 -0
- package/dist/tui/autocomplete/command-provider.d.ts +20 -0
- package/dist/tui/autocomplete/command-provider.d.ts.map +1 -0
- package/dist/tui/autocomplete/command-provider.js +90 -0
- package/dist/tui/autocomplete/file-search-provider.d.ts +16 -0
- package/dist/tui/autocomplete/file-search-provider.d.ts.map +1 -0
- package/dist/tui/autocomplete/file-search-provider.js +123 -0
- package/dist/tui/autocomplete/path-provider.d.ts +21 -0
- package/dist/tui/autocomplete/path-provider.d.ts.map +1 -0
- package/dist/tui/autocomplete/path-provider.js +164 -0
- package/dist/tui/autocomplete/utils.d.ts +16 -0
- package/dist/tui/autocomplete/utils.d.ts.map +1 -0
- package/dist/tui/autocomplete/utils.js +137 -0
- package/dist/tui/autocomplete.d.ts +12 -43
- package/dist/tui/autocomplete.d.ts.map +1 -1
- package/dist/tui/autocomplete.js +20 -465
- package/dist/tui/components/assistant-message.js +1 -1
- package/dist/tui/components/box.d.ts +20 -0
- package/dist/tui/components/box.d.ts.map +1 -0
- package/dist/tui/components/box.js +87 -0
- package/dist/tui/components/editor.d.ts +61 -7
- package/dist/tui/components/editor.d.ts.map +1 -1
- package/dist/tui/components/editor.js +630 -127
- package/dist/tui/components/footer.d.ts +19 -18
- package/dist/tui/components/footer.d.ts.map +1 -1
- package/dist/tui/components/footer.js +90 -185
- package/dist/tui/components/header.d.ts +21 -0
- package/dist/tui/components/header.d.ts.map +1 -0
- package/dist/tui/components/header.js +63 -0
- package/dist/tui/components/input.d.ts.map +1 -1
- package/dist/tui/components/input.js +8 -7
- package/dist/tui/components/loader.d.ts +6 -1
- package/dist/tui/components/loader.d.ts.map +1 -1
- package/dist/tui/components/loader.js +8 -3
- package/dist/tui/components/markdown.d.ts +31 -27
- package/dist/tui/components/markdown.d.ts.map +1 -1
- package/dist/tui/components/markdown.js +131 -67
- package/dist/tui/components/modal.d.ts +0 -11
- package/dist/tui/components/modal.d.ts.map +1 -1
- package/dist/tui/components/modal.js +9 -37
- package/dist/tui/components/notification.d.ts +28 -0
- package/dist/tui/components/notification.d.ts.map +1 -0
- package/dist/tui/components/notification.js +63 -0
- package/dist/tui/components/progress-bar.d.ts +19 -0
- package/dist/tui/components/progress-bar.d.ts.map +1 -0
- package/dist/tui/components/progress-bar.js +66 -0
- package/dist/tui/components/select-list.d.ts +12 -1
- package/dist/tui/components/select-list.d.ts.map +1 -1
- package/dist/tui/components/select-list.js +73 -32
- package/dist/tui/components/spacer.d.ts +1 -1
- package/dist/tui/components/spacer.d.ts.map +1 -1
- package/dist/tui/components/spacer.js +2 -2
- package/dist/tui/components/table.d.ts +27 -0
- package/dist/tui/components/table.d.ts.map +1 -0
- package/dist/tui/components/table.js +125 -0
- package/dist/tui/components/thinking-block.d.ts.map +1 -1
- package/dist/tui/components/thinking-block.js +4 -1
- package/dist/tui/components/tool-execution.d.ts +7 -6
- package/dist/tui/components/tool-execution.d.ts.map +1 -1
- package/dist/tui/components/tool-execution.js +81 -85
- package/dist/tui/components/user-message.d.ts.map +1 -1
- package/dist/tui/components/user-message.js +6 -4
- package/dist/tui/components/welcome.d.ts +8 -1
- package/dist/tui/components/welcome.d.ts.map +1 -1
- package/dist/tui/components/welcome.js +45 -6
- package/dist/tui/index.d.ts +12 -6
- package/dist/tui/index.d.ts.map +1 -1
- package/dist/tui/index.js +7 -3
- package/dist/tui/terminal.d.ts +4 -3
- package/dist/tui/terminal.d.ts.map +1 -1
- package/dist/tui/terminal.js +43 -49
- package/dist/tui/tui.d.ts +3 -0
- package/dist/tui/tui.d.ts.map +1 -1
- package/dist/tui/tui.js +58 -43
- package/dist/tui/utils.d.ts +5 -0
- package/dist/tui/utils.d.ts.map +1 -1
- package/dist/tui/utils.js +80 -1
- package/dist/{tools/bash-utils.d.ts → utils/bash.d.ts} +3 -3
- package/dist/utils/bash.d.ts.map +1 -0
- package/dist/{tools/bash-utils.js → utils/bash.js} +22 -11
- package/dist/utils/{filesystem.d.ts → filesystem/operations.d.ts} +1 -1
- package/dist/utils/filesystem/operations.d.ts.map +1 -0
- package/dist/{tools/filesystem-utils.d.ts → utils/filesystem/security.d.ts} +3 -2
- package/dist/utils/filesystem/security.d.ts.map +1 -0
- package/dist/{tools/filesystem-utils.js → utils/filesystem/security.js} +62 -4
- package/dist/utils/funcs.d.ts +6 -0
- package/dist/utils/funcs.d.ts.map +1 -0
- package/dist/utils/funcs.js +6 -0
- package/dist/{tools/git-utils.d.ts → utils/git.d.ts} +1 -1
- package/dist/utils/git.d.ts.map +1 -0
- package/dist/{tools/git-utils.js → utils/git.js} +0 -6
- package/dist/utils/glob.js +1 -1
- package/dist/utils/yaml.d.ts +11 -0
- package/dist/utils/yaml.d.ts.map +1 -0
- package/dist/utils/yaml.js +207 -0
- package/dist/utils/{zod-utils.d.ts → zod.d.ts} +2 -1
- package/dist/utils/zod.d.ts.map +1 -0
- package/dist/utils/zod.js +24 -0
- package/package.json +31 -29
- package/dist/agent/manual-loop.d.ts +0 -41
- package/dist/agent/manual-loop.d.ts.map +0 -1
- package/dist/agent/manual-loop.js +0 -278
- package/dist/api/exa/index.d.ts +0 -177
- package/dist/api/exa/index.d.ts.map +0 -1
- package/dist/api/exa/index.js +0 -439
- package/dist/commands/add-directory-command.d.ts +0 -3
- package/dist/commands/add-directory-command.d.ts.map +0 -1
- package/dist/commands/add-directory-command.js +0 -85
- package/dist/commands/application-log-command.d.ts +0 -3
- package/dist/commands/application-log-command.d.ts.map +0 -1
- package/dist/commands/application-log-command.js +0 -79
- package/dist/commands/clear-command.d.ts +0 -3
- package/dist/commands/clear-command.d.ts.map +0 -1
- package/dist/commands/compact-command.d.ts +0 -3
- package/dist/commands/compact-command.d.ts.map +0 -1
- package/dist/commands/compact-command.js +0 -64
- package/dist/commands/context-command.d.ts +0 -3
- package/dist/commands/context-command.d.ts.map +0 -1
- package/dist/commands/context-command.js +0 -183
- package/dist/commands/copy-command.d.ts +0 -3
- package/dist/commands/copy-command.d.ts.map +0 -1
- package/dist/commands/copy-command.js +0 -80
- package/dist/commands/edit-command.d.ts +0 -3
- package/dist/commands/edit-command.d.ts.map +0 -1
- package/dist/commands/edit-command.js +0 -88
- package/dist/commands/edit-prompt-command.d.ts +0 -3
- package/dist/commands/edit-prompt-command.d.ts.map +0 -1
- package/dist/commands/edit-prompt-command.js +0 -61
- package/dist/commands/exit-command.d.ts +0 -13
- package/dist/commands/exit-command.d.ts.map +0 -1
- package/dist/commands/exit-command.js +0 -46
- package/dist/commands/files-command.d.ts +0 -3
- package/dist/commands/files-command.d.ts.map +0 -1
- package/dist/commands/files-command.js +0 -121
- package/dist/commands/generate-rules-command.d.ts +0 -3
- package/dist/commands/generate-rules-command.d.ts.map +0 -1
- package/dist/commands/handoff-command.d.ts +0 -3
- package/dist/commands/handoff-command.d.ts.map +0 -1
- package/dist/commands/handoff-command.js +0 -202
- package/dist/commands/health-command.d.ts +0 -4
- package/dist/commands/health-command.d.ts.map +0 -1
- package/dist/commands/health-command.js +0 -213
- package/dist/commands/help-command.d.ts +0 -3
- package/dist/commands/help-command.d.ts.map +0 -1
- package/dist/commands/history-command.d.ts +0 -3
- package/dist/commands/history-command.d.ts.map +0 -1
- package/dist/commands/init-command.d.ts +0 -3
- package/dist/commands/init-command.d.ts.map +0 -1
- package/dist/commands/last-log-command.d.ts +0 -3
- package/dist/commands/last-log-command.d.ts.map +0 -1
- package/dist/commands/last-log-command.js +0 -98
- package/dist/commands/list-directories-command.d.ts +0 -3
- package/dist/commands/list-directories-command.d.ts.map +0 -1
- package/dist/commands/list-tools-command.d.ts +0 -3
- package/dist/commands/list-tools-command.d.ts.map +0 -1
- package/dist/commands/list-tools-command.js +0 -124
- package/dist/commands/model-command.d.ts +0 -25
- package/dist/commands/model-command.d.ts.map +0 -1
- package/dist/commands/model-command.js +0 -340
- package/dist/commands/paste-command.d.ts +0 -3
- package/dist/commands/paste-command.d.ts.map +0 -1
- package/dist/commands/paste-command.js +0 -277
- package/dist/commands/pickup-command.d.ts +0 -3
- package/dist/commands/pickup-command.d.ts.map +0 -1
- package/dist/commands/pickup-command.js +0 -161
- package/dist/commands/prompt-command.d.ts +0 -3
- package/dist/commands/prompt-command.d.ts.map +0 -1
- package/dist/commands/prompt-command.js +0 -280
- package/dist/commands/remove-directory-command.d.ts +0 -3
- package/dist/commands/remove-directory-command.d.ts.map +0 -1
- package/dist/commands/reset-command.d.ts +0 -3
- package/dist/commands/reset-command.d.ts.map +0 -1
- package/dist/commands/rules-command.d.ts +0 -3
- package/dist/commands/rules-command.d.ts.map +0 -1
- package/dist/commands/rules-command.js +0 -135
- package/dist/commands/save-command.d.ts +0 -3
- package/dist/commands/save-command.d.ts.map +0 -1
- package/dist/commands/shell-command.d.ts +0 -3
- package/dist/commands/shell-command.d.ts.map +0 -1
- package/dist/commands/usage-command.d.ts +0 -3
- package/dist/commands/usage-command.d.ts.map +0 -1
- package/dist/commands/usage-command.js +0 -42
- package/dist/messages.d.ts.map +0 -1
- package/dist/repl/display-tool-messages.d.ts +0 -4
- package/dist/repl/display-tool-messages.d.ts.map +0 -1
- package/dist/repl/display-tool-messages.js +0 -58
- package/dist/repl/display-tool-use.d.ts +0 -14
- package/dist/repl/display-tool-use.d.ts.map +0 -1
- package/dist/repl/display-tool-use.js +0 -63
- package/dist/repl/get-prompt-header.d.ts +0 -8
- package/dist/repl/get-prompt-header.d.ts.map +0 -1
- package/dist/repl/get-prompt-header.js +0 -9
- package/dist/repl/project-status-line.d.ts +0 -2
- package/dist/repl/project-status-line.d.ts.map +0 -1
- package/dist/repl/project-status-line.js +0 -31
- package/dist/repl/prompt.d.ts +0 -21
- package/dist/repl/prompt.d.ts.map +0 -1
- package/dist/repl/prompt.js +0 -244
- package/dist/repl/tool-call-repair.d.ts +0 -4
- package/dist/repl/tool-call-repair.d.ts.map +0 -1
- package/dist/repl/tool-call-repair.js +0 -54
- package/dist/repl.d.ts +0 -29
- package/dist/repl.d.ts.map +0 -1
- package/dist/repl.js +0 -218
- package/dist/terminal/checkbox-prompt.d.ts +0 -36
- package/dist/terminal/checkbox-prompt.d.ts.map +0 -1
- package/dist/terminal/checkbox-prompt.js +0 -368
- package/dist/terminal/editor-prompt.d.ts +0 -10
- package/dist/terminal/editor-prompt.d.ts.map +0 -1
- package/dist/terminal/editor-prompt.js +0 -61
- package/dist/terminal/errors.d.ts +0 -19
- package/dist/terminal/errors.d.ts.map +0 -1
- package/dist/terminal/errors.js +0 -37
- package/dist/terminal/input-prompt.d.ts +0 -17
- package/dist/terminal/input-prompt.d.ts.map +0 -1
- package/dist/terminal/input-prompt.js +0 -181
- package/dist/terminal/markdown.d.ts +0 -2
- package/dist/terminal/markdown.d.ts.map +0 -1
- package/dist/terminal/markdown.js +0 -118
- package/dist/terminal/search-prompt.d.ts +0 -20
- package/dist/terminal/search-prompt.d.ts.map +0 -1
- package/dist/terminal/search-prompt.js +0 -280
- package/dist/terminal/types.d.ts +0 -35
- package/dist/terminal/types.d.ts.map +0 -1
- package/dist/tokens/threshold.d.ts +0 -35
- package/dist/tokens/threshold.d.ts.map +0 -1
- package/dist/tokens/threshold.js +0 -85
- package/dist/tools/advanced-edit-file.d.ts +0 -69
- package/dist/tools/advanced-edit-file.d.ts.map +0 -1
- package/dist/tools/advanced-edit-file.js +0 -281
- package/dist/tools/agent.d.ts +0 -29
- package/dist/tools/agent.d.ts.map +0 -1
- package/dist/tools/agent.js +0 -103
- package/dist/tools/bash-utils.d.ts.map +0 -1
- package/dist/tools/code-interpreter.d.ts +0 -25
- package/dist/tools/code-interpreter.d.ts.map +0 -1
- package/dist/tools/code-interpreter.js +0 -167
- package/dist/tools/delete-file.d.ts +0 -24
- package/dist/tools/delete-file.d.ts.map +0 -1
- package/dist/tools/delete-file.js +0 -70
- package/dist/tools/dynamic-tool-parser.d.ts +0 -21
- package/dist/tools/dynamic-tool-parser.d.ts.map +0 -1
- package/dist/tools/dynamic-tool-parser.js +0 -22
- package/dist/tools/filesystem-utils.d.ts.map +0 -1
- package/dist/tools/git-utils.d.ts.map +0 -1
- package/dist/tools/llm-edit-fixer.d.ts +0 -25
- package/dist/tools/llm-edit-fixer.d.ts.map +0 -1
- package/dist/tools/llm-edit-fixer.js +0 -150
- package/dist/tools/move-file.d.ts +0 -26
- package/dist/tools/move-file.d.ts.map +0 -1
- package/dist/tools/move-file.js +0 -58
- package/dist/tools/read-multiple-files.d.ts +0 -26
- package/dist/tools/read-multiple-files.d.ts.map +0 -1
- package/dist/tools/read-multiple-files.js +0 -139
- package/dist/tools/web-fetch.d.ts +0 -56
- package/dist/tools/web-fetch.d.ts.map +0 -1
- package/dist/tools/web-fetch.js +0 -247
- package/dist/tools/web-search.d.ts +0 -23
- package/dist/tools/web-search.d.ts.map +0 -1
- package/dist/tools/web-search.js +0 -133
- package/dist/tui/components/prompt-status.d.ts +0 -16
- package/dist/tui/components/prompt-status.d.ts.map +0 -1
- package/dist/tui/components/prompt-status.js +0 -21
- package/dist/utils/filesystem.d.ts.map +0 -1
- package/dist/utils/zod-utils.d.ts.map +0 -1
- package/dist/utils/zod-utils.js +0 -7
- /package/dist/{terminal → commands/add-directory}/types.js +0 -0
- /package/dist/utils/{filesystem.js → filesystem/operations.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"markdown.d.ts","sourceRoot":"","sources":["../../../source/tui/components/markdown.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"markdown.d.ts","sourceRoot":"","sources":["../../../source/tui/components/markdown.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,27 +1,50 @@
|
|
|
1
|
-
import Table from "cli-table3";
|
|
2
1
|
import { marked } from "marked";
|
|
3
|
-
import {
|
|
2
|
+
import { DEFAULT_HIGHLIGHT_THEME } from "../../terminal/default-theme.js";
|
|
3
|
+
import { link as terminalLink } from "../../terminal/formatting.js";
|
|
4
4
|
import { highlight, supportsLanguage } from "../../terminal/highlight/index.js";
|
|
5
5
|
import { getListNumber } from "../../terminal/markdown-utils.js";
|
|
6
|
+
import stripAnsi from "../../terminal/strip-ansi.js";
|
|
6
7
|
import style from "../../terminal/style.js";
|
|
8
|
+
import { Table } from "../../terminal/table/index.js";
|
|
7
9
|
import wrapAnsi from "../../terminal/wrap-ansi.js";
|
|
8
10
|
import { applyBackgroundToLine, visibleWidth } from "../utils.js";
|
|
11
|
+
const DEFAULT_THEME = {
|
|
12
|
+
heading: (text) => style.bold.yellow(text),
|
|
13
|
+
paragraph: (text) => text,
|
|
14
|
+
link: (text) => style.underline.blue(text),
|
|
15
|
+
linkUrl: (text) => style.gray(text),
|
|
16
|
+
code: (text) => style.cyan(text),
|
|
17
|
+
codeBlock: (text) => style.green(text),
|
|
18
|
+
codeBlockBorder: (text) => style.gray(text),
|
|
19
|
+
quote: (text) => style.italic(text),
|
|
20
|
+
quoteBorder: (text) => style.gray(text),
|
|
21
|
+
hr: (text) => style.gray(text),
|
|
22
|
+
listBullet: (text) => style.cyan(text),
|
|
23
|
+
bold: (text) => style.bold(text),
|
|
24
|
+
italic: (text) => style.italic(text),
|
|
25
|
+
strikethrough: (text) => style.strikethrough(text),
|
|
26
|
+
underline: (text) => style.underline(text),
|
|
27
|
+
};
|
|
9
28
|
export class Markdown {
|
|
10
29
|
text;
|
|
11
30
|
bgColor;
|
|
12
31
|
customBgRgb;
|
|
13
32
|
paddingX; // Left/right padding
|
|
14
33
|
paddingY; // Top/bottom padding
|
|
34
|
+
theme;
|
|
35
|
+
highlightTheme;
|
|
15
36
|
// Cache for rendered output
|
|
16
37
|
cachedText;
|
|
17
38
|
cachedWidth;
|
|
18
39
|
cachedLines;
|
|
19
|
-
constructor(text
|
|
40
|
+
constructor(text, options = {}) {
|
|
20
41
|
this.text = text;
|
|
21
|
-
this.bgColor = bgColor;
|
|
22
|
-
this.customBgRgb = customBgRgb;
|
|
23
|
-
this.paddingX = paddingX;
|
|
24
|
-
this.paddingY = paddingY;
|
|
42
|
+
this.bgColor = options.bgColor;
|
|
43
|
+
this.customBgRgb = options.customBgRgb;
|
|
44
|
+
this.paddingX = options.paddingX ?? 1;
|
|
45
|
+
this.paddingY = options.paddingY ?? 1;
|
|
46
|
+
this.theme = options.theme ?? DEFAULT_THEME;
|
|
47
|
+
this.highlightTheme = options.highlightTheme ?? DEFAULT_HIGHLIGHT_THEME;
|
|
25
48
|
}
|
|
26
49
|
setText(text) {
|
|
27
50
|
this.text = text;
|
|
@@ -139,20 +162,20 @@ export class Markdown {
|
|
|
139
162
|
const headingPrefix = `${"#".repeat(headingLevel)} `;
|
|
140
163
|
const headingText = this.renderInlineTokens(token.tokens || []);
|
|
141
164
|
if (headingLevel === 1) {
|
|
142
|
-
lines.push(style.
|
|
165
|
+
lines.push(style.underline(this.theme.heading(headingText)));
|
|
143
166
|
}
|
|
144
167
|
else if (headingLevel === 2) {
|
|
145
|
-
lines.push(
|
|
168
|
+
lines.push(this.theme.heading(headingText));
|
|
146
169
|
}
|
|
147
170
|
else {
|
|
148
|
-
lines.push(
|
|
171
|
+
lines.push(this.theme.heading(headingPrefix + headingText));
|
|
149
172
|
}
|
|
150
173
|
lines.push(""); // Add spacing after headings
|
|
151
174
|
break;
|
|
152
175
|
}
|
|
153
176
|
case "paragraph": {
|
|
154
177
|
const paragraphText = this.renderInlineTokens(token.tokens || []);
|
|
155
|
-
lines.push(paragraphText);
|
|
178
|
+
lines.push(this.theme.paragraph(paragraphText));
|
|
156
179
|
// Don't add spacing if next token is space or list
|
|
157
180
|
if (nextTokenType &&
|
|
158
181
|
nextTokenType !== "list" &&
|
|
@@ -166,23 +189,23 @@ export class Markdown {
|
|
|
166
189
|
// Use syntax highlighting for supported languages
|
|
167
190
|
const highlightedCode = highlight(token.text, {
|
|
168
191
|
language: token.lang,
|
|
169
|
-
theme:
|
|
192
|
+
theme: this.highlightTheme,
|
|
170
193
|
});
|
|
171
194
|
const codeLines = highlightedCode.split("\n");
|
|
172
|
-
lines.push(
|
|
195
|
+
lines.push(this.theme.codeBlockBorder(`\`\`\`${token.lang}`));
|
|
173
196
|
for (const codeLine of codeLines) {
|
|
174
197
|
lines.push(style.dim(" ") + codeLine);
|
|
175
198
|
}
|
|
176
|
-
lines.push(
|
|
199
|
+
lines.push(this.theme.codeBlockBorder("```"));
|
|
177
200
|
}
|
|
178
201
|
else {
|
|
179
202
|
// Fallback to basic styling for unsupported languages
|
|
180
|
-
lines.push(
|
|
203
|
+
lines.push(this.theme.codeBlockBorder(`\`\`\`${token.lang || ""}`));
|
|
181
204
|
const codeLines = token.text.split("\n");
|
|
182
205
|
for (const codeLine of codeLines) {
|
|
183
|
-
lines.push(style.dim(" ") +
|
|
206
|
+
lines.push(style.dim(" ") + this.theme.codeBlock(codeLine));
|
|
184
207
|
}
|
|
185
|
-
lines.push(
|
|
208
|
+
lines.push(this.theme.codeBlockBorder("```"));
|
|
186
209
|
}
|
|
187
210
|
lines.push(""); // Add spacing after code blocks
|
|
188
211
|
break;
|
|
@@ -203,13 +226,13 @@ export class Markdown {
|
|
|
203
226
|
const quoteText = this.renderInlineTokens(token.tokens || []);
|
|
204
227
|
const quoteLines = quoteText.split("\n");
|
|
205
228
|
for (const quoteLine of quoteLines) {
|
|
206
|
-
lines.push(
|
|
229
|
+
lines.push(this.theme.quoteBorder("│ ") + this.theme.quote(quoteLine));
|
|
207
230
|
}
|
|
208
231
|
lines.push(""); // Add spacing after blockquotes
|
|
209
232
|
break;
|
|
210
233
|
}
|
|
211
234
|
case "hr":
|
|
212
|
-
lines.push(
|
|
235
|
+
lines.push(this.theme.hr("─".repeat(Math.min(width, 80))));
|
|
213
236
|
lines.push(""); // Add spacing after horizontal rules
|
|
214
237
|
break;
|
|
215
238
|
case "image": {
|
|
@@ -252,23 +275,28 @@ export class Markdown {
|
|
|
252
275
|
}
|
|
253
276
|
break;
|
|
254
277
|
case "strong":
|
|
255
|
-
result +=
|
|
278
|
+
result += this.theme.bold(this.renderInlineTokens(token.tokens || []));
|
|
256
279
|
break;
|
|
257
280
|
case "em":
|
|
258
|
-
result +=
|
|
281
|
+
result += this.theme.italic(this.renderInlineTokens(token.tokens || []));
|
|
259
282
|
break;
|
|
260
283
|
case "codespan":
|
|
261
|
-
result +=
|
|
284
|
+
result +=
|
|
285
|
+
this.theme.codeBlockBorder("`") +
|
|
286
|
+
this.theme.code(token.text) +
|
|
287
|
+
this.theme.codeBlockBorder("`");
|
|
262
288
|
break;
|
|
263
289
|
case "link": {
|
|
264
290
|
const linkText = this.renderInlineTokens(token.tokens || []);
|
|
291
|
+
const terminalLinkText = terminalLink(linkText, token.href);
|
|
265
292
|
// If link text matches href, only show the link once
|
|
266
293
|
if (linkText === token.href) {
|
|
267
|
-
result +=
|
|
294
|
+
result += this.theme.link(terminalLinkText ?? linkText);
|
|
268
295
|
}
|
|
269
296
|
else {
|
|
270
297
|
result +=
|
|
271
|
-
|
|
298
|
+
this.theme.link(terminalLinkText ?? linkText) +
|
|
299
|
+
this.theme.linkUrl(` (${token.href})`);
|
|
272
300
|
}
|
|
273
301
|
break;
|
|
274
302
|
}
|
|
@@ -276,7 +304,7 @@ export class Markdown {
|
|
|
276
304
|
result += "\n";
|
|
277
305
|
break;
|
|
278
306
|
case "del":
|
|
279
|
-
result +=
|
|
307
|
+
result += this.theme.strikethrough(this.renderInlineTokens(token.tokens || []));
|
|
280
308
|
break;
|
|
281
309
|
case "image": {
|
|
282
310
|
const alt = (token.title ?? token.text ?? "").toString().trim();
|
|
@@ -297,7 +325,7 @@ export class Markdown {
|
|
|
297
325
|
}
|
|
298
326
|
return result;
|
|
299
327
|
}
|
|
300
|
-
wrapLine(line,
|
|
328
|
+
wrapLine(line, contentWidth) {
|
|
301
329
|
// Handle undefined or null lines
|
|
302
330
|
if (!line) {
|
|
303
331
|
return [""];
|
|
@@ -306,12 +334,46 @@ export class Markdown {
|
|
|
306
334
|
// by temporarily replacing them with placeholders
|
|
307
335
|
const { protectedText, codeSpans } = this.protectCodeSpans(line);
|
|
308
336
|
// Use the existing wrapAnsi function for robust ANSI-aware wrapping
|
|
309
|
-
|
|
337
|
+
// Use contentWidth (available width after padding) for wrapping
|
|
338
|
+
const wrappedText = wrapAnsi(protectedText, contentWidth, { trim: false });
|
|
310
339
|
const lines = wrappedText.split("\n");
|
|
311
340
|
// Restore the code spans
|
|
312
341
|
const restoredLines = this.restoreCodeSpans(lines, codeSpans);
|
|
313
342
|
return restoredLines;
|
|
314
343
|
}
|
|
344
|
+
/**
|
|
345
|
+
* Map a position in clean text to the corresponding position in styled text
|
|
346
|
+
* This accounts for ANSI escape codes that are inserted between characters
|
|
347
|
+
*/
|
|
348
|
+
cleanToStyledIndex(cleanText, styledText, cleanIndex) {
|
|
349
|
+
let cleanPos = 0;
|
|
350
|
+
let styledPos = 0;
|
|
351
|
+
while (cleanPos < cleanIndex && styledPos < styledText.length) {
|
|
352
|
+
const char = cleanText[cleanPos];
|
|
353
|
+
// Check if we're at an ANSI escape sequence in the styled text
|
|
354
|
+
const escapeChar = String.fromCharCode(27);
|
|
355
|
+
if (styledText[styledPos] === escapeChar) {
|
|
356
|
+
// Skip the entire ANSI escape sequence
|
|
357
|
+
while (styledPos < styledText.length && styledText[styledPos] !== "m") {
|
|
358
|
+
styledPos++;
|
|
359
|
+
}
|
|
360
|
+
// Skip the 'm' character too
|
|
361
|
+
styledPos++;
|
|
362
|
+
// Don't increment cleanPos - ANSI codes are inserted between characters
|
|
363
|
+
}
|
|
364
|
+
else if (styledText[styledPos] === char) {
|
|
365
|
+
// Characters match, advance both
|
|
366
|
+
cleanPos++;
|
|
367
|
+
styledPos++;
|
|
368
|
+
}
|
|
369
|
+
else {
|
|
370
|
+
// Characters don't match - this shouldn't happen if cleanText is derived from styledText
|
|
371
|
+
// But to be safe, just advance styledPos
|
|
372
|
+
styledPos++;
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
return styledPos;
|
|
376
|
+
}
|
|
315
377
|
/**
|
|
316
378
|
* Protect inline code spans by replacing them with placeholders
|
|
317
379
|
* This prevents wrapAnsi from breaking code spans across lines
|
|
@@ -320,47 +382,49 @@ export class Markdown {
|
|
|
320
382
|
const codeSpans = [];
|
|
321
383
|
let protectedText = text;
|
|
322
384
|
let placeholderIndex = 0;
|
|
323
|
-
//
|
|
324
|
-
//
|
|
325
|
-
|
|
326
|
-
// Use
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
//
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
385
|
+
// Create a version of the text without ANSI codes for code span detection
|
|
386
|
+
// This allows us to reliably find code spans regardless of styling
|
|
387
|
+
const cleanText = stripAnsi(text);
|
|
388
|
+
// Use the clean text to find code spans
|
|
389
|
+
let i = 0;
|
|
390
|
+
while (i < cleanText.length) {
|
|
391
|
+
// Find the next backtick in clean text
|
|
392
|
+
const backtickIndex = cleanText.indexOf("`", i);
|
|
393
|
+
if (backtickIndex === -1)
|
|
394
|
+
break;
|
|
395
|
+
// Look for the closing backtick in clean text
|
|
396
|
+
let closingIndex = -1;
|
|
397
|
+
let depth = 1;
|
|
398
|
+
for (let j = backtickIndex + 1; j < cleanText.length; j++) {
|
|
399
|
+
if (cleanText[j] === "`") {
|
|
400
|
+
depth--;
|
|
401
|
+
if (depth === 0) {
|
|
402
|
+
closingIndex = j;
|
|
403
|
+
break;
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
if (closingIndex !== -1) {
|
|
408
|
+
// Map the positions to the styled text
|
|
409
|
+
const styledStart = this.cleanToStyledIndex(cleanText, text, backtickIndex);
|
|
410
|
+
const styledEnd = this.cleanToStyledIndex(cleanText, text, closingIndex + 1);
|
|
411
|
+
// Extract the styled code span
|
|
412
|
+
const styledCodeSpan = text.slice(styledStart, styledEnd);
|
|
341
413
|
const placeholder = `__CODE_SPAN_${placeholderIndex}__`;
|
|
342
|
-
|
|
343
|
-
|
|
414
|
+
// Store the full styled code span for restoration
|
|
415
|
+
codeSpans.push(styledCodeSpan);
|
|
416
|
+
// Replace with placeholder
|
|
417
|
+
protectedText = protectedText.replace(styledCodeSpan, placeholder);
|
|
344
418
|
placeholderIndex++;
|
|
419
|
+
// Move past this code span
|
|
420
|
+
i = closingIndex + 1;
|
|
421
|
+
continue;
|
|
345
422
|
}
|
|
423
|
+
// Move to next character
|
|
424
|
+
i = backtickIndex + 1;
|
|
346
425
|
}
|
|
347
426
|
return { protectedText, codeSpans };
|
|
348
427
|
}
|
|
349
|
-
/**
|
|
350
|
-
* Check if a potential code span is an actual code span (not escaped backticks)
|
|
351
|
-
*/
|
|
352
|
-
isActualCodeSpan(text, startIndex, endIndex) {
|
|
353
|
-
// If the text around the code span contains ANSI escape sequences,
|
|
354
|
-
// it's likely an actual code span that was processed by renderInlineTokens
|
|
355
|
-
// Look for ANSI escape sequences in the surrounding context
|
|
356
|
-
const contextStart = Math.max(0, startIndex - 10);
|
|
357
|
-
const contextEnd = Math.min(text.length, endIndex + 10);
|
|
358
|
-
const context = text.slice(contextStart, contextEnd);
|
|
359
|
-
// Check for ANSI escape sequences that would indicate styled code
|
|
360
|
-
// Use String.fromCharCode(27) to avoid control characters in regex
|
|
361
|
-
const escapeChar = String.fromCharCode(27);
|
|
362
|
-
return context.includes(`${escapeChar}[`);
|
|
363
|
-
}
|
|
364
428
|
/**
|
|
365
429
|
* Check if a line represents a nested list item
|
|
366
430
|
*/
|
|
@@ -430,7 +494,7 @@ export class Markdown {
|
|
|
430
494
|
}
|
|
431
495
|
else {
|
|
432
496
|
// Regular text content - add indent and bullet
|
|
433
|
-
lines.push(indent +
|
|
497
|
+
lines.push(indent + this.theme.listBullet(bullet) + firstLine);
|
|
434
498
|
}
|
|
435
499
|
// Rest of the lines
|
|
436
500
|
for (let j = 1; j < itemLines.length; j++) {
|
|
@@ -447,7 +511,7 @@ export class Markdown {
|
|
|
447
511
|
}
|
|
448
512
|
}
|
|
449
513
|
else {
|
|
450
|
-
lines.push(indent +
|
|
514
|
+
lines.push(indent + this.theme.listBullet(bullet));
|
|
451
515
|
}
|
|
452
516
|
}
|
|
453
517
|
return lines;
|
|
@@ -479,12 +543,12 @@ export class Markdown {
|
|
|
479
543
|
}
|
|
480
544
|
else if (token.type === "code") {
|
|
481
545
|
// Code block in list item
|
|
482
|
-
lines.push(
|
|
546
|
+
lines.push(this.theme.codeBlockBorder(`\`\`\`${token.lang || ""}`));
|
|
483
547
|
const codeLines = token.text.split("\n");
|
|
484
548
|
for (const codeLine of codeLines) {
|
|
485
|
-
lines.push(style.dim(" ") +
|
|
549
|
+
lines.push(style.dim(" ") + this.theme.codeBlock(codeLine));
|
|
486
550
|
}
|
|
487
|
-
lines.push(
|
|
551
|
+
lines.push(this.theme.codeBlockBorder("```"));
|
|
488
552
|
}
|
|
489
553
|
else {
|
|
490
554
|
// Other token types - try to render as inline
|
|
@@ -26,15 +26,4 @@ export declare class ModalText extends Container {
|
|
|
26
26
|
constructor(text: string, paddingX?: number, paddingY?: number);
|
|
27
27
|
render(width: number): string[];
|
|
28
28
|
}
|
|
29
|
-
/**
|
|
30
|
-
* ModalTable component - displays tabular data in a modal
|
|
31
|
-
* Uses the terminal table function for proper text wrapping and formatting
|
|
32
|
-
*/
|
|
33
|
-
export declare class ModalTable extends Container {
|
|
34
|
-
private data;
|
|
35
|
-
private headers?;
|
|
36
|
-
private colWidths?;
|
|
37
|
-
constructor(data: (string | number)[][], headers?: string[], colWidths?: number[]);
|
|
38
|
-
render(width: number): string[];
|
|
39
|
-
}
|
|
40
29
|
//# sourceMappingURL=modal.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modal.d.ts","sourceRoot":"","sources":["../../../source/tui/components/modal.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"modal.d.ts","sourceRoot":"","sources":["../../../source/tui/components/modal.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAGtC;;GAEG;AACH,qBAAa,KAAM,SAAQ,SAAU,YAAW,SAAS;IACvD,OAAO,CAAC,KAAK,CAAS;IACf,QAAQ,EAAE,OAAO,CAAC;IACzB,OAAO,CAAC,OAAO,CAAC,CAAa;IAC7B,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,SAAS,CAAS;IAC1B,OAAO,CAAC,cAAc,CAAK;gBAGzB,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,SAAS,EAClB,QAAQ,UAAO,EACf,OAAO,CAAC,EAAE,MAAM,IAAI,EACpB,QAAQ,CAAC,EAAE,MAAM,EACjB,SAAS,CAAC,EAAE,MAAM;IAYpB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAgD/B,KAAK,IAAI,IAAI;IAMJ,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE;IAqHxC,iBAAiB,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI;CA2B7C;AAED;;GAEG;AACH,qBAAa,SAAU,SAAQ,SAAS;IACtC,OAAO,CAAC,IAAI,CAAS;IACrB,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,QAAQ,CAAS;gBAEb,IAAI,EAAE,MAAM,EAAE,QAAQ,SAAI,EAAE,QAAQ,SAAI;IAO3C,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE;CAkFzC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { getTerminalSize } from "../../terminal/
|
|
2
|
-
import {
|
|
1
|
+
import { getTerminalSize } from "../../terminal/control.js";
|
|
2
|
+
import { isArrowDown, isArrowUp, isEnd, isEscape, isHome, isPageDown, isPageUp, } from "../../terminal/keys.js";
|
|
3
3
|
import style from "../../terminal/style.js";
|
|
4
4
|
import { Container } from "../tui.js";
|
|
5
5
|
import { visibleWidth } from "../utils.js";
|
|
@@ -25,37 +25,37 @@ export class Modal extends Container {
|
|
|
25
25
|
}
|
|
26
26
|
handleInput(data) {
|
|
27
27
|
// Handle Escape key to close modal
|
|
28
|
-
if (data
|
|
28
|
+
if (isEscape(data)) {
|
|
29
29
|
this.close();
|
|
30
30
|
return;
|
|
31
31
|
}
|
|
32
32
|
// Handle scrolling
|
|
33
|
-
if (data
|
|
33
|
+
if (isArrowUp(data)) {
|
|
34
34
|
// Up arrow
|
|
35
35
|
this.scrollPosition = Math.max(0, this.scrollPosition - 1);
|
|
36
36
|
return;
|
|
37
37
|
}
|
|
38
|
-
if (data
|
|
38
|
+
if (isArrowDown(data)) {
|
|
39
39
|
// Down arrow
|
|
40
40
|
this.scrollPosition += 1;
|
|
41
41
|
return;
|
|
42
42
|
}
|
|
43
|
-
if (data
|
|
43
|
+
if (isPageUp(data)) {
|
|
44
44
|
// Page up
|
|
45
45
|
this.scrollPosition = Math.max(0, this.scrollPosition - 10);
|
|
46
46
|
return;
|
|
47
47
|
}
|
|
48
|
-
if (data
|
|
48
|
+
if (isPageDown(data)) {
|
|
49
49
|
// Page down
|
|
50
50
|
this.scrollPosition += 10;
|
|
51
51
|
return;
|
|
52
52
|
}
|
|
53
|
-
if (data
|
|
53
|
+
if (isHome(data) || data === "g") {
|
|
54
54
|
// Home key or 'g' for top
|
|
55
55
|
this.scrollPosition = 0;
|
|
56
56
|
return;
|
|
57
57
|
}
|
|
58
|
-
if (data
|
|
58
|
+
if (isEnd(data) || data === "G") {
|
|
59
59
|
// End key or 'G' for bottom
|
|
60
60
|
this.scrollPosition = Number.POSITIVE_INFINITY; // Will be clamped in render
|
|
61
61
|
return;
|
|
@@ -262,31 +262,3 @@ export class ModalText extends Container {
|
|
|
262
262
|
return paddedLines;
|
|
263
263
|
}
|
|
264
264
|
}
|
|
265
|
-
/**
|
|
266
|
-
* ModalTable component - displays tabular data in a modal
|
|
267
|
-
* Uses the terminal table function for proper text wrapping and formatting
|
|
268
|
-
*/
|
|
269
|
-
export class ModalTable extends Container {
|
|
270
|
-
data;
|
|
271
|
-
headers;
|
|
272
|
-
colWidths;
|
|
273
|
-
constructor(data, headers, colWidths) {
|
|
274
|
-
super();
|
|
275
|
-
this.data = data;
|
|
276
|
-
this.headers = headers;
|
|
277
|
-
this.colWidths = colWidths;
|
|
278
|
-
}
|
|
279
|
-
render(width) {
|
|
280
|
-
if (this.data.length === 0) {
|
|
281
|
-
return [];
|
|
282
|
-
}
|
|
283
|
-
// Use the terminal table function for proper text wrapping and formatting
|
|
284
|
-
const tableString = table(this.data, {
|
|
285
|
-
header: this.headers,
|
|
286
|
-
colWidths: this.colWidths,
|
|
287
|
-
width: width,
|
|
288
|
-
});
|
|
289
|
-
// Split the table string into lines and return
|
|
290
|
-
return tableString.split("\n");
|
|
291
|
-
}
|
|
292
|
-
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { Component } from "../tui.ts";
|
|
2
|
+
/**
|
|
3
|
+
* NotificationComponent - displays a notification message with styling
|
|
4
|
+
*/
|
|
5
|
+
export declare class NotificationComponent implements Component {
|
|
6
|
+
private message;
|
|
7
|
+
private bgColor;
|
|
8
|
+
private textStyle;
|
|
9
|
+
private paddingX;
|
|
10
|
+
private cachedMessage?;
|
|
11
|
+
private cachedWidth?;
|
|
12
|
+
private cachedLines?;
|
|
13
|
+
constructor(message?: string, bgColor?: {
|
|
14
|
+
r: number;
|
|
15
|
+
g: number;
|
|
16
|
+
b: number;
|
|
17
|
+
}, textStyle?: (text: string) => string, paddingX?: number);
|
|
18
|
+
setMessage(message: string): void;
|
|
19
|
+
setBgColor(bgColor: {
|
|
20
|
+
r: number;
|
|
21
|
+
g: number;
|
|
22
|
+
b: number;
|
|
23
|
+
}): void;
|
|
24
|
+
setTextStyle(textStyle: (text: string) => string): void;
|
|
25
|
+
private invalidateCache;
|
|
26
|
+
render(width: number): string[];
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=notification.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notification.d.ts","sourceRoot":"","sources":["../../../source/tui/components/notification.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAG3C;;GAEG;AACH,qBAAa,qBAAsB,YAAW,SAAS;IACrD,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,OAAO,CAAsC;IACrD,OAAO,CAAC,SAAS,CAA2B;IAC5C,OAAO,CAAC,QAAQ,CAAS;IAGzB,OAAO,CAAC,aAAa,CAAC,CAAS;IAC/B,OAAO,CAAC,WAAW,CAAC,CAAS;IAC7B,OAAO,CAAC,WAAW,CAAC,CAAW;gBAG7B,OAAO,SAAK,EACZ,OAAO;;;;KAA0B,EACjC,SAAS,GAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAqB,EAClD,QAAQ,SAAI;IAQd,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAKjC,UAAU,CAAC,OAAO,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI;IAK9D,YAAY,CAAC,SAAS,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,GAAG,IAAI;IAKvD,OAAO,CAAC,eAAe;IAMvB,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE;CAqChC"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import style from "../../terminal/style.js";
|
|
2
|
+
import { visibleWidth } from "../utils.js";
|
|
3
|
+
/**
|
|
4
|
+
* NotificationComponent - displays a notification message with styling
|
|
5
|
+
*/
|
|
6
|
+
export class NotificationComponent {
|
|
7
|
+
message;
|
|
8
|
+
bgColor;
|
|
9
|
+
textStyle;
|
|
10
|
+
paddingX;
|
|
11
|
+
// Cache for rendered output
|
|
12
|
+
cachedMessage;
|
|
13
|
+
cachedWidth;
|
|
14
|
+
cachedLines;
|
|
15
|
+
constructor(message = "", bgColor = { r: 64, g: 64, b: 64 }, textStyle = style.yellow, paddingX = 1) {
|
|
16
|
+
this.message = message;
|
|
17
|
+
this.bgColor = bgColor;
|
|
18
|
+
this.textStyle = textStyle;
|
|
19
|
+
this.paddingX = paddingX;
|
|
20
|
+
}
|
|
21
|
+
setMessage(message) {
|
|
22
|
+
this.message = message;
|
|
23
|
+
this.invalidateCache();
|
|
24
|
+
}
|
|
25
|
+
setBgColor(bgColor) {
|
|
26
|
+
this.bgColor = bgColor;
|
|
27
|
+
this.invalidateCache();
|
|
28
|
+
}
|
|
29
|
+
setTextStyle(textStyle) {
|
|
30
|
+
this.textStyle = textStyle;
|
|
31
|
+
this.invalidateCache();
|
|
32
|
+
}
|
|
33
|
+
invalidateCache() {
|
|
34
|
+
this.cachedMessage = undefined;
|
|
35
|
+
this.cachedWidth = undefined;
|
|
36
|
+
this.cachedLines = undefined;
|
|
37
|
+
}
|
|
38
|
+
render(width) {
|
|
39
|
+
if (!this.message) {
|
|
40
|
+
return [];
|
|
41
|
+
}
|
|
42
|
+
// Check cache
|
|
43
|
+
if (this.cachedLines &&
|
|
44
|
+
this.cachedMessage === this.message &&
|
|
45
|
+
this.cachedWidth === width) {
|
|
46
|
+
return this.cachedLines;
|
|
47
|
+
}
|
|
48
|
+
const lines = this.message.split("\n");
|
|
49
|
+
const result = [];
|
|
50
|
+
for (const line of lines) {
|
|
51
|
+
const styledText = this.textStyle(line);
|
|
52
|
+
const paddedLine = " ".repeat(this.paddingX) + styledText + " ".repeat(this.paddingX);
|
|
53
|
+
const visibleLength = visibleWidth(paddedLine);
|
|
54
|
+
const paddingNeeded = Math.max(0, width - visibleLength);
|
|
55
|
+
const bgLine = style.bgRgb(this.bgColor.r, this.bgColor.g, this.bgColor.b)(paddedLine + " ".repeat(paddingNeeded));
|
|
56
|
+
result.push(bgLine);
|
|
57
|
+
}
|
|
58
|
+
this.cachedMessage = this.message;
|
|
59
|
+
this.cachedWidth = width;
|
|
60
|
+
this.cachedLines = result;
|
|
61
|
+
return result;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { Component } from "../tui.ts";
|
|
2
|
+
/**
|
|
3
|
+
* Progress bar component - displays a visual progress indicator
|
|
4
|
+
*/
|
|
5
|
+
export declare class ProgressBarComponent implements Component {
|
|
6
|
+
private current;
|
|
7
|
+
private total;
|
|
8
|
+
private width;
|
|
9
|
+
private cachedOutput?;
|
|
10
|
+
private cachedCurrent?;
|
|
11
|
+
private cachedTotal?;
|
|
12
|
+
private cachedWidth?;
|
|
13
|
+
constructor(current: number, total: number, width: number);
|
|
14
|
+
setCurrent(current: number): void;
|
|
15
|
+
setTotal(total: number): void;
|
|
16
|
+
private invalidateCache;
|
|
17
|
+
render(width: number): string[];
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=progress-bar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"progress-bar.d.ts","sourceRoot":"","sources":["../../../source/tui/components/progress-bar.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAE3C;;GAEG;AACH,qBAAa,oBAAqB,YAAW,SAAS;IACpD,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,KAAK,CAAS;IACtB,OAAO,CAAC,KAAK,CAAS;IAGtB,OAAO,CAAC,YAAY,CAAC,CAAW;IAChC,OAAO,CAAC,aAAa,CAAC,CAAS;IAC/B,OAAO,CAAC,WAAW,CAAC,CAAS;IAC7B,OAAO,CAAC,WAAW,CAAC,CAAS;gBAEjB,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;IAMzD,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAKjC,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAK7B,OAAO,CAAC,eAAe;IAOvB,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE;CAiDhC"}
|