@code0123/opencode-android-arm64 1.1.54 → 1.1.56
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/bin/opencode +3 -1
- package/package.json +1 -80
- package/runtime/highlights-eq9cgrbb.scm +604 -0
- package/runtime/highlights-ghv9g403.scm +205 -0
- package/runtime/highlights-hk7bwhj4.scm +284 -0
- package/runtime/highlights-r812a2qc.scm +150 -0
- package/runtime/highlights-x6tmsnaa.scm +115 -0
- package/runtime/index.js +287124 -0
- package/runtime/injections-73j83es3.scm +27 -0
- package/runtime/parser.worker.js +4081 -0
- package/runtime/tree-sitter-3jzf13jk.wasm +0 -0
- package/runtime/tree-sitter-bash-hq5s6fxb.wasm +0 -0
- package/runtime/tree-sitter-javascript-nd0q4pe9.wasm +0 -0
- package/runtime/tree-sitter-markdown-411r6y9b.wasm +0 -0
- package/runtime/tree-sitter-markdown_inline-j5349f42.wasm +0 -0
- package/runtime/tree-sitter-typescript-zxjzwt75.wasm +0 -0
- package/runtime/tree-sitter-zig-e78zbjpm.wasm +0 -0
- package/runtime/worker.js +208338 -0
- package/parsers-config.ts +0 -253
- package/src/acp/README.md +0 -164
- package/src/acp/agent.ts +0 -1676
- package/src/acp/session.ts +0 -117
- package/src/acp/types.ts +0 -23
- package/src/agent/agent.ts +0 -338
- package/src/agent/generate.txt +0 -75
- package/src/agent/prompt/compaction.txt +0 -12
- package/src/agent/prompt/explore.txt +0 -18
- package/src/agent/prompt/summary.txt +0 -11
- package/src/agent/prompt/title.txt +0 -44
- package/src/auth/index.ts +0 -70
- package/src/bun/index.ts +0 -137
- package/src/bun/registry.ts +0 -48
- package/src/bus/bus-event.ts +0 -43
- package/src/bus/global.ts +0 -10
- package/src/bus/index.ts +0 -105
- package/src/cli/bootstrap.ts +0 -17
- package/src/cli/cmd/acp.ts +0 -70
- package/src/cli/cmd/agent.ts +0 -257
- package/src/cli/cmd/auth.ts +0 -400
- package/src/cli/cmd/cmd.ts +0 -7
- package/src/cli/cmd/debug/agent.ts +0 -167
- package/src/cli/cmd/debug/config.ts +0 -16
- package/src/cli/cmd/debug/file.ts +0 -97
- package/src/cli/cmd/debug/index.ts +0 -48
- package/src/cli/cmd/debug/lsp.ts +0 -52
- package/src/cli/cmd/debug/ripgrep.ts +0 -87
- package/src/cli/cmd/debug/scrap.ts +0 -16
- package/src/cli/cmd/debug/skill.ts +0 -16
- package/src/cli/cmd/debug/snapshot.ts +0 -52
- package/src/cli/cmd/export.ts +0 -88
- package/src/cli/cmd/generate.ts +0 -38
- package/src/cli/cmd/github.ts +0 -1540
- package/src/cli/cmd/import.ts +0 -147
- package/src/cli/cmd/mcp.ts +0 -755
- package/src/cli/cmd/models.ts +0 -77
- package/src/cli/cmd/pr.ts +0 -112
- package/src/cli/cmd/run.ts +0 -598
- package/src/cli/cmd/serve.ts +0 -20
- package/src/cli/cmd/session.ts +0 -135
- package/src/cli/cmd/stats.ts +0 -426
- package/src/cli/cmd/tui/app.tsx +0 -801
- package/src/cli/cmd/tui/attach.ts +0 -52
- package/src/cli/cmd/tui/component/border.tsx +0 -21
- package/src/cli/cmd/tui/component/dialog-agent.tsx +0 -31
- package/src/cli/cmd/tui/component/dialog-command.tsx +0 -148
- package/src/cli/cmd/tui/component/dialog-mcp.tsx +0 -86
- package/src/cli/cmd/tui/component/dialog-model.tsx +0 -234
- package/src/cli/cmd/tui/component/dialog-provider.tsx +0 -266
- package/src/cli/cmd/tui/component/dialog-session-list.tsx +0 -108
- package/src/cli/cmd/tui/component/dialog-session-rename.tsx +0 -31
- package/src/cli/cmd/tui/component/dialog-skill.tsx +0 -36
- package/src/cli/cmd/tui/component/dialog-stash.tsx +0 -87
- package/src/cli/cmd/tui/component/dialog-status.tsx +0 -177
- package/src/cli/cmd/tui/component/dialog-tag.tsx +0 -44
- package/src/cli/cmd/tui/component/dialog-theme-list.tsx +0 -50
- package/src/cli/cmd/tui/component/logo.tsx +0 -85
- package/src/cli/cmd/tui/component/prompt/autocomplete.tsx +0 -666
- package/src/cli/cmd/tui/component/prompt/frecency.tsx +0 -89
- package/src/cli/cmd/tui/component/prompt/history.tsx +0 -108
- package/src/cli/cmd/tui/component/prompt/index.tsx +0 -1132
- package/src/cli/cmd/tui/component/prompt/stash.tsx +0 -101
- package/src/cli/cmd/tui/component/spinner.tsx +0 -24
- package/src/cli/cmd/tui/component/textarea-keybindings.ts +0 -73
- package/src/cli/cmd/tui/component/tips.tsx +0 -153
- package/src/cli/cmd/tui/component/todo-item.tsx +0 -32
- package/src/cli/cmd/tui/context/args.tsx +0 -15
- package/src/cli/cmd/tui/context/directory.ts +0 -13
- package/src/cli/cmd/tui/context/exit.tsx +0 -52
- package/src/cli/cmd/tui/context/helper.tsx +0 -25
- package/src/cli/cmd/tui/context/keybind.tsx +0 -100
- package/src/cli/cmd/tui/context/kv.tsx +0 -52
- package/src/cli/cmd/tui/context/local.tsx +0 -409
- package/src/cli/cmd/tui/context/prompt.tsx +0 -18
- package/src/cli/cmd/tui/context/route.tsx +0 -46
- package/src/cli/cmd/tui/context/sdk.tsx +0 -101
- package/src/cli/cmd/tui/context/sync.tsx +0 -470
- package/src/cli/cmd/tui/context/theme/aura.json +0 -69
- package/src/cli/cmd/tui/context/theme/ayu.json +0 -80
- package/src/cli/cmd/tui/context/theme/carbonfox.json +0 -248
- package/src/cli/cmd/tui/context/theme/catppuccin-frappe.json +0 -233
- package/src/cli/cmd/tui/context/theme/catppuccin-macchiato.json +0 -233
- package/src/cli/cmd/tui/context/theme/catppuccin.json +0 -112
- package/src/cli/cmd/tui/context/theme/cobalt2.json +0 -228
- package/src/cli/cmd/tui/context/theme/cursor.json +0 -249
- package/src/cli/cmd/tui/context/theme/dracula.json +0 -219
- package/src/cli/cmd/tui/context/theme/everforest.json +0 -241
- package/src/cli/cmd/tui/context/theme/flexoki.json +0 -237
- package/src/cli/cmd/tui/context/theme/github.json +0 -233
- package/src/cli/cmd/tui/context/theme/gruvbox.json +0 -242
- package/src/cli/cmd/tui/context/theme/kanagawa.json +0 -77
- package/src/cli/cmd/tui/context/theme/lucent-orng.json +0 -237
- package/src/cli/cmd/tui/context/theme/material.json +0 -235
- package/src/cli/cmd/tui/context/theme/matrix.json +0 -77
- package/src/cli/cmd/tui/context/theme/mercury.json +0 -252
- package/src/cli/cmd/tui/context/theme/monokai.json +0 -221
- package/src/cli/cmd/tui/context/theme/nightowl.json +0 -221
- package/src/cli/cmd/tui/context/theme/nord.json +0 -223
- package/src/cli/cmd/tui/context/theme/one-dark.json +0 -84
- package/src/cli/cmd/tui/context/theme/opencode.json +0 -245
- package/src/cli/cmd/tui/context/theme/orng.json +0 -249
- package/src/cli/cmd/tui/context/theme/osaka-jade.json +0 -93
- package/src/cli/cmd/tui/context/theme/palenight.json +0 -222
- package/src/cli/cmd/tui/context/theme/rosepine.json +0 -234
- package/src/cli/cmd/tui/context/theme/solarized.json +0 -223
- package/src/cli/cmd/tui/context/theme/synthwave84.json +0 -226
- package/src/cli/cmd/tui/context/theme/tokyonight.json +0 -243
- package/src/cli/cmd/tui/context/theme/vercel.json +0 -245
- package/src/cli/cmd/tui/context/theme/vesper.json +0 -218
- package/src/cli/cmd/tui/context/theme/zenburn.json +0 -223
- package/src/cli/cmd/tui/context/theme.tsx +0 -1152
- package/src/cli/cmd/tui/event.ts +0 -48
- package/src/cli/cmd/tui/routes/home.tsx +0 -140
- package/src/cli/cmd/tui/routes/session/dialog-fork-from-timeline.tsx +0 -64
- package/src/cli/cmd/tui/routes/session/dialog-message.tsx +0 -109
- package/src/cli/cmd/tui/routes/session/dialog-subagent.tsx +0 -26
- package/src/cli/cmd/tui/routes/session/dialog-timeline.tsx +0 -47
- package/src/cli/cmd/tui/routes/session/footer.tsx +0 -91
- package/src/cli/cmd/tui/routes/session/header.tsx +0 -142
- package/src/cli/cmd/tui/routes/session/index.tsx +0 -2126
- package/src/cli/cmd/tui/routes/session/permission.tsx +0 -508
- package/src/cli/cmd/tui/routes/session/question.tsx +0 -466
- package/src/cli/cmd/tui/routes/session/sidebar.tsx +0 -313
- package/src/cli/cmd/tui/thread.ts +0 -175
- package/src/cli/cmd/tui/ui/dialog-alert.tsx +0 -68
- package/src/cli/cmd/tui/ui/dialog-confirm.tsx +0 -93
- package/src/cli/cmd/tui/ui/dialog-export-options.tsx +0 -215
- package/src/cli/cmd/tui/ui/dialog-help.tsx +0 -49
- package/src/cli/cmd/tui/ui/dialog-prompt.tsx +0 -88
- package/src/cli/cmd/tui/ui/dialog-select.tsx +0 -399
- package/src/cli/cmd/tui/ui/dialog.tsx +0 -167
- package/src/cli/cmd/tui/ui/link.tsx +0 -28
- package/src/cli/cmd/tui/ui/spinner.ts +0 -368
- package/src/cli/cmd/tui/ui/toast.tsx +0 -100
- package/src/cli/cmd/tui/util/clipboard.ts +0 -159
- package/src/cli/cmd/tui/util/editor.ts +0 -32
- package/src/cli/cmd/tui/util/signal.ts +0 -7
- package/src/cli/cmd/tui/util/terminal.ts +0 -114
- package/src/cli/cmd/tui/util/transcript.ts +0 -98
- package/src/cli/cmd/tui/worker.ts +0 -152
- package/src/cli/cmd/uninstall.ts +0 -357
- package/src/cli/cmd/upgrade.ts +0 -73
- package/src/cli/cmd/web.ts +0 -81
- package/src/cli/error.ts +0 -57
- package/src/cli/logo.ts +0 -6
- package/src/cli/network.ts +0 -60
- package/src/cli/ui.ts +0 -113
- package/src/cli/upgrade.ts +0 -25
- package/src/command/index.ts +0 -150
- package/src/command/template/initialize.txt +0 -10
- package/src/command/template/review.txt +0 -99
- package/src/config/config.ts +0 -1477
- package/src/config/markdown.ts +0 -98
- package/src/env/index.ts +0 -28
- package/src/file/ignore.ts +0 -83
- package/src/file/index.ts +0 -583
- package/src/file/ripgrep.ts +0 -384
- package/src/file/time.ts +0 -69
- package/src/file/watcher.ts +0 -148
- package/src/flag/flag.ts +0 -93
- package/src/format/formatter.ts +0 -366
- package/src/format/index.ts +0 -137
- package/src/global/index.ts +0 -55
- package/src/id/id.ts +0 -83
- package/src/ide/index.ts +0 -76
- package/src/index.ts +0 -159
- package/src/installation/index.ts +0 -246
- package/src/lsp/client.ts +0 -252
- package/src/lsp/index.ts +0 -485
- package/src/lsp/language.ts +0 -119
- package/src/lsp/server.ts +0 -2046
- package/src/mcp/auth.ts +0 -132
- package/src/mcp/index.ts +0 -934
- package/src/mcp/oauth-callback.ts +0 -200
- package/src/mcp/oauth-provider.ts +0 -154
- package/src/patch/index.ts +0 -680
- package/src/permission/arity.ts +0 -163
- package/src/permission/index.ts +0 -210
- package/src/permission/next.ts +0 -280
- package/src/plugin/codex.ts +0 -624
- package/src/plugin/copilot.ts +0 -327
- package/src/plugin/index.ts +0 -138
- package/src/project/bootstrap.ts +0 -35
- package/src/project/instance.ts +0 -114
- package/src/project/project.ts +0 -371
- package/src/project/state.ts +0 -70
- package/src/project/vcs.ts +0 -76
- package/src/provider/auth.ts +0 -147
- package/src/provider/models-snapshot.ts +0 -38414
- package/src/provider/models.ts +0 -133
- package/src/provider/provider.ts +0 -1262
- package/src/provider/sdk/copilot/README.md +0 -5
- package/src/provider/sdk/copilot/chat/convert-to-openai-compatible-chat-messages.ts +0 -164
- package/src/provider/sdk/copilot/chat/get-response-metadata.ts +0 -15
- package/src/provider/sdk/copilot/chat/map-openai-compatible-finish-reason.ts +0 -17
- package/src/provider/sdk/copilot/chat/openai-compatible-api-types.ts +0 -64
- package/src/provider/sdk/copilot/chat/openai-compatible-chat-language-model.ts +0 -780
- package/src/provider/sdk/copilot/chat/openai-compatible-chat-options.ts +0 -28
- package/src/provider/sdk/copilot/chat/openai-compatible-metadata-extractor.ts +0 -44
- package/src/provider/sdk/copilot/chat/openai-compatible-prepare-tools.ts +0 -87
- package/src/provider/sdk/copilot/copilot-provider.ts +0 -100
- package/src/provider/sdk/copilot/index.ts +0 -2
- package/src/provider/sdk/copilot/openai-compatible-error.ts +0 -27
- package/src/provider/sdk/copilot/responses/convert-to-openai-responses-input.ts +0 -303
- package/src/provider/sdk/copilot/responses/map-openai-responses-finish-reason.ts +0 -22
- package/src/provider/sdk/copilot/responses/openai-config.ts +0 -18
- package/src/provider/sdk/copilot/responses/openai-error.ts +0 -22
- package/src/provider/sdk/copilot/responses/openai-responses-api-types.ts +0 -207
- package/src/provider/sdk/copilot/responses/openai-responses-language-model.ts +0 -1732
- package/src/provider/sdk/copilot/responses/openai-responses-prepare-tools.ts +0 -177
- package/src/provider/sdk/copilot/responses/openai-responses-settings.ts +0 -1
- package/src/provider/sdk/copilot/responses/tool/code-interpreter.ts +0 -88
- package/src/provider/sdk/copilot/responses/tool/file-search.ts +0 -128
- package/src/provider/sdk/copilot/responses/tool/image-generation.ts +0 -115
- package/src/provider/sdk/copilot/responses/tool/local-shell.ts +0 -65
- package/src/provider/sdk/copilot/responses/tool/web-search-preview.ts +0 -104
- package/src/provider/sdk/copilot/responses/tool/web-search.ts +0 -103
- package/src/provider/transform.ts +0 -828
- package/src/pty/index.ts +0 -250
- package/src/question/index.ts +0 -171
- package/src/scheduler/index.ts +0 -61
- package/src/server/error.ts +0 -36
- package/src/server/event.ts +0 -7
- package/src/server/mdns.ts +0 -60
- package/src/server/routes/config.ts +0 -92
- package/src/server/routes/experimental.ts +0 -208
- package/src/server/routes/file.ts +0 -197
- package/src/server/routes/global.ts +0 -183
- package/src/server/routes/mcp.ts +0 -225
- package/src/server/routes/permission.ts +0 -68
- package/src/server/routes/project.ts +0 -82
- package/src/server/routes/provider.ts +0 -165
- package/src/server/routes/pty.ts +0 -169
- package/src/server/routes/question.ts +0 -98
- package/src/server/routes/session.ts +0 -939
- package/src/server/routes/tui.ts +0 -379
- package/src/server/server.ts +0 -613
- package/src/session/compaction.ts +0 -226
- package/src/session/index.ts +0 -517
- package/src/session/instruction.ts +0 -197
- package/src/session/llm.ts +0 -289
- package/src/session/message-v2.ts +0 -802
- package/src/session/message.ts +0 -189
- package/src/session/processor.ts +0 -407
- package/src/session/prompt/anthropic-20250930.txt +0 -166
- package/src/session/prompt/anthropic.txt +0 -105
- package/src/session/prompt/beast.txt +0 -147
- package/src/session/prompt/build-switch.txt +0 -5
- package/src/session/prompt/codex_header.txt +0 -79
- package/src/session/prompt/copilot-gpt-5.txt +0 -143
- package/src/session/prompt/gemini.txt +0 -155
- package/src/session/prompt/max-steps.txt +0 -16
- package/src/session/prompt/plan-reminder-anthropic.txt +0 -67
- package/src/session/prompt/plan.txt +0 -26
- package/src/session/prompt/qwen.txt +0 -109
- package/src/session/prompt/trinity.txt +0 -97
- package/src/session/prompt.ts +0 -1866
- package/src/session/retry.ts +0 -97
- package/src/session/revert.ts +0 -121
- package/src/session/status.ts +0 -76
- package/src/session/summary.ts +0 -217
- package/src/session/system.ts +0 -54
- package/src/session/todo.ts +0 -37
- package/src/share/share-next.ts +0 -200
- package/src/share/share.ts +0 -92
- package/src/shell/shell.ts +0 -67
- package/src/skill/discovery.ts +0 -97
- package/src/skill/index.ts +0 -1
- package/src/skill/skill.ts +0 -188
- package/src/snapshot/index.ts +0 -255
- package/src/storage/storage.ts +0 -227
- package/src/tool/apply_patch.ts +0 -281
- package/src/tool/apply_patch.txt +0 -33
- package/src/tool/bash.ts +0 -269
- package/src/tool/bash.txt +0 -115
- package/src/tool/batch.ts +0 -175
- package/src/tool/batch.txt +0 -24
- package/src/tool/codesearch.ts +0 -132
- package/src/tool/codesearch.txt +0 -12
- package/src/tool/edit.ts +0 -655
- package/src/tool/edit.txt +0 -10
- package/src/tool/external-directory.ts +0 -32
- package/src/tool/glob.ts +0 -78
- package/src/tool/glob.txt +0 -6
- package/src/tool/grep.ts +0 -147
- package/src/tool/grep.txt +0 -8
- package/src/tool/invalid.ts +0 -17
- package/src/tool/ls.ts +0 -121
- package/src/tool/ls.txt +0 -1
- package/src/tool/lsp.ts +0 -96
- package/src/tool/lsp.txt +0 -19
- package/src/tool/multiedit.ts +0 -46
- package/src/tool/multiedit.txt +0 -41
- package/src/tool/plan-enter.txt +0 -14
- package/src/tool/plan-exit.txt +0 -13
- package/src/tool/plan.ts +0 -130
- package/src/tool/question.ts +0 -33
- package/src/tool/question.txt +0 -10
- package/src/tool/read.ts +0 -211
- package/src/tool/read.txt +0 -12
- package/src/tool/registry.ts +0 -160
- package/src/tool/skill.ts +0 -123
- package/src/tool/task.ts +0 -165
- package/src/tool/task.txt +0 -60
- package/src/tool/todo.ts +0 -53
- package/src/tool/todoread.txt +0 -14
- package/src/tool/todowrite.txt +0 -167
- package/src/tool/tool.ts +0 -89
- package/src/tool/truncation.ts +0 -106
- package/src/tool/webfetch.ts +0 -186
- package/src/tool/webfetch.txt +0 -13
- package/src/tool/websearch.ts +0 -150
- package/src/tool/websearch.txt +0 -14
- package/src/tool/write.ts +0 -85
- package/src/tool/write.txt +0 -8
- package/src/util/abort.ts +0 -35
- package/src/util/archive.ts +0 -16
- package/src/util/color.ts +0 -19
- package/src/util/context.ts +0 -25
- package/src/util/defer.ts +0 -12
- package/src/util/eventloop.ts +0 -20
- package/src/util/filesystem.ts +0 -93
- package/src/util/fn.ts +0 -11
- package/src/util/format.ts +0 -20
- package/src/util/iife.ts +0 -3
- package/src/util/keybind.ts +0 -103
- package/src/util/lazy.ts +0 -18
- package/src/util/locale.ts +0 -81
- package/src/util/lock.ts +0 -98
- package/src/util/log.ts +0 -180
- package/src/util/proxied.ts +0 -3
- package/src/util/queue.ts +0 -32
- package/src/util/rpc.ts +0 -66
- package/src/util/scrap.ts +0 -10
- package/src/util/signal.ts +0 -12
- package/src/util/timeout.ts +0 -14
- package/src/util/token.ts +0 -7
- package/src/util/wildcard.ts +0 -56
- package/src/worktree/index.ts +0 -574
- package/tsconfig.json +0 -10
|
@@ -1,177 +0,0 @@
|
|
|
1
|
-
import { TextAttributes } from "@opentui/core"
|
|
2
|
-
import { fileURLToPath } from "bun"
|
|
3
|
-
import { useTheme } from "../context/theme"
|
|
4
|
-
import { useDialog } from "@tui/ui/dialog"
|
|
5
|
-
import { useSync } from "@tui/context/sync"
|
|
6
|
-
import { For, Match, Switch, Show, createMemo, createSignal } from "solid-js"
|
|
7
|
-
import { Installation } from "@/installation"
|
|
8
|
-
|
|
9
|
-
export type DialogStatusProps = {}
|
|
10
|
-
|
|
11
|
-
export function DialogStatus() {
|
|
12
|
-
const sync = useSync()
|
|
13
|
-
const { theme } = useTheme()
|
|
14
|
-
const dialog = useDialog()
|
|
15
|
-
const [hover, setHover] = createSignal(false)
|
|
16
|
-
|
|
17
|
-
const enabledFormatters = createMemo(() => sync.data.formatter.filter((f) => f.enabled))
|
|
18
|
-
|
|
19
|
-
const plugins = createMemo(() => {
|
|
20
|
-
const list = sync.data.config.plugin ?? []
|
|
21
|
-
const result = list.map((value) => {
|
|
22
|
-
if (value.startsWith("file://")) {
|
|
23
|
-
const path = fileURLToPath(value)
|
|
24
|
-
const parts = path.split("/")
|
|
25
|
-
const filename = parts.pop() || path
|
|
26
|
-
if (!filename.includes(".")) return { name: filename }
|
|
27
|
-
const basename = filename.split(".")[0]
|
|
28
|
-
if (basename === "index") {
|
|
29
|
-
const dirname = parts.pop()
|
|
30
|
-
const name = dirname || basename
|
|
31
|
-
return { name }
|
|
32
|
-
}
|
|
33
|
-
return { name: basename }
|
|
34
|
-
}
|
|
35
|
-
const index = value.lastIndexOf("@")
|
|
36
|
-
if (index <= 0) return { name: value, version: "latest" }
|
|
37
|
-
const name = value.substring(0, index)
|
|
38
|
-
const version = value.substring(index + 1)
|
|
39
|
-
return { name, version }
|
|
40
|
-
})
|
|
41
|
-
return result.toSorted((a, b) => a.name.localeCompare(b.name))
|
|
42
|
-
})
|
|
43
|
-
|
|
44
|
-
return (
|
|
45
|
-
<box paddingLeft={2} paddingRight={2} gap={1} paddingBottom={1}>
|
|
46
|
-
<box flexDirection="row" justifyContent="space-between">
|
|
47
|
-
<text fg={theme.text} attributes={TextAttributes.BOLD}>
|
|
48
|
-
Status
|
|
49
|
-
</text>
|
|
50
|
-
<box
|
|
51
|
-
paddingLeft={1}
|
|
52
|
-
paddingRight={1}
|
|
53
|
-
backgroundColor={hover() ? theme.primary : undefined}
|
|
54
|
-
onMouseOver={() => setHover(true)}
|
|
55
|
-
onMouseOut={() => setHover(false)}
|
|
56
|
-
onMouseUp={() => dialog.clear()}
|
|
57
|
-
>
|
|
58
|
-
<text fg={hover() ? theme.selectedListItemText : theme.textMuted}>esc</text>
|
|
59
|
-
</box>
|
|
60
|
-
</box>
|
|
61
|
-
<text fg={theme.textMuted}>OpenCode v{Installation.VERSION}</text>
|
|
62
|
-
<Show when={Object.keys(sync.data.mcp).length > 0} fallback={<text fg={theme.text}>No MCP Servers</text>}>
|
|
63
|
-
<box>
|
|
64
|
-
<text fg={theme.text}>{Object.keys(sync.data.mcp).length} MCP Servers</text>
|
|
65
|
-
<For each={Object.entries(sync.data.mcp)}>
|
|
66
|
-
{([key, item]) => (
|
|
67
|
-
<box flexDirection="row" gap={1}>
|
|
68
|
-
<text
|
|
69
|
-
flexShrink={0}
|
|
70
|
-
style={{
|
|
71
|
-
fg: (
|
|
72
|
-
{
|
|
73
|
-
connected: theme.success,
|
|
74
|
-
failed: theme.error,
|
|
75
|
-
disabled: theme.textMuted,
|
|
76
|
-
needs_auth: theme.warning,
|
|
77
|
-
needs_client_registration: theme.error,
|
|
78
|
-
} as Record<string, typeof theme.success>
|
|
79
|
-
)[item.status],
|
|
80
|
-
}}
|
|
81
|
-
>
|
|
82
|
-
•
|
|
83
|
-
</text>
|
|
84
|
-
<text fg={theme.text} wrapMode="word">
|
|
85
|
-
<b>{key}</b>{" "}
|
|
86
|
-
<span style={{ fg: theme.textMuted }}>
|
|
87
|
-
<Switch fallback={item.status}>
|
|
88
|
-
<Match when={item.status === "connected"}>Connected</Match>
|
|
89
|
-
<Match when={item.status === "failed" && item}>{(val) => val().error}</Match>
|
|
90
|
-
<Match when={item.status === "disabled"}>Disabled in configuration</Match>
|
|
91
|
-
<Match when={(item.status as string) === "needs_auth"}>
|
|
92
|
-
Needs authentication (run: opencode mcp auth {key})
|
|
93
|
-
</Match>
|
|
94
|
-
<Match when={(item.status as string) === "needs_client_registration" && item}>
|
|
95
|
-
{(val) => (val() as { error: string }).error}
|
|
96
|
-
</Match>
|
|
97
|
-
</Switch>
|
|
98
|
-
</span>
|
|
99
|
-
</text>
|
|
100
|
-
</box>
|
|
101
|
-
)}
|
|
102
|
-
</For>
|
|
103
|
-
</box>
|
|
104
|
-
</Show>
|
|
105
|
-
{sync.data.lsp.length > 0 && (
|
|
106
|
-
<box>
|
|
107
|
-
<text fg={theme.text}>{sync.data.lsp.length} LSP Servers</text>
|
|
108
|
-
<For each={sync.data.lsp}>
|
|
109
|
-
{(item) => (
|
|
110
|
-
<box flexDirection="row" gap={1}>
|
|
111
|
-
<text
|
|
112
|
-
flexShrink={0}
|
|
113
|
-
style={{
|
|
114
|
-
fg: {
|
|
115
|
-
connected: theme.success,
|
|
116
|
-
error: theme.error,
|
|
117
|
-
}[item.status],
|
|
118
|
-
}}
|
|
119
|
-
>
|
|
120
|
-
•
|
|
121
|
-
</text>
|
|
122
|
-
<text fg={theme.text} wrapMode="word">
|
|
123
|
-
<b>{item.id}</b> <span style={{ fg: theme.textMuted }}>{item.root}</span>
|
|
124
|
-
</text>
|
|
125
|
-
</box>
|
|
126
|
-
)}
|
|
127
|
-
</For>
|
|
128
|
-
</box>
|
|
129
|
-
)}
|
|
130
|
-
<Show when={enabledFormatters().length > 0} fallback={<text fg={theme.text}>No Formatters</text>}>
|
|
131
|
-
<box>
|
|
132
|
-
<text fg={theme.text}>{enabledFormatters().length} Formatters</text>
|
|
133
|
-
<For each={enabledFormatters()}>
|
|
134
|
-
{(item) => (
|
|
135
|
-
<box flexDirection="row" gap={1}>
|
|
136
|
-
<text
|
|
137
|
-
flexShrink={0}
|
|
138
|
-
style={{
|
|
139
|
-
fg: theme.success,
|
|
140
|
-
}}
|
|
141
|
-
>
|
|
142
|
-
•
|
|
143
|
-
</text>
|
|
144
|
-
<text wrapMode="word" fg={theme.text}>
|
|
145
|
-
<b>{item.name}</b>
|
|
146
|
-
</text>
|
|
147
|
-
</box>
|
|
148
|
-
)}
|
|
149
|
-
</For>
|
|
150
|
-
</box>
|
|
151
|
-
</Show>
|
|
152
|
-
<Show when={plugins().length > 0} fallback={<text fg={theme.text}>No Plugins</text>}>
|
|
153
|
-
<box>
|
|
154
|
-
<text fg={theme.text}>{plugins().length} Plugins</text>
|
|
155
|
-
<For each={plugins()}>
|
|
156
|
-
{(item) => (
|
|
157
|
-
<box flexDirection="row" gap={1}>
|
|
158
|
-
<text
|
|
159
|
-
flexShrink={0}
|
|
160
|
-
style={{
|
|
161
|
-
fg: theme.success,
|
|
162
|
-
}}
|
|
163
|
-
>
|
|
164
|
-
•
|
|
165
|
-
</text>
|
|
166
|
-
<text wrapMode="word" fg={theme.text}>
|
|
167
|
-
<b>{item.name}</b>
|
|
168
|
-
{item.version && <span style={{ fg: theme.textMuted }}> @{item.version}</span>}
|
|
169
|
-
</text>
|
|
170
|
-
</box>
|
|
171
|
-
)}
|
|
172
|
-
</For>
|
|
173
|
-
</box>
|
|
174
|
-
</Show>
|
|
175
|
-
</box>
|
|
176
|
-
)
|
|
177
|
-
}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { createMemo, createResource } from "solid-js"
|
|
2
|
-
import { DialogSelect } from "@tui/ui/dialog-select"
|
|
3
|
-
import { useDialog } from "@tui/ui/dialog"
|
|
4
|
-
import { useSDK } from "@tui/context/sdk"
|
|
5
|
-
import { createStore } from "solid-js/store"
|
|
6
|
-
|
|
7
|
-
export function DialogTag(props: { onSelect?: (value: string) => void }) {
|
|
8
|
-
const sdk = useSDK()
|
|
9
|
-
const dialog = useDialog()
|
|
10
|
-
|
|
11
|
-
const [store] = createStore({
|
|
12
|
-
filter: "",
|
|
13
|
-
})
|
|
14
|
-
|
|
15
|
-
const [files] = createResource(
|
|
16
|
-
() => [store.filter],
|
|
17
|
-
async () => {
|
|
18
|
-
const result = await sdk.client.find.files({
|
|
19
|
-
query: store.filter,
|
|
20
|
-
})
|
|
21
|
-
if (result.error) return []
|
|
22
|
-
const sliced = (result.data ?? []).slice(0, 5)
|
|
23
|
-
return sliced
|
|
24
|
-
},
|
|
25
|
-
)
|
|
26
|
-
|
|
27
|
-
const options = createMemo(() =>
|
|
28
|
-
(files() ?? []).map((file) => ({
|
|
29
|
-
value: file,
|
|
30
|
-
title: file,
|
|
31
|
-
})),
|
|
32
|
-
)
|
|
33
|
-
|
|
34
|
-
return (
|
|
35
|
-
<DialogSelect
|
|
36
|
-
title="Autocomplete"
|
|
37
|
-
options={options()}
|
|
38
|
-
onSelect={(option) => {
|
|
39
|
-
props.onSelect?.(option.value)
|
|
40
|
-
dialog.clear()
|
|
41
|
-
}}
|
|
42
|
-
/>
|
|
43
|
-
)
|
|
44
|
-
}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { DialogSelect, type DialogSelectRef } from "../ui/dialog-select"
|
|
2
|
-
import { useTheme } from "../context/theme"
|
|
3
|
-
import { useDialog } from "../ui/dialog"
|
|
4
|
-
import { onCleanup, onMount } from "solid-js"
|
|
5
|
-
|
|
6
|
-
export function DialogThemeList() {
|
|
7
|
-
const theme = useTheme()
|
|
8
|
-
const options = Object.keys(theme.all())
|
|
9
|
-
.sort((a, b) => a.localeCompare(b, undefined, { sensitivity: "base" }))
|
|
10
|
-
.map((value) => ({
|
|
11
|
-
title: value,
|
|
12
|
-
value: value,
|
|
13
|
-
}))
|
|
14
|
-
const dialog = useDialog()
|
|
15
|
-
let confirmed = false
|
|
16
|
-
let ref: DialogSelectRef<string>
|
|
17
|
-
const initial = theme.selected
|
|
18
|
-
|
|
19
|
-
onCleanup(() => {
|
|
20
|
-
if (!confirmed) theme.set(initial)
|
|
21
|
-
})
|
|
22
|
-
|
|
23
|
-
return (
|
|
24
|
-
<DialogSelect
|
|
25
|
-
title="Themes"
|
|
26
|
-
options={options}
|
|
27
|
-
current={initial}
|
|
28
|
-
onMove={(opt) => {
|
|
29
|
-
theme.set(opt.value)
|
|
30
|
-
}}
|
|
31
|
-
onSelect={(opt) => {
|
|
32
|
-
theme.set(opt.value)
|
|
33
|
-
confirmed = true
|
|
34
|
-
dialog.clear()
|
|
35
|
-
}}
|
|
36
|
-
ref={(r) => {
|
|
37
|
-
ref = r
|
|
38
|
-
}}
|
|
39
|
-
onFilter={(query) => {
|
|
40
|
-
if (query.length === 0) {
|
|
41
|
-
theme.set(initial)
|
|
42
|
-
return
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
const first = ref.filtered[0]
|
|
46
|
-
if (first) theme.set(first.value)
|
|
47
|
-
}}
|
|
48
|
-
/>
|
|
49
|
-
)
|
|
50
|
-
}
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
import { TextAttributes, RGBA } from "@opentui/core"
|
|
2
|
-
import { For, type JSX } from "solid-js"
|
|
3
|
-
import { useTheme, tint } from "@tui/context/theme"
|
|
4
|
-
import { logo, marks } from "@/cli/logo"
|
|
5
|
-
|
|
6
|
-
// Shadow markers (rendered chars in parens):
|
|
7
|
-
// _ = full shadow cell (space with bg=shadow)
|
|
8
|
-
// ^ = letter top, shadow bottom (▀ with fg=letter, bg=shadow)
|
|
9
|
-
// ~ = shadow top only (▀ with fg=shadow)
|
|
10
|
-
const SHADOW_MARKER = new RegExp(`[${marks}]`)
|
|
11
|
-
|
|
12
|
-
export function Logo() {
|
|
13
|
-
const { theme } = useTheme()
|
|
14
|
-
|
|
15
|
-
const renderLine = (line: string, fg: RGBA, bold: boolean): JSX.Element[] => {
|
|
16
|
-
const shadow = tint(theme.background, fg, 0.25)
|
|
17
|
-
const attrs = bold ? TextAttributes.BOLD : undefined
|
|
18
|
-
const elements: JSX.Element[] = []
|
|
19
|
-
let i = 0
|
|
20
|
-
|
|
21
|
-
while (i < line.length) {
|
|
22
|
-
const rest = line.slice(i)
|
|
23
|
-
const markerIndex = rest.search(SHADOW_MARKER)
|
|
24
|
-
|
|
25
|
-
if (markerIndex === -1) {
|
|
26
|
-
elements.push(
|
|
27
|
-
<text fg={fg} attributes={attrs} selectable={false}>
|
|
28
|
-
{rest}
|
|
29
|
-
</text>,
|
|
30
|
-
)
|
|
31
|
-
break
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
if (markerIndex > 0) {
|
|
35
|
-
elements.push(
|
|
36
|
-
<text fg={fg} attributes={attrs} selectable={false}>
|
|
37
|
-
{rest.slice(0, markerIndex)}
|
|
38
|
-
</text>,
|
|
39
|
-
)
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
const marker = rest[markerIndex]
|
|
43
|
-
switch (marker) {
|
|
44
|
-
case "_":
|
|
45
|
-
elements.push(
|
|
46
|
-
<text fg={fg} bg={shadow} attributes={attrs} selectable={false}>
|
|
47
|
-
{" "}
|
|
48
|
-
</text>,
|
|
49
|
-
)
|
|
50
|
-
break
|
|
51
|
-
case "^":
|
|
52
|
-
elements.push(
|
|
53
|
-
<text fg={fg} bg={shadow} attributes={attrs} selectable={false}>
|
|
54
|
-
▀
|
|
55
|
-
</text>,
|
|
56
|
-
)
|
|
57
|
-
break
|
|
58
|
-
case "~":
|
|
59
|
-
elements.push(
|
|
60
|
-
<text fg={shadow} attributes={attrs} selectable={false}>
|
|
61
|
-
▀
|
|
62
|
-
</text>,
|
|
63
|
-
)
|
|
64
|
-
break
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
i += markerIndex + 1
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
return elements
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
return (
|
|
74
|
-
<box>
|
|
75
|
-
<For each={logo.left}>
|
|
76
|
-
{(line, index) => (
|
|
77
|
-
<box flexDirection="row" gap={1}>
|
|
78
|
-
<box flexDirection="row">{renderLine(line, theme.textMuted, false)}</box>
|
|
79
|
-
<box flexDirection="row">{renderLine(logo.right[index()], theme.text, true)}</box>
|
|
80
|
-
</box>
|
|
81
|
-
)}
|
|
82
|
-
</For>
|
|
83
|
-
</box>
|
|
84
|
-
)
|
|
85
|
-
}
|