@stonerzju/opencode 1.2.17 → 1.2.19

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.
Files changed (261) hide show
  1. package/bin/opencode +29 -157
  2. package/package.json +29 -29
  3. package/src/acp/agent.ts +4 -4
  4. package/src/acp/session.ts +1 -1
  5. package/src/agent/agent.ts +3 -3
  6. package/src/bun/index.ts +2 -2
  7. package/src/cli/cmd/acp.ts +3 -3
  8. package/src/cli/cmd/debug/file.ts +1 -1
  9. package/src/cli/cmd/github.ts +2 -2
  10. package/src/cli/cmd/pr.ts +1 -1
  11. package/src/cli/cmd/tui/app.tsx +24 -24
  12. package/src/cli/cmd/tui/attach.ts +3 -3
  13. package/src/cli/cmd/tui/component/dialog-agent.tsx +3 -3
  14. package/src/cli/cmd/tui/component/dialog-command.tsx +3 -3
  15. package/src/cli/cmd/tui/component/dialog-mcp.tsx +5 -5
  16. package/src/cli/cmd/tui/component/dialog-model.tsx +4 -4
  17. package/src/cli/cmd/tui/component/dialog-provider.tsx +4 -4
  18. package/src/cli/cmd/tui/component/dialog-session-list.tsx +5 -5
  19. package/src/cli/cmd/tui/component/dialog-session-rename.tsx +3 -3
  20. package/src/cli/cmd/tui/component/dialog-skill.tsx +3 -3
  21. package/src/cli/cmd/tui/component/dialog-stash.tsx +3 -3
  22. package/src/cli/cmd/tui/component/dialog-status.tsx +2 -2
  23. package/src/cli/cmd/tui/component/dialog-tag.tsx +3 -3
  24. package/src/cli/cmd/tui/component/logo.tsx +2 -2
  25. package/src/cli/cmd/tui/component/prompt/autocomplete.tsx +6 -6
  26. package/src/cli/cmd/tui/component/prompt/frecency.tsx +2 -2
  27. package/src/cli/cmd/tui/component/prompt/history.tsx +2 -2
  28. package/src/cli/cmd/tui/component/prompt/index.tsx +14 -14
  29. package/src/cli/cmd/tui/component/prompt/stash.tsx +2 -2
  30. package/src/cli/cmd/tui/component/textarea-keybindings.ts +1 -1
  31. package/src/cli/cmd/tui/component/tips.tsx +1 -1
  32. package/src/cli/cmd/tui/context/directory.ts +1 -1
  33. package/src/cli/cmd/tui/context/exit.tsx +1 -1
  34. package/src/cli/cmd/tui/context/keybind.tsx +2 -2
  35. package/src/cli/cmd/tui/context/kv.tsx +2 -2
  36. package/src/cli/cmd/tui/context/local.tsx +6 -6
  37. package/src/cli/cmd/tui/context/sync.tsx +4 -4
  38. package/src/cli/cmd/tui/context/theme/opencode.json +245 -0
  39. package/src/cli/cmd/tui/context/theme.tsx +2 -2
  40. package/src/cli/cmd/tui/context/tui-config.tsx +1 -1
  41. package/src/cli/cmd/tui/event.ts +2 -2
  42. package/src/cli/cmd/tui/routes/home.tsx +6 -6
  43. package/src/cli/cmd/tui/routes/session/dialog-fork-from-timeline.tsx +6 -6
  44. package/src/cli/cmd/tui/routes/session/dialog-message.tsx +6 -6
  45. package/src/cli/cmd/tui/routes/session/dialog-subagent.tsx +2 -2
  46. package/src/cli/cmd/tui/routes/session/dialog-timeline.tsx +3 -3
  47. package/src/cli/cmd/tui/routes/session/header.tsx +5 -5
  48. package/src/cli/cmd/tui/routes/session/index.tsx +32 -32
  49. package/src/cli/cmd/tui/routes/session/permission.tsx +4 -4
  50. package/src/cli/cmd/tui/routes/session/sidebar.tsx +4 -4
  51. package/src/cli/cmd/tui/thread.ts +9 -9
  52. package/src/cli/cmd/tui/ui/dialog-confirm.tsx +1 -1
  53. package/src/cli/cmd/tui/ui/dialog-help.tsx +2 -2
  54. package/src/cli/cmd/tui/ui/dialog-select.tsx +5 -5
  55. package/src/cli/cmd/tui/ui/dialog.tsx +3 -3
  56. package/src/cli/cmd/tui/ui/toast.tsx +1 -1
  57. package/src/cli/cmd/tui/util/editor.ts +3 -3
  58. package/src/cli/cmd/tui/util/transcript.ts +1 -1
  59. package/src/cli/cmd/tui/worker.ts +10 -10
  60. package/src/cli/error.ts +1 -1
  61. package/src/cli/ui.ts +1 -1
  62. package/src/cli/upgrade.ts +4 -4
  63. package/src/command/index.ts +1 -1
  64. package/src/config/config.ts +10 -10
  65. package/src/config/markdown.ts +1 -1
  66. package/src/config/migrate-tui-config.ts +5 -5
  67. package/src/config/paths.ts +4 -4
  68. package/src/config/tui.ts +4 -4
  69. package/src/control/control.sql.ts +1 -1
  70. package/src/control/index.ts +1 -1
  71. package/src/control-plane/adaptors/worktree.ts +1 -1
  72. package/src/control-plane/session-proxy-middleware.ts +1 -1
  73. package/src/control-plane/workspace.sql.ts +1 -1
  74. package/src/control-plane/workspace.ts +7 -7
  75. package/src/file/index.ts +1 -1
  76. package/src/file/ripgrep.ts +2 -2
  77. package/src/file/watcher.ts +5 -5
  78. package/src/format/formatter.ts +1 -1
  79. package/src/ide/index.ts +3 -3
  80. package/src/index.ts +1 -1
  81. package/src/installation/index.ts +3 -3
  82. package/src/lsp/client.ts +3 -3
  83. package/src/lsp/index.ts +3 -3
  84. package/src/mcp/index.ts +4 -4
  85. package/src/permission/index.ts +2 -2
  86. package/src/permission/next.ts +10 -10
  87. package/src/plugin/codex.ts +1 -1
  88. package/src/plugin/copilot.ts +2 -2
  89. package/src/plugin/index.ts +1 -1
  90. package/src/project/bootstrap.ts +2 -2
  91. package/src/project/instance.ts +4 -4
  92. package/src/project/project.sql.ts +1 -1
  93. package/src/project/project.ts +5 -5
  94. package/src/project/state.ts +1 -1
  95. package/src/project/vcs.ts +4 -4
  96. package/src/provider/auth.ts +4 -4
  97. package/src/provider/error.ts +1 -1
  98. package/src/provider/models-snapshot.ts +2 -0
  99. package/src/provider/models.ts +1 -1
  100. package/src/provider/provider.ts +2 -2
  101. package/src/provider/transform.ts +2 -2
  102. package/src/pty/index.ts +5 -5
  103. package/src/question/index.ts +5 -5
  104. package/src/server/event.ts +1 -1
  105. package/src/server/mdns.ts +1 -1
  106. package/src/server/routes/global.ts +3 -3
  107. package/src/server/routes/permission.ts +1 -1
  108. package/src/server/routes/pty.ts +1 -1
  109. package/src/server/routes/session.ts +4 -4
  110. package/src/server/routes/tui.ts +1 -1
  111. package/src/server/server.ts +3 -3
  112. package/src/session/compaction.ts +7 -7
  113. package/src/session/index.ts +10 -10
  114. package/src/session/instruction.ts +1 -1
  115. package/src/session/llm.ts +11 -11
  116. package/src/session/message-v2.ts +10 -10
  117. package/src/session/message.ts +1 -1
  118. package/src/session/processor.ts +10 -10
  119. package/src/session/prompt.ts +8 -8
  120. package/src/session/retry.ts +2 -2
  121. package/src/session/revert.ts +1 -1
  122. package/src/session/session.sql.ts +3 -3
  123. package/src/session/status.ts +3 -3
  124. package/src/session/summary.ts +5 -5
  125. package/src/session/system.ts +1 -1
  126. package/src/session/todo.ts +2 -2
  127. package/src/share/share-next.ts +7 -7
  128. package/src/share/share.sql.ts +1 -1
  129. package/src/shell/shell.ts +3 -3
  130. package/src/skill/skill.ts +6 -6
  131. package/src/storage/db.ts +1 -1
  132. package/src/storage/storage.ts +1 -1
  133. package/src/tool/bash.ts +6 -6
  134. package/src/tool/edit.ts +1 -1
  135. package/src/tool/registry.ts +2 -2
  136. package/src/tool/skill.ts +1 -1
  137. package/src/tool/task.ts +3 -3
  138. package/src/util/array.ts +10 -0
  139. package/src/util/binary.ts +41 -0
  140. package/src/util/encode.ts +51 -0
  141. package/src/util/error.ts +54 -0
  142. package/src/util/identifier.ts +48 -0
  143. package/src/util/lazy.ts +4 -16
  144. package/src/util/path.ts +37 -0
  145. package/src/util/retry.ts +41 -0
  146. package/src/util/slug.ts +74 -0
  147. package/src/worktree/index.ts +3 -3
  148. package/AGENTS.md +0 -10
  149. package/BUN_SHELL_MIGRATION_PLAN.md +0 -136
  150. package/Dockerfile +0 -18
  151. package/README.md +0 -15
  152. package/bunfig.toml +0 -7
  153. package/drizzle.config.ts +0 -10
  154. package/script/build.ts +0 -224
  155. package/script/check-migrations.ts +0 -16
  156. package/script/postinstall.mjs +0 -131
  157. package/script/publish.ts +0 -181
  158. package/script/schema.ts +0 -63
  159. package/script/seed-e2e.ts +0 -50
  160. package/sst-env.d.ts +0 -10
  161. package/test/AGENTS.md +0 -81
  162. package/test/acp/agent-interface.test.ts +0 -51
  163. package/test/acp/event-subscription.test.ts +0 -683
  164. package/test/agent/agent.test.ts +0 -689
  165. package/test/bun.test.ts +0 -53
  166. package/test/cli/github-action.test.ts +0 -197
  167. package/test/cli/github-remote.test.ts +0 -80
  168. package/test/cli/import.test.ts +0 -38
  169. package/test/cli/plugin-auth-picker.test.ts +0 -120
  170. package/test/cli/tui/transcript.test.ts +0 -322
  171. package/test/config/agent-color.test.ts +0 -71
  172. package/test/config/config.test.ts +0 -1886
  173. package/test/config/fixtures/empty-frontmatter.md +0 -4
  174. package/test/config/fixtures/frontmatter.md +0 -28
  175. package/test/config/fixtures/markdown-header.md +0 -11
  176. package/test/config/fixtures/no-frontmatter.md +0 -1
  177. package/test/config/fixtures/weird-model-id.md +0 -13
  178. package/test/config/markdown.test.ts +0 -228
  179. package/test/config/tui.test.ts +0 -510
  180. package/test/control-plane/session-proxy-middleware.test.ts +0 -147
  181. package/test/control-plane/sse.test.ts +0 -56
  182. package/test/control-plane/workspace-server-sse.test.ts +0 -65
  183. package/test/control-plane/workspace-sync.test.ts +0 -97
  184. package/test/file/ignore.test.ts +0 -10
  185. package/test/file/index.test.ts +0 -394
  186. package/test/file/path-traversal.test.ts +0 -198
  187. package/test/file/ripgrep.test.ts +0 -39
  188. package/test/file/time.test.ts +0 -361
  189. package/test/fixture/db.ts +0 -11
  190. package/test/fixture/fixture.ts +0 -45
  191. package/test/fixture/lsp/fake-lsp-server.js +0 -77
  192. package/test/fixture/skills/agents-sdk/SKILL.md +0 -152
  193. package/test/fixture/skills/agents-sdk/references/callable.md +0 -92
  194. package/test/fixture/skills/cloudflare/SKILL.md +0 -211
  195. package/test/fixture/skills/index.json +0 -6
  196. package/test/ide/ide.test.ts +0 -82
  197. package/test/keybind.test.ts +0 -421
  198. package/test/lsp/client.test.ts +0 -95
  199. package/test/mcp/headers.test.ts +0 -153
  200. package/test/mcp/oauth-browser.test.ts +0 -249
  201. package/test/memory/abort-leak.test.ts +0 -136
  202. package/test/patch/patch.test.ts +0 -348
  203. package/test/permission/arity.test.ts +0 -33
  204. package/test/permission/next.test.ts +0 -689
  205. package/test/permission-task.test.ts +0 -319
  206. package/test/plugin/auth-override.test.ts +0 -44
  207. package/test/plugin/codex.test.ts +0 -123
  208. package/test/preload.ts +0 -80
  209. package/test/project/project.test.ts +0 -348
  210. package/test/project/worktree-remove.test.ts +0 -65
  211. package/test/provider/amazon-bedrock.test.ts +0 -446
  212. package/test/provider/copilot/convert-to-copilot-messages.test.ts +0 -523
  213. package/test/provider/copilot/copilot-chat-model.test.ts +0 -592
  214. package/test/provider/gitlab-duo.test.ts +0 -262
  215. package/test/provider/provider.test.ts +0 -2220
  216. package/test/provider/transform.test.ts +0 -2353
  217. package/test/pty/pty-output-isolation.test.ts +0 -140
  218. package/test/question/question.test.ts +0 -300
  219. package/test/scheduler.test.ts +0 -73
  220. package/test/server/global-session-list.test.ts +0 -89
  221. package/test/server/session-list.test.ts +0 -90
  222. package/test/server/session-select.test.ts +0 -78
  223. package/test/session/compaction.test.ts +0 -423
  224. package/test/session/instruction.test.ts +0 -170
  225. package/test/session/llm.test.ts +0 -667
  226. package/test/session/message-v2.test.ts +0 -924
  227. package/test/session/prompt.test.ts +0 -211
  228. package/test/session/retry.test.ts +0 -188
  229. package/test/session/revert-compact.test.ts +0 -285
  230. package/test/session/session.test.ts +0 -71
  231. package/test/session/structured-output-integration.test.ts +0 -233
  232. package/test/session/structured-output.test.ts +0 -385
  233. package/test/skill/discovery.test.ts +0 -110
  234. package/test/skill/skill.test.ts +0 -388
  235. package/test/snapshot/snapshot.test.ts +0 -1180
  236. package/test/storage/json-migration.test.ts +0 -846
  237. package/test/tool/__snapshots__/tool.test.ts.snap +0 -9
  238. package/test/tool/apply_patch.test.ts +0 -566
  239. package/test/tool/bash.test.ts +0 -402
  240. package/test/tool/edit.test.ts +0 -496
  241. package/test/tool/external-directory.test.ts +0 -127
  242. package/test/tool/fixtures/large-image.png +0 -0
  243. package/test/tool/fixtures/models-api.json +0 -38413
  244. package/test/tool/grep.test.ts +0 -110
  245. package/test/tool/question.test.ts +0 -107
  246. package/test/tool/read.test.ts +0 -504
  247. package/test/tool/registry.test.ts +0 -122
  248. package/test/tool/skill.test.ts +0 -112
  249. package/test/tool/truncation.test.ts +0 -160
  250. package/test/tool/webfetch.test.ts +0 -100
  251. package/test/tool/write.test.ts +0 -348
  252. package/test/util/filesystem.test.ts +0 -443
  253. package/test/util/format.test.ts +0 -59
  254. package/test/util/glob.test.ts +0 -164
  255. package/test/util/iife.test.ts +0 -36
  256. package/test/util/lazy.test.ts +0 -50
  257. package/test/util/lock.test.ts +0 -72
  258. package/test/util/process.test.ts +0 -59
  259. package/test/util/timeout.test.ts +0 -21
  260. package/test/util/wildcard.test.ts +0 -90
  261. package/tsconfig.json +0 -16
@@ -1,7 +1,7 @@
1
- import { DialogSelect, type DialogSelectOption } from "@tui/ui/dialog-select"
1
+ import { DialogSelect, type DialogSelectOption } from "../ui/dialog-select"
2
2
  import { createResource, createMemo } from "solid-js"
3
- import { useDialog } from "@tui/ui/dialog"
4
- import { useSDK } from "@tui/context/sdk"
3
+ import { useDialog } from "../ui/dialog"
4
+ import { useSDK } from "../context/sdk"
5
5
 
6
6
  export type DialogSkillProps = {
7
7
  onSelect: (skill: string) => void
@@ -1,7 +1,7 @@
1
- import { useDialog } from "@tui/ui/dialog"
2
- import { DialogSelect } from "@tui/ui/dialog-select"
1
+ import { useDialog } from "../ui/dialog"
2
+ import { DialogSelect } from "../ui/dialog-select"
3
3
  import { createMemo, createSignal } from "solid-js"
4
- import { Locale } from "@/util/locale"
4
+ import { Locale } from "../../../../util/locale"
5
5
  import { useTheme } from "../context/theme"
6
6
  import { useKeybind } from "../context/keybind"
7
7
  import { usePromptStash, type StashEntry } from "./prompt/stash"
@@ -1,8 +1,8 @@
1
1
  import { TextAttributes } from "@opentui/core"
2
2
  import { fileURLToPath } from "bun"
3
3
  import { useTheme } from "../context/theme"
4
- import { useDialog } from "@tui/ui/dialog"
5
- import { useSync } from "@tui/context/sync"
4
+ import { useDialog } from "../ui/dialog"
5
+ import { useSync } from "../context/sync"
6
6
  import { For, Match, Switch, Show, createMemo } from "solid-js"
7
7
 
8
8
  export type DialogStatusProps = {}
@@ -1,7 +1,7 @@
1
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"
2
+ import { DialogSelect } from "../ui/dialog-select"
3
+ import { useDialog } from "../ui/dialog"
4
+ import { useSDK } from "../context/sdk"
5
5
  import { createStore } from "solid-js/store"
6
6
 
7
7
  export function DialogTag(props: { onSelect?: (value: string) => void }) {
@@ -1,7 +1,7 @@
1
1
  import { TextAttributes, RGBA } from "@opentui/core"
2
2
  import { For, type JSX } from "solid-js"
3
- import { useTheme, tint } from "@tui/context/theme"
4
- import { logo, marks } from "@/cli/logo"
3
+ import { useTheme, tint } from "../context/theme"
4
+ import { logo, marks } from "../../../logo"
5
5
 
6
6
  // Shadow markers (rendered chars in parens):
7
7
  // _ = full shadow cell (space with bg=shadow)
@@ -4,13 +4,13 @@ import fuzzysort from "fuzzysort"
4
4
  import { firstBy } from "remeda"
5
5
  import { createMemo, createResource, createEffect, onMount, onCleanup, Index, Show, createSignal } from "solid-js"
6
6
  import { createStore } from "solid-js/store"
7
- import { useSDK } from "@tui/context/sdk"
8
- import { useSync } from "@tui/context/sync"
9
- import { useTheme, selectedForeground } from "@tui/context/theme"
10
- import { SplitBorder } from "@tui/component/border"
11
- import { useCommandDialog } from "@tui/component/dialog-command"
7
+ import { useSDK } from "../../context/sdk"
8
+ import { useSync } from "../../context/sync"
9
+ import { useTheme, selectedForeground } from "../../context/theme"
10
+ import { SplitBorder } from "../border"
11
+ import { useCommandDialog } from "../dialog-command"
12
12
  import { useTerminalDimensions } from "@opentui/solid"
13
- import { Locale } from "@/util/locale"
13
+ import { Locale } from "../../../../../util/locale"
14
14
  import type { PromptInfo } from "./history"
15
15
  import { useFrecency } from "./frecency"
16
16
 
@@ -1,6 +1,6 @@
1
1
  import path from "path"
2
- import { Global } from "@/global"
3
- import { Filesystem } from "@/util/filesystem"
2
+ import { Global } from "../../../../../global"
3
+ import { Filesystem } from "../../../../../util/filesystem"
4
4
  import { onMount } from "solid-js"
5
5
  import { createStore } from "solid-js/store"
6
6
  import { createSimpleContext } from "../../context/helper"
@@ -1,6 +1,6 @@
1
1
  import path from "path"
2
- import { Global } from "@/global"
3
- import { Filesystem } from "@/util/filesystem"
2
+ import { Global } from "../../../../../global"
3
+ import { Filesystem } from "../../../../../util/filesystem"
4
4
  import { onMount } from "solid-js"
5
5
  import { createStore, produce, unwrap } from "solid-js/store"
6
6
  import { createSimpleContext } from "../../context/helper"
@@ -2,32 +2,32 @@ import { BoxRenderable, TextareaRenderable, MouseEvent, PasteEvent, t, dim, fg }
2
2
  import { createEffect, createMemo, type JSX, onMount, createSignal, onCleanup, on, Show, Switch, Match } from "solid-js"
3
3
  import "opentui-spinner/solid"
4
4
  import path from "path"
5
- import { Filesystem } from "@/util/filesystem"
6
- import { useLocal } from "@tui/context/local"
7
- import { useTheme } from "@tui/context/theme"
8
- import { EmptyBorder } from "@tui/component/border"
9
- import { useSDK } from "@tui/context/sdk"
10
- import { useRoute } from "@tui/context/route"
11
- import { useSync } from "@tui/context/sync"
12
- import { Identifier } from "@/id/id"
5
+ import { Filesystem } from "../../../../../util/filesystem"
6
+ import { useLocal } from "../../context/local"
7
+ import { useTheme } from "../../context/theme"
8
+ import { EmptyBorder } from "../border"
9
+ import { useSDK } from "../../context/sdk"
10
+ import { useRoute } from "../../context/route"
11
+ import { useSync } from "../../context/sync"
12
+ import { Identifier } from "../../../../../id/id"
13
13
  import { createStore, produce } from "solid-js/store"
14
- import { useKeybind } from "@tui/context/keybind"
14
+ import { useKeybind } from "../../context/keybind"
15
15
  import { usePromptHistory, type PromptInfo } from "./history"
16
16
  import { usePromptStash } from "./stash"
17
17
  import { DialogStash } from "../dialog-stash"
18
18
  import { type AutocompleteRef, Autocomplete } from "./autocomplete"
19
19
  import { useCommandDialog } from "../dialog-command"
20
20
  import { useRenderer } from "@opentui/solid"
21
- import { Editor } from "@tui/util/editor"
21
+ import { Editor } from "../../util/editor"
22
22
  import { useExit } from "../../context/exit"
23
23
  import { Clipboard } from "../../util/clipboard"
24
24
  import type { FilePart } from "@opencode-ai/sdk/v2"
25
25
  import { TuiEvent } from "../../event"
26
- import { iife } from "@/util/iife"
27
- import { Locale } from "@/util/locale"
28
- import { formatDuration } from "@/util/format"
26
+ import { iife } from "../../../../../util/iife"
27
+ import { Locale } from "../../../../../util/locale"
28
+ import { formatDuration } from "../../../../../util/format"
29
29
  import { createColors, createFrames } from "../../ui/spinner.ts"
30
- import { useDialog } from "@tui/ui/dialog"
30
+ import { useDialog } from "../../ui/dialog"
31
31
  import { DialogProvider as DialogProviderConnect } from "../dialog-provider"
32
32
  import { DialogAlert } from "../../ui/dialog-alert"
33
33
  import { useToast } from "../../ui/toast"
@@ -1,6 +1,6 @@
1
1
  import path from "path"
2
- import { Global } from "@/global"
3
- import { Filesystem } from "@/util/filesystem"
2
+ import { Global } from "../../../../../global"
3
+ import { Filesystem } from "../../../../../util/filesystem"
4
4
  import { onMount } from "solid-js"
5
5
  import { createStore, produce, unwrap } from "solid-js/store"
6
6
  import { createSimpleContext } from "../../context/helper"
@@ -1,7 +1,7 @@
1
1
  import { createMemo } from "solid-js"
2
2
  import type { KeyBinding } from "@opentui/core"
3
3
  import { useKeybind } from "../context/keybind"
4
- import { Keybind } from "@/util/keybind"
4
+ import { Keybind } from "../../../../util/keybind"
5
5
 
6
6
  const TEXTAREA_ACTIONS = [
7
7
  "submit",
@@ -1,5 +1,5 @@
1
1
  import { createMemo, createSignal, For } from "solid-js"
2
- import { DEFAULT_THEMES, useTheme } from "@tui/context/theme"
2
+ import { DEFAULT_THEMES, useTheme } from "../context/theme"
3
3
 
4
4
  const themeCount = Object.keys(DEFAULT_THEMES).length
5
5
  const themeTip = `Use {highlight}/themes{/highlight} or {highlight}Ctrl+X T{/highlight} to switch between ${themeCount} built-in themes`
@@ -1,6 +1,6 @@
1
1
  import { createMemo } from "solid-js"
2
2
  import { useSync } from "./sync"
3
- import { Global } from "@/global"
3
+ import { Global } from "../../../../global"
4
4
 
5
5
  export function useDirectory() {
6
6
  const sync = useSync()
@@ -1,6 +1,6 @@
1
1
  import { useRenderer } from "@opentui/solid"
2
2
  import { createSimpleContext } from "./helper"
3
- import { FormatError, FormatUnknownError } from "@/cli/error"
3
+ import { FormatError, FormatUnknownError } from "../../../error"
4
4
  import { win32FlushInputBuffer } from "../win32"
5
5
  type Exit = ((reason?: unknown) => Promise<void>) & {
6
6
  message: {
@@ -1,7 +1,7 @@
1
1
  import { createMemo } from "solid-js"
2
- import { Keybind } from "@/util/keybind"
2
+ import { Keybind } from "../../../../util/keybind"
3
3
  import { pipe, mapValues } from "remeda"
4
- import type { TuiConfig } from "@/config/tui"
4
+ import type { TuiConfig } from "../../../../config/tui"
5
5
  import type { ParsedKey, Renderable } from "@opentui/core"
6
6
  import { createStore } from "solid-js/store"
7
7
  import { useKeyboard, useRenderer } from "@opentui/solid"
@@ -1,5 +1,5 @@
1
- import { Global } from "@/global"
2
- import { Filesystem } from "@/util/filesystem"
1
+ import { Global } from "../../../../global"
2
+ import { Filesystem } from "../../../../util/filesystem"
3
3
  import { createSignal, type Setter } from "solid-js"
4
4
  import { createStore } from "solid-js/store"
5
5
  import { createSimpleContext } from "./helper"
@@ -1,18 +1,18 @@
1
1
  import { createStore } from "solid-js/store"
2
2
  import { batch, createEffect, createMemo } from "solid-js"
3
- import { useSync } from "@tui/context/sync"
4
- import { useTheme } from "@tui/context/theme"
3
+ import { useSync } from "./sync"
4
+ import { useTheme } from "./theme"
5
5
  import { uniqueBy } from "remeda"
6
6
  import path from "path"
7
- import { Global } from "@/global"
8
- import { iife } from "@/util/iife"
7
+ import { Global } from "../../../../global"
8
+ import { iife } from "../../../../util/iife"
9
9
  import { createSimpleContext } from "./helper"
10
10
  import { useToast } from "../ui/toast"
11
- import { Provider } from "@/provider/provider"
11
+ import { Provider } from "../../../../provider/provider"
12
12
  import { useArgs } from "./args"
13
13
  import { useSDK } from "./sdk"
14
14
  import { RGBA } from "@opentui/core"
15
- import { Filesystem } from "@/util/filesystem"
15
+ import { Filesystem } from "../../../../util/filesystem"
16
16
 
17
17
  export const { use: useLocal, provider: LocalProvider } = createSimpleContext({
18
18
  name: "Local",
@@ -19,14 +19,14 @@ import type {
19
19
  VcsInfo,
20
20
  } from "@opencode-ai/sdk/v2"
21
21
  import { createStore, produce, reconcile } from "solid-js/store"
22
- import { useSDK } from "@tui/context/sdk"
23
- import { Binary } from "@opencode-ai/util/binary"
22
+ import { useSDK } from "./sdk"
23
+ import { Binary } from "../../../../util/binary"
24
24
  import { createSimpleContext } from "./helper"
25
- import type { Snapshot } from "@/snapshot"
25
+ import type { Snapshot } from "../../../../snapshot"
26
26
  import { useExit } from "./exit"
27
27
  import { useArgs } from "./args"
28
28
  import { batch, onMount } from "solid-js"
29
- import { Log } from "@/util/log"
29
+ import { Log } from "../../../../util/log"
30
30
  import type { Path } from "@opencode-ai/sdk"
31
31
 
32
32
  export const { use: useSync, provider: SyncProvider } = createSimpleContext({
@@ -0,0 +1,245 @@
1
+ {
2
+ "$schema": "https://opencode.ai/theme.json",
3
+ "defs": {
4
+ "darkStep1": "#0a0a0a",
5
+ "darkStep2": "#141414",
6
+ "darkStep3": "#1e1e1e",
7
+ "darkStep4": "#282828",
8
+ "darkStep5": "#323232",
9
+ "darkStep6": "#3c3c3c",
10
+ "darkStep7": "#484848",
11
+ "darkStep8": "#606060",
12
+ "darkStep9": "#fab283",
13
+ "darkStep10": "#ffc09f",
14
+ "darkStep11": "#808080",
15
+ "darkStep12": "#eeeeee",
16
+ "darkSecondary": "#5c9cf5",
17
+ "darkAccent": "#9d7cd8",
18
+ "darkRed": "#e06c75",
19
+ "darkOrange": "#f5a742",
20
+ "darkGreen": "#7fd88f",
21
+ "darkCyan": "#56b6c2",
22
+ "darkYellow": "#e5c07b",
23
+ "lightStep1": "#ffffff",
24
+ "lightStep2": "#fafafa",
25
+ "lightStep3": "#f5f5f5",
26
+ "lightStep4": "#ebebeb",
27
+ "lightStep5": "#e1e1e1",
28
+ "lightStep6": "#d4d4d4",
29
+ "lightStep7": "#b8b8b8",
30
+ "lightStep8": "#a0a0a0",
31
+ "lightStep9": "#3b7dd8",
32
+ "lightStep10": "#2968c3",
33
+ "lightStep11": "#8a8a8a",
34
+ "lightStep12": "#1a1a1a",
35
+ "lightSecondary": "#7b5bb6",
36
+ "lightAccent": "#d68c27",
37
+ "lightRed": "#d1383d",
38
+ "lightOrange": "#d68c27",
39
+ "lightGreen": "#3d9a57",
40
+ "lightCyan": "#318795",
41
+ "lightYellow": "#b0851f"
42
+ },
43
+ "theme": {
44
+ "primary": {
45
+ "dark": "darkStep9",
46
+ "light": "lightStep9"
47
+ },
48
+ "secondary": {
49
+ "dark": "darkSecondary",
50
+ "light": "lightSecondary"
51
+ },
52
+ "accent": {
53
+ "dark": "darkAccent",
54
+ "light": "lightAccent"
55
+ },
56
+ "error": {
57
+ "dark": "darkRed",
58
+ "light": "lightRed"
59
+ },
60
+ "warning": {
61
+ "dark": "darkOrange",
62
+ "light": "lightOrange"
63
+ },
64
+ "success": {
65
+ "dark": "darkGreen",
66
+ "light": "lightGreen"
67
+ },
68
+ "info": {
69
+ "dark": "darkCyan",
70
+ "light": "lightCyan"
71
+ },
72
+ "text": {
73
+ "dark": "darkStep12",
74
+ "light": "lightStep12"
75
+ },
76
+ "textMuted": {
77
+ "dark": "darkStep11",
78
+ "light": "lightStep11"
79
+ },
80
+ "background": {
81
+ "dark": "darkStep1",
82
+ "light": "lightStep1"
83
+ },
84
+ "backgroundPanel": {
85
+ "dark": "darkStep2",
86
+ "light": "lightStep2"
87
+ },
88
+ "backgroundElement": {
89
+ "dark": "darkStep3",
90
+ "light": "lightStep3"
91
+ },
92
+ "border": {
93
+ "dark": "darkStep7",
94
+ "light": "lightStep7"
95
+ },
96
+ "borderActive": {
97
+ "dark": "darkStep8",
98
+ "light": "lightStep8"
99
+ },
100
+ "borderSubtle": {
101
+ "dark": "darkStep6",
102
+ "light": "lightStep6"
103
+ },
104
+ "diffAdded": {
105
+ "dark": "#4fd6be",
106
+ "light": "#1e725c"
107
+ },
108
+ "diffRemoved": {
109
+ "dark": "#c53b53",
110
+ "light": "#c53b53"
111
+ },
112
+ "diffContext": {
113
+ "dark": "#828bb8",
114
+ "light": "#7086b5"
115
+ },
116
+ "diffHunkHeader": {
117
+ "dark": "#828bb8",
118
+ "light": "#7086b5"
119
+ },
120
+ "diffHighlightAdded": {
121
+ "dark": "#b8db87",
122
+ "light": "#4db380"
123
+ },
124
+ "diffHighlightRemoved": {
125
+ "dark": "#e26a75",
126
+ "light": "#f52a65"
127
+ },
128
+ "diffAddedBg": {
129
+ "dark": "#20303b",
130
+ "light": "#d5e5d5"
131
+ },
132
+ "diffRemovedBg": {
133
+ "dark": "#37222c",
134
+ "light": "#f7d8db"
135
+ },
136
+ "diffContextBg": {
137
+ "dark": "darkStep2",
138
+ "light": "lightStep2"
139
+ },
140
+ "diffLineNumber": {
141
+ "dark": "darkStep3",
142
+ "light": "lightStep3"
143
+ },
144
+ "diffAddedLineNumberBg": {
145
+ "dark": "#1b2b34",
146
+ "light": "#c5d5c5"
147
+ },
148
+ "diffRemovedLineNumberBg": {
149
+ "dark": "#2d1f26",
150
+ "light": "#e7c8cb"
151
+ },
152
+ "markdownText": {
153
+ "dark": "darkStep12",
154
+ "light": "lightStep12"
155
+ },
156
+ "markdownHeading": {
157
+ "dark": "darkAccent",
158
+ "light": "lightAccent"
159
+ },
160
+ "markdownLink": {
161
+ "dark": "darkStep9",
162
+ "light": "lightStep9"
163
+ },
164
+ "markdownLinkText": {
165
+ "dark": "darkCyan",
166
+ "light": "lightCyan"
167
+ },
168
+ "markdownCode": {
169
+ "dark": "darkGreen",
170
+ "light": "lightGreen"
171
+ },
172
+ "markdownBlockQuote": {
173
+ "dark": "darkYellow",
174
+ "light": "lightYellow"
175
+ },
176
+ "markdownEmph": {
177
+ "dark": "darkYellow",
178
+ "light": "lightYellow"
179
+ },
180
+ "markdownStrong": {
181
+ "dark": "darkOrange",
182
+ "light": "lightOrange"
183
+ },
184
+ "markdownHorizontalRule": {
185
+ "dark": "darkStep11",
186
+ "light": "lightStep11"
187
+ },
188
+ "markdownListItem": {
189
+ "dark": "darkStep9",
190
+ "light": "lightStep9"
191
+ },
192
+ "markdownListEnumeration": {
193
+ "dark": "darkCyan",
194
+ "light": "lightCyan"
195
+ },
196
+ "markdownImage": {
197
+ "dark": "darkStep9",
198
+ "light": "lightStep9"
199
+ },
200
+ "markdownImageText": {
201
+ "dark": "darkCyan",
202
+ "light": "lightCyan"
203
+ },
204
+ "markdownCodeBlock": {
205
+ "dark": "darkStep12",
206
+ "light": "lightStep12"
207
+ },
208
+ "syntaxComment": {
209
+ "dark": "darkStep11",
210
+ "light": "lightStep11"
211
+ },
212
+ "syntaxKeyword": {
213
+ "dark": "darkAccent",
214
+ "light": "lightAccent"
215
+ },
216
+ "syntaxFunction": {
217
+ "dark": "darkStep9",
218
+ "light": "lightStep9"
219
+ },
220
+ "syntaxVariable": {
221
+ "dark": "darkRed",
222
+ "light": "lightRed"
223
+ },
224
+ "syntaxString": {
225
+ "dark": "darkGreen",
226
+ "light": "lightGreen"
227
+ },
228
+ "syntaxNumber": {
229
+ "dark": "darkOrange",
230
+ "light": "lightOrange"
231
+ },
232
+ "syntaxType": {
233
+ "dark": "darkYellow",
234
+ "light": "lightYellow"
235
+ },
236
+ "syntaxOperator": {
237
+ "dark": "darkCyan",
238
+ "light": "lightCyan"
239
+ },
240
+ "syntaxPunctuation": {
241
+ "dark": "darkStep12",
242
+ "light": "lightStep12"
243
+ }
244
+ }
245
+ }
@@ -39,8 +39,8 @@ import carbonfox from "./theme/carbonfox.json" with { type: "json" }
39
39
  import { useKV } from "./kv"
40
40
  import { useRenderer } from "@opentui/solid"
41
41
  import { createStore, produce } from "solid-js/store"
42
- import { Global } from "@/global"
43
- import { Filesystem } from "@/util/filesystem"
42
+ import { Global } from "../../../../global"
43
+ import { Filesystem } from "../../../../util/filesystem"
44
44
  import { useTuiConfig } from "./tui-config"
45
45
 
46
46
  type ThemeColors = {
@@ -1,4 +1,4 @@
1
- import { TuiConfig } from "@/config/tui"
1
+ import { TuiConfig } from "../../../../config/tui"
2
2
  import { createSimpleContext } from "./helper"
3
3
 
4
4
  export const { use: useTuiConfig, provider: TuiConfigProvider } = createSimpleContext({
@@ -1,5 +1,5 @@
1
- import { BusEvent } from "@/bus/bus-event"
2
- import { Bus } from "@/bus"
1
+ import { BusEvent } from "../../../bus/bus-event"
2
+ import { Bus } from "../../../bus"
3
3
  import z from "zod"
4
4
 
5
5
  export const TuiEvent = {
@@ -1,17 +1,17 @@
1
- import { Prompt, type PromptRef } from "@tui/component/prompt"
1
+ import { Prompt, type PromptRef } from "../component/prompt"
2
2
  import { createMemo, Match, onMount, Show, Switch } from "solid-js"
3
- import { useTheme } from "@tui/context/theme"
4
- import { useKeybind } from "@tui/context/keybind"
3
+ import { useTheme } from "../context/theme"
4
+ import { useKeybind } from "../context/keybind"
5
5
  import { Logo } from "../component/logo"
6
6
  import { Tips } from "../component/tips"
7
- import { Locale } from "@/util/locale"
7
+ import { Locale } from "../../../../util/locale"
8
8
  import { useSync } from "../context/sync"
9
9
  import { Toast } from "../ui/toast"
10
10
  import { useArgs } from "../context/args"
11
11
  import { useDirectory } from "../context/directory"
12
- import { useRouteData } from "@tui/context/route"
12
+ import { useRouteData } from "../context/route"
13
13
  import { usePromptRef } from "../context/prompt"
14
- import { Installation } from "@/installation"
14
+ import { Installation } from "../../../../installation"
15
15
  import { useKV } from "../context/kv"
16
16
  import { useCommandDialog } from "../component/dialog-command"
17
17
 
@@ -1,12 +1,12 @@
1
1
  import { createMemo, onMount } from "solid-js"
2
- import { useSync } from "@tui/context/sync"
3
- import { DialogSelect, type DialogSelectOption } from "@tui/ui/dialog-select"
2
+ import { useSync } from "../../context/sync"
3
+ import { DialogSelect, type DialogSelectOption } from "../../ui/dialog-select"
4
4
  import type { TextPart } from "@opencode-ai/sdk/v2"
5
- import { Locale } from "@/util/locale"
6
- import { useSDK } from "@tui/context/sdk"
7
- import { useRoute } from "@tui/context/route"
5
+ import { Locale } from "../../../../../util/locale"
6
+ import { useSDK } from "../../context/sdk"
7
+ import { useRoute } from "../../context/route"
8
8
  import { useDialog } from "../../ui/dialog"
9
- import type { PromptInfo } from "@tui/component/prompt/history"
9
+ import type { PromptInfo } from "../../component/prompt/history"
10
10
 
11
11
  export function DialogForkFromTimeline(props: { sessionID: string; onMove: (messageID: string) => void }) {
12
12
  const sync = useSync()
@@ -1,10 +1,10 @@
1
1
  import { createMemo } from "solid-js"
2
- import { useSync } from "@tui/context/sync"
3
- import { DialogSelect } from "@tui/ui/dialog-select"
4
- import { useSDK } from "@tui/context/sdk"
5
- import { useRoute } from "@tui/context/route"
6
- import { Clipboard } from "@tui/util/clipboard"
7
- import type { PromptInfo } from "@tui/component/prompt/history"
2
+ import { useSync } from "../../context/sync"
3
+ import { DialogSelect } from "../../ui/dialog-select"
4
+ import { useSDK } from "../../context/sdk"
5
+ import { useRoute } from "../../context/route"
6
+ import { Clipboard } from "../../util/clipboard"
7
+ import type { PromptInfo } from "../../component/prompt/history"
8
8
 
9
9
  export function DialogMessage(props: {
10
10
  messageID: string
@@ -1,5 +1,5 @@
1
- import { DialogSelect } from "@tui/ui/dialog-select"
2
- import { useRoute } from "@tui/context/route"
1
+ import { DialogSelect } from "../../ui/dialog-select"
2
+ import { useRoute } from "../../context/route"
3
3
 
4
4
  export function DialogSubagent(props: { sessionID: string }) {
5
5
  const route = useRoute()
@@ -1,8 +1,8 @@
1
1
  import { createMemo, onMount } from "solid-js"
2
- import { useSync } from "@tui/context/sync"
3
- import { DialogSelect, type DialogSelectOption } from "@tui/ui/dialog-select"
2
+ import { useSync } from "../../context/sync"
3
+ import { DialogSelect, type DialogSelectOption } from "../../ui/dialog-select"
4
4
  import type { TextPart } from "@opencode-ai/sdk/v2"
5
- import { Locale } from "@/util/locale"
5
+ import { Locale } from "../../../../../util/locale"
6
6
  import { DialogMessage } from "./dialog-message"
7
7
  import { useDialog } from "../../ui/dialog"
8
8
  import type { PromptInfo } from "../../component/prompt/history"
@@ -1,11 +1,11 @@
1
1
  import { type Accessor, createMemo, createSignal, Match, Show, Switch } from "solid-js"
2
- import { useRouteData } from "@tui/context/route"
3
- import { useSync } from "@tui/context/sync"
2
+ import { useRouteData } from "../../context/route"
3
+ import { useSync } from "../../context/sync"
4
4
  import { pipe, sumBy } from "remeda"
5
- import { useTheme } from "@tui/context/theme"
6
- import { SplitBorder } from "@tui/component/border"
5
+ import { useTheme } from "../../context/theme"
6
+ import { SplitBorder } from "../../component/border"
7
7
  import type { AssistantMessage, Session } from "@opencode-ai/sdk/v2"
8
- import { useCommandDialog } from "@tui/component/dialog-command"
8
+ import { useCommandDialog } from "../../component/dialog-command"
9
9
  import { useKeybind } from "../../context/keybind"
10
10
  import { useTerminalDimensions } from "@opentui/solid"
11
11