Compare commits

..

1227 Commits

Author SHA1 Message Date
opencode
de50234a1a release: v1.0.69 2025-11-17 21:26:46 +00:00
opencode-agent[bot]
d60102ba52 Added /thinking slash command to toggle thinking blocks visibility in OpenTUI. (#4424)
Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
Co-authored-by: rekram1-node <rekram1-node@users.noreply.github.com>
Co-authored-by: Aiden Cline <aidenpcline@gmail.com>
2025-11-17 15:16:35 -06:00
Haris Gušić
066a876f3d docs(contributing): Add "Setting up a Debugger" section (#4421)
Co-authored-by: GitHub Action <action@github.com>
2025-11-17 14:28:06 -06:00
Haris Gušić
c07a241ca8 chore: Remove obsolete 'any' type annotation (#4423) 2025-11-17 14:27:43 -06:00
Aiden Cline
0a2fffa9b5 tweak: whitelist 2025-11-17 13:18:13 -06:00
Dax Raad
bdfa213ccf deprecated session.idle event 2025-11-17 11:42:45 -05:00
Aiden Cline
7f0b2ce1ac Reapply "fix: system theme background to use 'none' for terminal transparency" (#4415)
This reverts commit a5365ce294.
2025-11-17 10:39:53 -06:00
Dax Raad
0a2d7af179 core: honor retry-after values exceeding 10 minutes instead of discarding them 2025-11-17 11:33:28 -05:00
Dax Raad
37652f48fb ignore 2025-11-17 11:32:07 -05:00
Dax Raad
8b19c6c7e4 better retry display 2025-11-17 11:31:10 -05:00
Aiden Cline
a5365ce294 Revert "fix: system theme background to use 'none' for terminal transparency" (#4415) 2025-11-17 10:24:20 -06:00
Jensen
f4a4514a9f fix: system theme background to use 'none' for terminal transparency (#4408) 2025-11-17 10:22:31 -06:00
opencode-agent[bot]
154006469c Updated help dialog to use dynamic keybind (#4414)
Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
Co-authored-by: rekram1-node <rekram1-node@users.noreply.github.com>
2025-11-17 10:18:59 -06:00
Dax
a1214fff2e Refactor agent loop (#4412) 2025-11-17 10:57:18 -05:00
GitHub Action
9fd43ec616 ignore: update download stats 2025-11-17 2025-11-17 12:04:41 +00:00
Luke Parker
5731c268b6 fix: Line count on win (#4401) 2025-11-17 01:08:22 -06:00
Keath Milligan
f4d892d4e1 fix: handle Git Bash path mapping on windows (#4380) 2025-11-17 01:06:44 -06:00
Aiden Cline
10b3702938 chore: update type 2025-11-17 00:07:23 -06:00
Tyler Gannon
e96442310c chore: replace z.union with z.enum for cleaner OpenAPI generation (#4394) 2025-11-17 00:06:40 -06:00
Spoon
5c722bf8c4 fix(batch): simple UX feedback (#4396) 2025-11-17 00:02:05 -06:00
Youssef Achy
58cc5cdf2a add support for azure cognitive services provider (#4397) 2025-11-17 00:01:45 -06:00
opencode-agent[bot]
3c6dcad2af Fixed OPENCODE_CONFIG_DIR to load config files. (#4400)
Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
Co-authored-by: rekram1-node <rekram1-node@users.noreply.github.com>
2025-11-16 23:48:36 -06:00
Jay
2535f9febf docs: Add clarification for projects using 'opencode' name
Added a section to clarify the affiliation of related projects.
2025-11-16 20:51:41 -05:00
Aiden Cline
25678fa504 fix: vercel gateway options 2025-11-16 18:39:31 -06:00
Sebastian Herrlinger
d7f4f3ec1f bump opentui version to 0.1.45, fixing highlighting on windows 2025-11-16 23:56:11 +01:00
Aiden Cline
16ccb39459 docs: permissions 2025-11-16 16:40:48 -06:00
Aiden Cline
f8630fb188 ignore: rm 2025-11-16 16:32:04 -06:00
Baptiste Cavallo
72e604744d fix(batch): restore per-tool UI feedback + UX improvements (#4387) 2025-11-16 16:31:41 -06:00
opencode-agent[bot]
832be6e7eb Added copy option to message context menu (#4389)
Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
Co-authored-by: rekram1-node <rekram1-node@users.noreply.github.com>
Co-authored-by: GitHub Action <action@github.com>
2025-11-16 15:35:05 -06:00
opencode
8ba48ed71d release: v1.0.68 2025-11-16 20:38:48 +00:00
Aiden Cline
cf266f6162 fix: promptCacheKey set unnecessarily 2025-11-16 14:32:57 -06:00
GitHub Action
1e6589526d ignore: update download stats 2025-11-16 2025-11-16 12:04:11 +00:00
Frank
f6b3ffaf64 wip: zen 2025-11-16 03:32:13 -05:00
GitHub Action
5d765d63d4 chore: format code 2025-11-16 08:30:36 +00:00
Frank
0e12dd62a3 zen: usage paging 2025-11-16 03:29:52 -05:00
opencode
2b957b5d1c release: v1.0.67 2025-11-16 07:49:52 +00:00
GitHub Action
31c7a0157c chore: format code 2025-11-16 07:44:06 +00:00
Aiden Cline
e728b94bca fix: panic when theme has 'none' 2025-11-16 01:43:23 -06:00
opencode
49040c0130 release: v1.0.66 2025-11-16 07:27:25 +00:00
Aiden Cline
0d05238ee6 fix: initial val 2025-11-16 01:14:49 -06:00
Aiden Cline
9b8a7da1e6 fix: history jsonl file corruption cases (#4364) 2025-11-16 00:50:13 -06:00
Zeno Jiricek
61fd21182c docs: mise installation command (#2938) 2025-11-15 21:44:28 -06:00
GitHub Action
487c2b5e76 chore: format code 2025-11-16 03:38:13 +00:00
xiaojie.zj
0e4703b227 add: add zenmux doc and header (#3597)
Co-authored-by: xiaojie.zj <xiaojie.zj@antgroup.com>
2025-11-15 21:37:30 -06:00
Alvin Johansson
84e0232bd5 Add Flexoki theme (#3986) 2025-11-15 21:28:13 -06:00
Luke Parker
35fbb011b2 fix: Diff view now ignores line endings changes/windows autocrlf (#4356) 2025-11-15 21:18:39 -06:00
Aiden Cline
6527a123f0 fix aur build (#4359) 2025-11-15 20:16:19 -06:00
Aiden Cline
0377cfd37c fix: omit ref for todo tool 2025-11-15 19:19:36 -06:00
Aiden Cline
edc933d816 tweak: make zod error more prompty 2025-11-15 13:19:24 -06:00
GitHub Action
0d608f6014 ignore: update download stats 2025-11-15 2025-11-15 12:04:09 +00:00
Chris Olszewski
69a45ef7d7 fix: snapshot history when running from git worktrees (#4312) 2025-11-15 01:02:00 -06:00
Baptiste Cavallo
1056b36eae experimental batch tool (#2983)
Co-authored-by: GitHub Action <action@github.com>
2025-11-15 00:54:36 -06:00
Aiden Cline
35c737ac68 tweak: only show dropdown for 3+ items (#4345) 2025-11-14 23:45:48 -06:00
Abílio Costa
725a2c2e95 docs: clarify that config files are merged, not replaced (#4342)
Co-authored-by: Claude <noreply@anthropic.com>
2025-11-14 17:49:47 -06:00
Tyler Gannon
c724d2392f fix: replace union type with enum "true"/"false" in /find/file endpoint (#4338) 2025-11-14 17:48:23 -06:00
Frank
f5230d1f02 fix: incorrect sonnet price calculation 2025-11-14 18:46:43 -05:00
GitHub Action
078111bd96 chore: format code 2025-11-14 22:44:36 +00:00
sredfern
736f8882f5 fix(provider): support local file paths for custom providers (#4323) 2025-11-14 16:43:59 -06:00
Brian Cheung
37cf365927 feat: support images in mcp tool responses (#4100)
Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
Co-authored-by: rekram1-node <rekram1-node@users.noreply.github.com>
2025-11-14 15:00:52 -06:00
Aiden Cline
b939470302 fix: add azure exclusion 2025-11-14 11:54:00 -06:00
Aiden Cline
ef4b2baedc set verbosity to low for gpt-5.1 (match codex) 2025-11-14 11:52:29 -06:00
Dax Raad
64d28ea457 fix sdk types 2025-11-14 12:42:46 -05:00
Dax Raad
2520780846 fix sdk types 2025-11-14 12:42:46 -05:00
Shantur Rathore
986c60353e set promptCacheKey for openai compatible providers (#4203)
Co-authored-by: GitHub Action <action@github.com>
2025-11-14 11:41:01 -06:00
Dax Raad
5fc26c958a add global.event.subscribe() to sdk 2025-11-14 12:32:43 -05:00
Frank
c1cf9cda6a doc: add baseten provider 2025-11-14 12:19:58 -05:00
GitHub Action
10d376eab2 ignore: update download stats 2025-11-14 2025-11-14 12:04:48 +00:00
Frank
53fc8a861b zen: add gpt-5-nano model 2025-11-14 00:59:42 -05:00
Frank
1d8330331c zen: use gpt-5-nano as small model 2025-11-14 00:59:00 -05:00
Frank
7a03c7fe38 zen: add gpt5.1 to docs 2025-11-13 23:47:38 -05:00
Frank
09bd32169c zen: hide alpha models 2025-11-13 23:10:06 -05:00
Dax Raad
7ec32f834e improve read tool end-of-file detection to prevent infinite loops 2025-11-13 21:41:06 -05:00
GitHub Action
205492c7e8 chore: format code 2025-11-14 01:16:58 +00:00
Aiden Cline
4c2e888709 no mr llm, you may not read that 2025-11-13 19:16:07 -06:00
opencode
c78fd097d1 release: v1.0.65 2025-11-14 00:10:30 +00:00
Dax Raad
340966195b handle config errors gracefully 2025-11-13 18:59:09 -05:00
GitHub Action
92604b391b chore: format code 2025-11-13 22:39:53 +00:00
Aiden Cline
0c51feb9c2 fix: max tokens when using models like opus with providers other than anthropic (#4307) 2025-11-13 16:39:09 -06:00
opencode
d0b4169a6b release: v1.0.64 2025-11-13 22:12:44 +00:00
Aiden Cline
1fc6c6fb2a fix: typeerror case 2025-11-13 15:51:23 -06:00
Adam
14f9b95557 fix(desktop): default theme 2025-11-13 15:26:36 -06:00
GitHub Action
d3bf1fa1fa chore: format code 2025-11-13 20:48:10 +00:00
Adam
a8836c5615 wip(desktop): layout improvements 2025-11-13 14:47:29 -06:00
Aiden Cline
779a27693a fix: opencode run timeout 2025-11-13 14:27:33 -06:00
GitHub Action
829d86840a chore: format code 2025-11-13 19:42:31 +00:00
Valerio Di Maggio
e225294dd4 Fix: unreadable texts in light mode (#4301) 2025-11-13 13:41:56 -06:00
opencode
a673e3650d release: v1.0.63 2025-11-13 19:00:14 +00:00
Aiden Cline
ff462dfd7a fix: windows install (#4293)
Co-authored-by: GitHub Action <action@github.com>
2025-11-13 12:22:07 -06:00
Luke Parker
73443585e5 fix: resolve bun/pnpm global install failures on Windows (#4275)
Co-authored-by: Aiden Cline <aidenpcline@gmail.com>
2025-11-13 10:38:57 -06:00
Tommy D. Rossi
609ab069a9 Add scroll acceleration support to TUI (#4289) 2025-11-13 17:02:10 +01:00
GitHub Action
ec3579d7cb ignore: update download stats 2025-11-13 2025-11-13 12:04:32 +00:00
Aiden Cline
f80a3fea31 fixes 2025-11-12 22:05:07 -06:00
Luke Parker
43a8d1b1ae fix: Enable Windows builds and fix bun+pnpm install on Windows (#4273) 2025-11-12 21:57:44 -06:00
Aiden Cline
09fa84ccfc fix: dirty check 2025-11-12 19:03:46 -06:00
GitHub Action
b981f0a205 chore: format code 2025-11-13 00:53:22 +00:00
Aiden Cline
767038afc3 ci: update zed sync 2025-11-12 18:52:39 -06:00
opencode
a7774115c5 release: v1.0.62 2025-11-13 00:13:18 +00:00
Luke Parker
288bc88e40 fix: Tool calling on windows (#4234) 2025-11-12 17:47:39 -06:00
Aiden Cline
6d36dbf9de fix: github action dirty check (#4262) 2025-11-12 16:16:07 -06:00
OpeOginni
4ab4baf3a4 feat(sidebar): add expandable sections for sidebar (#4132)
Co-authored-by: GitHub Action <action@github.com>
2025-11-12 16:15:17 -06:00
phantomreactor
90f05eb9c2 paste images in wsl using ctrl+v (#4123)
Co-authored-by: GitHub Action <action@github.com>
2025-11-12 15:10:23 -06:00
Melih Mucuk
b63b6d04c6 Fix usage & billing for custom model aliases and cached/reasoning tokens (#4222)
Co-authored-by: Melih Mucuk <melih@monkeysteam.com>
Co-authored-by: Aiden Cline <aidenpcline@gmail.com>
2025-11-12 13:59:35 -06:00
Aiden Cline
8addaa7e08 fix: custom model name merging 2025-11-12 13:55:13 -06:00
Elias
a96bf8e62d docs: OVHcloud AI Endpoints provider (#4257) 2025-11-12 13:28:35 -06:00
Ivan
c8bda598f5 fix: correct cache cost for OpenRouter and other OpenAI-compatible providers (#4256) 2025-11-12 12:41:44 -06:00
Adam
c857cff585 fix(desktop): double listing dir 2025-11-12 12:17:54 -06:00
Aiden Cline
fd9d2db755 ci: update zed sync 2025-11-12 10:52:20 -06:00
Aiden Cline
b19fd14f80 ignore: make issue button send opencode version too 2025-11-12 10:40:48 -06:00
Sebastian Herrlinger
a0f469095c upgrade opentui to 0.1.42, fixing some CJK/grapheme issues with prompt extmarks and char corruption 2025-11-12 15:35:16 +01:00
Adam
0ccb26df94 feat(desktop): sticky diff headers 2025-11-12 07:03:39 -06:00
Adam
71fd5966ad fix(desktop): styling tweaks 2025-11-12 07:03:38 -06:00
GitHub Action
c02230de4f ignore: update download stats 2025-11-12 2025-11-12 12:05:15 +00:00
Filip
aa2e2c76c0 fix: clangd hanging fixed (#3611)
Co-authored-by: Aiden Cline <aidenpcline@gmail.com>
Co-authored-by: GitHub Action <action@github.com>
2025-11-12 00:21:55 -06:00
opencode
7c2d4ee79a release: v1.0.61 2025-11-12 03:10:55 +00:00
Dax Raad
e3a2728fa3 tui: add double-esc interrupt mechanism for long-running operations
Users can now press escape twice within 5 seconds to interrupt long-running
operations in the TUI. The first press shows a visual hint, and the second
press aborts the current session.
2025-11-11 22:04:00 -05:00
Boston Cartwright
18260b037b feat: add SourceKit LSP support (#1545)
Co-authored-by: GitHub Action <action@github.com>
Co-authored-by: Aiden Cline <aidenpcline@gmail.com>
2025-11-11 20:51:33 -06:00
Dax Raad
ad83dd3ad9 tui: fix autocomplete display to prevent long file paths from breaking layout 2025-11-12 02:36:43 +00:00
opencode
6f37315cd1 release: v1.0.60 2025-11-12 02:36:42 +00:00
Dax
d81dce6a82 fix: add support for loading custom themes from .opencode/themes directory (#4229)
Co-authored-by: GitHub Action <action@github.com>
2025-11-11 21:30:38 -05:00
opencode
0bd11e970b release: v1.0.59 2025-11-12 02:07:41 +00:00
Dax Raad
7e29e1dd23 better errors on initial tui boot 2025-11-11 21:01:45 -05:00
Rafał Krzyważnia
491a2adf8d fix: resolve @file references in slash commands with subagents (#4221) 2025-11-11 19:38:50 -06:00
Aiden Cline
c07d6487a8 fix config ordering (#4228) 2025-11-11 19:27:34 -06:00
Aiden Cline
9990e84d37 fix: ensure revert dialog moves that prompt to input box (#4227) 2025-11-11 19:08:59 -06:00
Aiden Cline
0b86adbe99 feat: agent color cfg (#4226)
Co-authored-by: 0xrin <0xrin1@protonmail.com>
Co-authored-by: GitHub Action <action@github.com>
2025-11-11 18:32:44 -06:00
Frank
834a2c09d5 wip: poc pr command 2025-11-11 18:50:28 -05:00
Frank
f13c17e654 wip: poc pr command 2025-11-11 18:50:28 -05:00
Julian LaNeve
a0611d92e4 docs: Update config references to latest Sonnet & Haiku models (#4210) 2025-11-11 16:52:45 -06:00
Aiden Cline
0b001c3e80 tweak: make todos appear list of modified files 2025-11-11 16:05:23 -06:00
Sebastian Herrlinger
53b7cb62c4 upgrade opentui to 0.1.41:
- enables modifyOtherKeys to get CSI u sequences in terminals that support it
- uses Private Mode 2026 for synced rendering to fix cursor flickering in terminals like iTerm2
- lazy highlighting for code renderables (perf)
- linear scroll acceleration by default
- align textarea default bindings more with readline
- fix vertical cursor movement in textarea
- introduce stdin buffer to handle chunked sequences
- improve capability detection (async)
- renderer emits focus/blur events when app is focused/blurred (if supported by terminal)
2025-11-11 23:00:31 +01:00
Aiden Cline
c5e096c76a fix: costs being 0 when using custom model id overrides (#4219) 2025-11-11 15:58:14 -06:00
Aiden Cline
e1fc4a756b Hide /share if disabled (#4215) 2025-11-11 14:47:39 -06:00
Aiden Cline
e5bc4cbbcf ci: update changelog script 2025-11-11 14:27:13 -06:00
GitHub Action
459d5ec19b chore: format code 2025-11-11 20:21:00 +00:00
Aiden Cline
8baa222621 ci: update script 2025-11-11 14:20:19 -06:00
Dax Raad
ce1397cc34 core: add test to verify OpenCode doesn't crash when starting in git repositories with no commit history 2025-11-11 20:17:36 +00:00
Ron Suhodrev
dc7c5ced4c tui: restore full text when editing prompts with summarized content (#4030) 2025-11-11 20:17:36 +00:00
Corwin Marsh
b8e8fe7e31 docs: Update dead Context7 mcp server link (#4207)
Co-authored-by: Corwin Marsh <corwinm@users.noreply.github.com>
2025-11-11 20:17:36 +00:00
opencode
890085758f release: v1.0.58 2025-11-11 20:17:36 +00:00
Dax Raad
85f15893bc core: prevent crash when starting in repositories without any commits yet 2025-11-11 15:11:42 -05:00
Adam
98be75b17c fix(desktop): give review pane more width 2025-11-11 13:02:59 -06:00
GitHub Action
b5cc27b8ea chore: format code 2025-11-11 18:38:23 +00:00
Frank
05937b52cc chore: format code 2025-11-11 13:37:36 -05:00
GitHub Action
62b82570e1 chore: format code 2025-11-11 17:34:09 +00:00
Dax Raad
4bf75c0b44 core: remove unused experimental flags for turn summary and no-bootstrap to simplify feature flag management 2025-11-11 12:33:26 -05:00
opencode
a8a06c4983 release: v1.0.57 2025-11-11 17:30:26 +00:00
Dax Raad
b0b7fd143b tui: show LSP diagnostics inline when viewing files so users can see type errors and compilation issues without leaving the interface 2025-11-11 12:15:40 -05:00
GitHub Action
140498eb4f chore: format code 2025-11-11 16:59:37 +00:00
Haris Gušić
ca5126e24d fix: TUI spawn: reset BUN_OPTIONS (#3606) 2025-11-11 10:58:59 -06:00
Josiah Witt
fb2b3e567c docs: update keymap.json bindings for OpenCode command (#4192) 2025-11-11 10:48:10 -06:00
Adam
c672a1963b fix(desktop): prompt clearing inconsistent 2025-11-11 09:35:08 -06:00
Adam
54bff6b120 fix(desktop): code/diff number container width 2025-11-11 09:22:35 -06:00
Adam
ab3f198fab fix(desktop): session show more hidden on new session 2025-11-11 09:11:34 -06:00
Adam
0057ef6336 fix(desktop): prompt input not clearing, attachments flaky 2025-11-11 09:01:28 -06:00
Adam
4f604b3839 fix(desktop): color grouping 2025-11-11 09:01:27 -06:00
GitHub Action
a20489584e ignore: update download stats 2025-11-11 2025-11-11 12:04:42 +00:00
Dax Raad
a6b066bd47 ci 2025-11-11 02:15:33 -05:00
Dax Raad
37fdcac05a ci 2025-11-11 02:13:26 -05:00
Dax Raad
299bf1dca8 ci 2025-11-11 01:59:10 -05:00
Dax Raad
d685aa38ef type checks 2025-11-11 01:56:01 -05:00
Dax Raad
995b23787c ci 2025-11-11 01:48:29 -05:00
Dax Raad
ed8e663e13 ignore 2025-11-11 01:41:58 -05:00
Dax Raad
38cee3b848 ci: sync 2025-11-11 01:37:10 -05:00
Dax Raad
6d116d4b54 ci: fix 2025-11-11 01:35:50 -05:00
Aiden Cline
7c4f111b34 ignore: run bun i 2025-11-11 00:34:09 -06:00
Dax Raad
f2fac29270 ci 2025-11-11 01:33:02 -05:00
Dax Raad
12892f0e12 ci: improve bun caching to invalidate when bun version changes in package.json 2025-11-11 01:31:24 -05:00
GitHub Action
9714a3558e chore: format code 2025-11-11 06:28:19 +00:00
Dax Raad
e49a1d1f39 ci: fix 2025-11-11 01:27:39 -05:00
Dax Raad
528565510d sync 2025-11-11 01:25:39 -05:00
GitHub Action
36cfda933d chore: format code 2025-11-11 06:24:58 +00:00
Dax Raad
ecf5040966 tui: update @opentui/core to v0.1.39 and fix build script for new target format 2025-11-11 01:24:17 -05:00
Frank
7d56603c26 zen: failover on error 2025-11-11 00:29:44 -05:00
Aiden Cline
02b7cc8313 keep session dot in list for current active (#4185) 2025-11-10 22:20:35 -06:00
Dax Raad
c9a52c9a85 cache project id in root git folder 2025-11-10 21:57:55 -05:00
Dax Raad
dea668b0ea tui: help users read thinking blocks and trust todo syncs 2025-11-10 20:34:04 -05:00
Aiden Cline
1bc3e92376 fix: undefined check 2025-11-10 19:21:57 -06:00
Dax Raad
3f5acc3dff add web and codesearch tools 2025-11-10 16:39:54 -05:00
Aiden Cline
0588011476 ignore: bump copilot plugin version 2025-11-10 13:40:15 -06:00
OpeOginni
bba72c82ae Fix/google vertex configs (#4169)
Co-authored-by: GitHub Action <action@github.com>
2025-11-10 13:25:03 -06:00
denesbeck
e95181a551 Refactor/redundant toast comp (#4163)
Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
Co-authored-by: rekram1-node <rekram1-node@users.noreply.github.com>
2025-11-10 11:27:19 -06:00
GitHub Action
74e8c2e50f chore: format code 2025-11-10 17:19:20 +00:00
David Hill
cdabafa264 wip code theme inc light 2025-11-10 17:18:37 +00:00
denesbeck
0a92af60a0 fix: upgrade toast notification (#4159) 2025-11-10 10:28:28 -06:00
David Hill
c7808a4b01 wip code theme 2025-11-10 16:16:50 +00:00
David Hill
7f978e07ff wip code theme 2025-11-10 16:14:24 +00:00
David Hill
a4ae1bb9eb wip code theme 2025-11-10 16:00:05 +00:00
David Hill
96a39803cc wip code theme 2025-11-10 15:58:56 +00:00
GitHub Action
16f8f20b31 chore: format code 2025-11-10 14:51:24 +00:00
David Hill
06b1684ddb wip code editor update dark mode 2025-11-10 14:50:36 +00:00
David Hill
c6e830c954 Merge branch 'dev' of https://github.com/sst/opencode into dev 2025-11-10 13:44:12 +00:00
GitHub Action
fc78c28df6 ignore: update download stats 2025-11-10 2025-11-10 12:04:53 +00:00
opencode
930a1bf358 release: v1.0.55 2025-11-10 06:47:55 +00:00
GitHub Action
6cf7f18cc9 chore: format code 2025-11-10 06:41:40 +00:00
Aiden Cline
3f59570ee6 fix: add null check 2025-11-10 00:40:42 -06:00
GitHub Action
304e956b5d chore: format code 2025-11-10 06:00:38 +00:00
Wankong
538eaa42aa docs: format installation commands for madkrown code block (#4151)
Co-authored-by: GitHub Action <action@github.com>
2025-11-09 23:59:57 -06:00
opencode
67c41fd389 release: v1.0.54 2025-11-10 05:50:33 +00:00
GitHub Action
83ea19770a chore: format code 2025-11-10 05:44:26 +00:00
Dax Raad
3ace8543b2 tui: auto-scroll to bottom when switching between sessions 2025-11-10 00:43:48 -05:00
opencode
eb855e1e31 release: v1.0.53 2025-11-10 05:42:55 +00:00
Dax Raad
5e53f054c6 make reasoning parts less ugly 2025-11-10 00:37:35 -05:00
Dax Raad
5d5e184329 tui: improve session UI with better sidebar toggle and message handling 2025-11-10 00:21:31 -05:00
Dax Raad
2fbb49ac30 tui: render reasoning parts with syntax highlighting instead of plain text 2025-11-10 00:08:05 -05:00
Dax Raad
c56b407e1d tui: display 'Free' badge for zero-cost models in model selection dialog 2025-11-09 23:56:24 -05:00
lenstr
bdaa0e8b8c fix: --model flag being ignored in TUI mode (#4147) 2025-11-09 20:21:52 -06:00
Aiden Cline
4e549b1c05 fix: allow user to configure doom loop & external dir perms (#4095) 2025-11-09 20:21:38 -06:00
Aiden Cline
7be8e16c33 ci: sync zed 2025-11-09 13:54:14 -06:00
Frank
d1588f93a1 doc: add big pickle to doc 2025-11-09 14:12:54 -05:00
Aiden Cline
576696a370 ci: update description 2025-11-09 13:09:52 -06:00
Aiden Cline
2c6f9043e8 ci: fix 2025-11-09 13:06:32 -06:00
Aiden Cline
9f771ef0ae ci: fix 2025-11-09 13:05:51 -06:00
Aiden Cline
356715f67d ci: fix regex 2025-11-09 13:03:10 -06:00
Aiden Cline
540421267a fix 2025-11-09 12:56:17 -06:00
Aiden Cline
e253398936 ci: ignore 2025-11-09 12:54:59 -06:00
Aiden Cline
ee87e1f139 ci: ignore 2025-11-09 12:54:22 -06:00
Aiden Cline
8887616457 ci: sync zed 2025-11-09 12:47:36 -06:00
Aiden Cline
905c034885 ci: zed sync 2025-11-09 12:00:08 -06:00
Aiden Cline
92f7c4943f ci: zed sync 2025-11-09 11:59:00 -06:00
Aiden Cline
10bde356b1 chore: rm comment 2025-11-09 11:50:02 -06:00
Aiden Cline
f7cc46cd9f set cap for max time to wait between retries (#4135)
Co-authored-by: GitHub Action <action@github.com>
2025-11-09 11:46:58 -06:00
Mathias Beugnon
d9ffe07391 fix: messageID type in chat.message (#4128)
Co-authored-by: GitHub Action <action@github.com>
2025-11-09 09:39:50 -06:00
GitHub Action
c0702ed8bd ignore: update download stats 2025-11-09 2025-11-09 12:04:16 +00:00
opencode
b927b9dca6 release: v1.0.51 2025-11-09 06:46:42 +00:00
Dax Raad
4b7231be68 fix race condition 2025-11-09 01:41:49 -05:00
GitHub Action
70a6fe96ea chore: format code 2025-11-09 06:01:58 +00:00
Aiden Cline
6e5971dff2 ci: update sync zed 2025-11-09 00:01:13 -06:00
opencode
d48d6b3577 release: v1.0.50 2025-11-09 05:53:26 +00:00
Aiden Cline
4b1668c3ef Revert "tui: display 'Free' badge for zero-cost models in model selection dialog"
This reverts commit ce9b758d0a.
2025-11-08 23:48:18 -06:00
Mathias Beugnon
d85eb1b880 feat: add input context to chat.params and chat.message (#4085) 2025-11-08 23:29:27 -06:00
Ivan Starkov
9637d70407 fix: UI Freezes for a few minutes if repo has binary files (#4109) 2025-11-08 23:28:09 -06:00
Aiden Cline
cfbbdc2e14 ci: add job to sync zed extension 2025-11-08 23:23:43 -06:00
GitHub Action
feb65201f6 chore: format code 2025-11-09 01:58:05 +00:00
opencode
f1f07a56d8 release: v1.0.49 2025-11-09 01:58:04 +00:00
Dax Raad
0fe313bd87 tui: fix continue session navigation to wait for sync completion before redirecting
Previously, the continue session navigation would immediately try to redirect
to the most recent session before the sync data was fully loaded, causing
navigation to fail. Now it waits for sync status to be complete before
attempting the redirect, ensuring the session data is available.
2025-11-08 20:53:18 -05:00
opencode
1fd676528d release: v1.0.48 2025-11-09 01:44:10 +00:00
GitHub Action
0a2801444b chore: format code 2025-11-09 01:38:01 +00:00
Dax Raad
c9adbc7c21 tui: add logging when creating project instances to help users debug startup issues 2025-11-08 20:37:08 -05:00
opencode
ba8de38435 release: v1.0.47 2025-11-09 01:34:24 +00:00
Dax Raad
8166612467 tui: fix continue session navigation to use most recent session instead of oldest session 2025-11-08 20:28:23 -05:00
Dax Raad
4d20e1c3c6 Merge remote-tracking branch 'origin/dev' into dev 2025-11-08 20:21:02 -05:00
Dax Raad
4bb7ea9127 improve startup speed 2025-11-08 20:18:36 -05:00
GitHub Action
969af4d541 chore: format code 2025-11-08 22:32:25 +00:00
Christopher Sacca
271b679058 fix(lsp): handle optional requests to avoid MethodNotFound (-32601) with MATLAB Language Server (#4007) 2025-11-08 16:31:39 -06:00
GitHub Action
83b16cb18e chore: format code 2025-11-08 22:27:51 +00:00
Kamaal Farah
431ffc94f5 fix(theme): filter out null values from theme palette (#4083)
Signed-off-by: Kamaal Farah <kamaal.f1@gmail.com>
Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
Co-authored-by: rekram1-node <rekram1-node@users.noreply.github.com>
2025-11-08 16:27:07 -06:00
opencode
47b4cc6d53 release: v1.0.46 2025-11-08 21:48:37 +00:00
Dax Raad
ce9b758d0a tui: display 'Free' badge for zero-cost models in model selection dialog 2025-11-08 16:20:30 -05:00
Frank
f8a1a0b26f zen: fix billing button 2025-11-08 10:33:56 -05:00
GitHub Action
6ecaf83f76 chore: format code 2025-11-08 15:20:53 +00:00
Frank
30b1ae5d4b zen: rate limit 2025-11-08 10:18:21 -05:00
GitHub Action
9cd465f9c0 ignore: update download stats 2025-11-08 2025-11-08 12:04:10 +00:00
opencode
1747979568 release: v1.0.45 2025-11-08 02:25:51 +00:00
Dax Raad
062023fa06 chore(prompt): refine polaris instructions for practical behavior 2025-11-07 21:18:49 -05:00
Dax Raad
954a796b8a core: route polaris-alpha models to polaris system prompt 2025-11-07 21:07:59 -05:00
GitHub Action
34ff87d504 chore: format code 2025-11-08 01:59:02 +00:00
Dax Raad
16357e8041 chore: standardize prettier printWidth to 120 2025-11-07 20:58:17 -05:00
Dax Raad
dabb1aa719 fix(prompt): prevent title generation refusal responses 2025-11-07 20:50:15 -05:00
Aiden Cline
7af3380455 chore: adjust cfg code 2025-11-07 19:18:57 -06:00
GitHub Action
dcaa90808e chore: format code 2025-11-08 00:59:52 +00:00
Jay V
01705fd467 ignore: docs: fix type errors in sitemap generation script 2025-11-07 19:55:25 -05:00
Jay V
006f3bdeb6 ignore: docs: add sitemap.xml to gitignore 2025-11-07 19:51:47 -05:00
Jay V
1d43b4e6d7 ignore: docs: add automated sitemap generation for main app and docs routes 2025-11-07 19:51:46 -05:00
Aiden Cline
8cef7940fe allow reading of opencode.json(c) from .opencode/ 2025-11-07 17:35:08 -06:00
Sebastian Herrlinger
b2dd9fdfdf upgrade to opentui 0.1.39 supporting shift/ctrl+return/esc custom csi in ghostty 2025-11-08 00:17:07 +01:00
Aiden Cline
b82a52cb85 ignore: update log 2025-11-07 15:56:37 -06:00
Aiden Cline
7294d86778 ignore: symlink zed extension license 2025-11-07 15:41:01 -06:00
Aiden Cline
3bb3f4f2c9 ignore: fix 2025-11-07 15:32:19 -06:00
GitHub Action
d31f97343c chore: format code 2025-11-07 21:28:26 +00:00
Jay V
536d10e5ab ignore: lander add canonical urls and h1 tags to all landing pages 2025-11-07 16:27:35 -05:00
Jay V
9885c716f3 ignore: lander use h1 tags for main headings on landing and zen pages 2025-11-07 16:27:34 -05:00
opencode
39461fbbce release: v1.0.44 2025-11-07 21:24:15 +00:00
Dax Raad
1a2b3701f2 tui: show more sessions in list and fix sync timing to prevent race conditions 2025-11-07 16:19:44 -05:00
Aiden Cline
0a395d8783 ignore: update version 2025-11-07 15:18:44 -06:00
Aiden Cline
79bb22a573 ci: auto update zed extension 2025-11-07 15:17:26 -06:00
GitHub Action
4271df96d2 chore: format code 2025-11-07 21:09:47 +00:00
Aiden Cline
aa07be09e1 ignore: update zed extension 2025-11-07 15:08:50 -06:00
opencode
5d6bdca6d0 release: v1.0.43 2025-11-07 21:04:26 +00:00
Dax Raad
58bbe9e689 ci: add optional version parameter to publish workflow
Allows overriding the version when publishing releases instead of only using semantic bumping. This gives maintainers more control over release versioning for special cases or hotfixes.
2025-11-07 15:58:51 -05:00
Sebastian Herrlinger
b5a035ceab upgrade to opentui to fix disappearing content (again) and sticky scroll 2025-11-07 21:38:40 +01:00
Aiden Cline
b3c6d0b08a fix formatters 2025-11-07 14:10:20 -06:00
Aiden Cline
090d27df11 chore: rm debug logs 2025-11-07 14:00:18 -06:00
Adam
b374a6cac9 fix(desktop): stop icon size 2025-11-07 13:58:52 -06:00
Aiden Cline
73cd8a334c rework acp to compensate for changes in Zed IDE (#4050) 2025-11-07 13:57:12 -06:00
Adam
b46c3f2a26 fix(desktop): prompt input issues (wip) 2025-11-07 13:54:53 -06:00
Adam
45fabec091 fix(desktop): prompt input on non-chat tabs 2025-11-07 13:54:53 -06:00
Dax Raad
a96365fd81 Add command bar action to rename sessions 2025-11-07 14:51:44 -05:00
GitHub Action
5f7e1e099b chore: format code 2025-11-07 19:47:53 +00:00
Dax Raad
d462e380f4 fix: update references after moving message functions to MessageV2 namespace 2025-11-07 14:47:05 -05:00
Adam
c5a558f3da chore(desktop): remove dead code 2025-11-07 13:34:41 -06:00
Adam
7f51b181d4 chore(desktop): cleanup shiki theme stuff 2025-11-07 13:30:07 -06:00
Adam
7adbc3ad44 fix(desktop): code tab padding 2025-11-07 13:14:57 -06:00
Adam
89922a8598 fix(desktop): prompt input missing on new session 2025-11-07 12:56:07 -06:00
Adam
3a1d1a6284 feat(desktop): custom syntax colors 2025-11-07 12:48:17 -06:00
Dax Raad
4463d319c9 fix scroll when no session exists 2025-11-07 13:22:03 -05:00
GitHub Action
c6eea0343d chore: format code 2025-11-07 18:11:40 +00:00
opencode
e317e7e481 release: v1.0.41 2025-11-07 18:11:39 +00:00
Dax Raad
287855336d allow not specifying a limit on messages endpoint 2025-11-07 13:05:19 -05:00
opencode
d55f4f3322 release: v1.0.40 2025-11-07 17:37:31 +00:00
Dax Raad
b708d0ecec disable scrollbar temporarily because of text wrap issues 2025-11-07 12:31:28 -05:00
Jinhyeok Lee
afb831c93c vscode: Add VS Code Insiders support (#4019) 2025-11-07 10:31:16 -06:00
Adam
14397651b5 ignore: test file 2025-11-07 09:05:09 -06:00
Adam
e5804f64f9 fix(desktop): layout quirks 2025-11-07 06:26:26 -06:00
GitHub Action
ce7b73170f ignore: update download stats 2025-11-07 2025-11-07 12:04:25 +00:00
Dax Raad
9554abb56e message storage performance improvements 2025-11-07 01:11:47 -05:00
Charles David Mupende
d0f5c825bd feat: implement network IP retrieval for remote access in web command (#3945) 2025-11-06 19:37:23 -06:00
opencode-agent[bot]
9f603e39a6 Fixed ACP to respect user's default model config. (#4006)
Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
Co-authored-by: rekram1-node <rekram1-node@users.noreply.github.com>
Co-authored-by: GitHub Action <action@github.com>
Co-authored-by: Aiden Cline <aidenpcline@gmail.com>
2025-11-06 19:07:27 -06:00
GitHub Action
da51c9dfac chore: format code 2025-11-07 01:06:38 +00:00
Nicolai van der Smagt
9e04ff013c fix: resolve Mistral API compatibility issues (#2440)
Co-authored-by: Aiden Cline <aidenpcline@gmail.com>
2025-11-06 20:05:59 -05:00
opencode
6bfccace0c release: v1.0.39 2025-11-07 01:04:05 +00:00
Dax Raad
b25d4f9dfb fix issue with input randomly breaking 2025-11-06 19:48:10 -05:00
GitHub Action
d1962ca5a7 chore: format code 2025-11-07 00:14:59 +00:00
Dax Raad
25f31f3096 codex tweaks 2025-11-06 19:14:01 -05:00
opencode
11a6f0886e release: v1.0.37 2025-11-06 23:14:32 +00:00
Dax
3ba7e243d0 system theme (#4010) 2025-11-06 18:00:09 -05:00
Nicolai van der Smagt
a2ab019317 fix: resolve Mistral API compatibility issues (#2440)
Co-authored-by: Aiden Cline <aidenpcline@gmail.com>
2025-11-06 16:53:02 -06:00
Jay V
21957406ff docs: add Deep Infra provider documentation 2025-11-06 17:08:55 -05:00
Adam
61c4747fbe fix(desktop): diff highlight rendering 2025-11-06 15:58:45 -06:00
Adam
957c43aa09 fix(desktop): review tab padding 2025-11-06 15:34:47 -06:00
Adam
96c57418f3 feat(desktop): review flow 2025-11-06 15:13:06 -06:00
Shanjai Raj
b8c51e307f Fix: Auto-scroll to bottom when selecting session from list (#3988)
Co-authored-by: shanjairaj7 <shanjairaj7@users.noreply.github.com>
Co-authored-by: Aiden Cline <aidenpcline@gmail.com>
2025-11-06 14:29:39 -06:00
Frank
6791233ca0 Add desktop-feedback 2025-11-06 14:29:11 -05:00
GitHub Action
cd6072ec58 chore: format code 2025-11-06 18:59:34 +00:00
Jay V
017e42bbcd docs: align web package favicon with console design for consistency 2025-11-06 13:58:52 -05:00
opencode
2d20582802 release: v1.0.36 2025-11-06 18:55:54 +00:00
GitHub Action
2bcc00dbf0 chore: format code 2025-11-06 18:21:59 +00:00
Dax Raad
e45e94634f only display last 100 messages in TUI 2025-11-06 13:21:15 -05:00
Aiden Cline
de1278414f fix: opencode run not parsing model string 2025-11-06 12:09:13 -06:00
Dax Raad
3c2803fd9a flaky test 2025-11-06 13:05:53 -05:00
GitHub Action
90c2b26733 chore: format code 2025-11-06 18:03:50 +00:00
Dax Raad
1ea3a8eb9b big format 2025-11-06 13:03:12 -05:00
Aiden Cline
8729edc5e0 update import command to accept share links 2025-11-06 11:55:57 -06:00
Aiden Cline
d8bcf1f5f3 ci: update auto label 2025-11-06 11:46:42 -06:00
Dax Raad
67f3c934fe fix tests 2025-11-06 11:42:46 -05:00
Aiden Cline
065f656fb0 chore: rm hanging test 2025-11-06 10:39:32 -06:00
Dax Raad
f636d937c4 fix undo command breaking other commands 2025-11-06 11:25:37 -05:00
Adam
492bf51a0d fix(desktop): sidebar collapsed width 2025-11-06 09:56:46 -06:00
Adam
81ab127f63 fix(desktop): demo type error 2025-11-06 09:49:39 -06:00
Adam
6ba7c54bab feat(desktop): collapsible sidebar 2025-11-06 09:48:51 -06:00
Adam
146bae82cb fix(desktop): button styles 2025-11-06 09:48:50 -06:00
Adam
ab345cf0da feat(desktop): better tooltips 2025-11-06 09:48:50 -06:00
GitHub Action
a1836527ce ignore: update download stats 2025-11-06 2025-11-06 12:04:56 +00:00
opencode-agent[bot]
49e4cfb286 Added big dot (●) indicator for current session in modal (#3980)
Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
Co-authored-by: rekram1-node <rekram1-node@users.noreply.github.com>
Co-authored-by: Aiden Cline <aidenpcline@gmail.com>
2025-11-06 01:09:59 -06:00
Frank
e52bfab79d Update sst 2025-11-06 05:42:25 +00:00
opencode
cc6d5c8ddd release: v1.0.35 2025-11-06 05:42:24 +00:00
Dax Raad
afe8508949 fix homebrew upgrade 2025-11-06 00:37:44 -05:00
opencode
7c098c8849 release: v1.0.34 2025-11-06 02:35:17 +00:00
Dax Raad
11d6005b77 tui: reduce scrollbar visual prominence for less distracting interface 2025-11-05 21:30:40 -05:00
Dax Raad
2cc072b3dc enable scrollbar 2025-11-05 21:27:23 -05:00
opencode
86247b8ea9 release: v1.0.33 2025-11-06 02:18:41 +00:00
Dax Raad
0a5a02043c tui: move debug shortcuts to command palette for better discoverability 2025-11-05 21:13:35 -05:00
Sebastian Herrlinger
6e553f7e20 upgrade to opentui v0.1.36 2025-11-06 01:43:35 +00:00
opencode
bb6acc0ec6 release: v1.0.32 2025-11-06 01:43:35 +00:00
Dax Raad
5a84b9f467 temporarily use strip-ansi package till bun bug is fixed 2025-11-05 20:38:37 -05:00
opencode
c7031dfd77 release: v1.0.31 2025-11-06 01:35:40 +00:00
Dax Raad
e136a40771 ignore tmp type rrror 2025-11-05 20:31:13 -05:00
Dax Raad
ef25650ced regen bunlock 2025-11-05 20:30:40 -05:00
Dax Raad
6555a33eff type errors 2025-11-05 20:14:31 -05:00
Dax Raad
247ce44776 fix log 2025-11-05 20:01:57 -05:00
Dax Raad
4e7bfaab8b fix log 2025-11-05 20:00:09 -05:00
Sebastian Herrlinger
8b26a1f9bd upgrade to opentui 0.1.35, mitigating disappearing content and crashes 2025-11-06 01:38:58 +01:00
Dax Raad
2a9b6a85de core: ensure export command output can be piped without UI interference 2025-11-05 18:36:06 -05:00
opencode
c9ae89a38b release: v1.0.30 2025-11-05 23:32:22 +00:00
Dax Raad
e316050bf5 temporarily remove bun strip ansi due to bug 2025-11-05 18:27:19 -05:00
Dax Raad
306f45f04a add opencode import command to restore sessions from JSON exports 2025-11-05 18:05:01 -05:00
Adam
e006e3355c feat(desktop): incrementally load sessions in side nav 2025-11-05 16:32:08 -06:00
opencode
d7e31f76c4 release: v1.0.29 2025-11-05 22:14:46 +00:00
Aiden Cline
d425723249 ask instead of throwing tool error if file is outside cwd 2025-11-05 16:09:47 -06:00
Adam
c59ec71918 fix(desktop): max height on message diffs, session stats 2025-11-05 16:00:20 -06:00
Dax Raad
05ae99a09b fix sidebar modified files 2025-11-05 16:49:17 -05:00
opencode
6e22b45905 release: v1.0.28 2025-11-05 21:08:58 +00:00
Aiden Cline
c664f92829 acp: update auth method 2025-11-05 15:01:14 -06:00
Aiden Cline
f95333aaa4 acp: default to big pickle 2025-11-05 14:59:02 -06:00
opencode
ef0b5e3dcb release: v1.0.27 2025-11-05 20:44:40 +00:00
Dax Raad
b7262b8527 performance improvements 2025-11-05 15:33:23 -05:00
Dax Raad
1f44c7f750 include file count in summary 2025-11-05 14:23:10 -05:00
Dax Raad
7dba570195 ci: fix aur package 2025-11-05 14:22:25 -05:00
Haris Gušić
3d04ba26a3 fix(autocomplete): Prioritize exact matches (#3760) 2025-11-05 12:25:05 -06:00
Adam
3660e2c481 fix(desktop): local dev url 2025-11-05 12:09:30 -06:00
opencode
06ca45189b release: v1.0.26 2025-11-05 18:08:19 +00:00
Adam
674febcf60 fix(desktop): type issue 2025-11-05 11:59:10 -06:00
Adam
582d9a9622 fix(desktop): type issue 2025-11-05 11:56:32 -06:00
Adam
d525fbf829 feat(desktop): session router, interrupt agent, visual cleanup 2025-11-05 11:55:35 -06:00
OpeOginni
69a499f807 fix(tui): restructure Sidebar component to be scrollable (#3946) 2025-11-05 11:33:30 -06:00
Dax Raad
37e564139f tui: lower paste summary threshold to trigger on shorter content 2025-11-05 12:32:23 -05:00
monke-yo
ee8b81269b feat: add --attach flag to opencode run (#3889) 2025-11-05 11:31:01 -06:00
Filip
53998a2fed chore: remove unused patch tool from registry (to avoid accidental inclusions of it) (#3938) 2025-11-05 11:26:28 -06:00
Aiden Cline
af7b9e77d1 fix: eu-west-2 aws bedrock issue 2025-11-05 10:14:08 -06:00
Aiden Cline
77c65b18b5 tweak: normalize escape keybind 2025-11-05 10:13:04 -06:00
Matthew Fitzpatrick
c9dfe6d964 docs: include "limit" example (#3925)
Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
Co-authored-by: rekram1-node <rekram1-node@users.noreply.github.com>
2025-11-05 09:47:11 -06:00
Aiden Cline
03f7f18260 ci: adjust auto label 2025-11-05 09:36:38 -06:00
GitHub Action
2db76fc6dd ignore: update download stats 2025-11-05 2025-11-05 12:04:41 +00:00
opencode
7269c2316d release: v1.0.25 2025-11-05 07:00:07 +00:00
Aiden Cline
1e0596bc46 ACP: update package, fix slash command bug (#3906) 2025-11-05 00:50:48 -06:00
Aiden Cline
3ebec2435a allow @ agents to work even if not first thing in prompt 2025-11-04 23:37:09 -06:00
Christian Stewart
b90c0b5fac feat(tui): add /export and /copy commands (#3883)
Signed-off-by: Christian Stewart <christian@aperture.us>
2025-11-04 23:02:45 -06:00
Err
3b1ab444fd feat: add Clojure syntax highlighting support (#3912)
Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
Co-authored-by: rekram1-node <rekram1-node@users.noreply.github.com>
2025-11-04 22:47:05 -06:00
Dax Raad
234db24f1f tui: fix command validation to prevent invalid commands from being executed 2025-11-04 20:46:01 -05:00
Kyle F Butts
04546c0873 Add support for R formatter in formatters (#3918)
Co-authored-by: Aiden Cline <aidenpcline@gmail.com>
2025-11-04 18:18:33 -06:00
opencode
f51bd91af4 release: v1.0.24 2025-11-05 00:12:19 +00:00
Dax Raad
ebca25462e tui: fix session abort when autocomplete is visible 2025-11-04 18:45:39 -05:00
Aiden Cline
01b9148c04 fix: image reading error, also add error toast for event bus 2025-11-04 17:30:58 -06:00
Frank
d3e080894c wip: zen 2025-11-04 17:54:08 -05:00
Jay V
ee9aa24a55 ignore: update meta description to use proper OpenCode capitalization 2025-11-04 17:27:22 -05:00
Frank
16e2bded5b wip: zen 2025-11-04 17:24:20 -05:00
Frank
9fb49ab87b wip: zen 2025-11-04 17:24:20 -05:00
Frank
8d6a03cc89 zen: custom reload amount 2025-11-04 17:24:20 -05:00
Dax Raad
71b04ffa99 add command bar option to interrupt session 2025-11-04 17:11:07 -05:00
Aiden Cline
678ca757c9 fix: permissions not responding to esc 2025-11-04 16:08:31 -06:00
Jared A. Scheel
272349b8da Add support for uv format in formatters (#3916) 2025-11-04 15:40:29 -06:00
David Hill
7088bfabd7 Merge branch 'dev' of https://github.com/sst/opencode into dev 2025-11-04 21:36:46 +00:00
Ola
fe94bb8e50 feat(provider): add GitHub Enterprise support for Copilot (#2522)
Co-authored-by: Jon-Mikkel Korsvik <48263282+jkorsvik@users.noreply.github.com>
Co-authored-by: GitHub Action <action@github.com>
Co-authored-by: Aiden Cline <aidenpcline@gmail.com>
2025-11-04 15:36:12 -06:00
opencode
ba8bc1b8b4 release: v1.0.23 2025-11-04 19:38:18 +00:00
Timo Clasen
8a9a474df6 feat(TUI): add autocomplete readline style keybinds (#3717)
Co-authored-by: Aiden Cline <63023139+rekram1-node@users.noreply.github.com>
2025-11-04 13:28:03 -06:00
Aiden Cline
52e2b40610 fix: stop showing auto complete if user types a space 2025-11-04 13:22:18 -06:00
Dax Raad
ee1ff8cc07 tui: add ability to interrupt running sessions from command palette 2025-11-04 14:07:22 -05:00
opencode
434c0ff0d7 release: v1.0.22 2025-11-04 18:41:38 +00:00
Dax Raad
7a7060ef15 fix session performance issue from large diffs 2025-11-04 13:35:44 -05:00
opencode
f9af9fc221 release: v1.0.21 2025-11-04 17:47:34 +00:00
Sebastian Herrlinger
1bf1b93404 Revert "upgrade opentui to address disappearing content issues #3776, #3697"
This reverts commit 90fc3ddb02.
2025-11-04 18:38:44 +01:00
Dax Raad
bc6f4aed2b local web 2025-11-04 12:33:14 -05:00
David Hill
dbdbfb8543 Update button.css 2025-11-04 17:31:56 +00:00
David Hill
521803aaa3 Update theme.css 2025-11-04 17:31:51 +00:00
Aiden Cline
2af3f19397 respect: disable_paste_summary 2025-11-04 11:29:12 -06:00
Aiden Cline
9275665868 fix: /undo command 2025-11-04 10:59:34 -06:00
Christian Stewart
09bb819064 fix(tui): worker path resolution in dev mode (#3778)
Signed-off-by: Christian Stewart <christian@cjs.zip>
Co-authored-by: Sebastian Herrlinger <hasta84@gmail.com>
2025-11-04 17:38:11 +01:00
Err
6f0028644e fix: support scoped npm plugins (#3785)
Co-authored-by: Aiden Cline <aidenpcline@gmail.com>
2025-11-04 09:15:01 -06:00
Pranshu Raj
aec44abcf6 [FIX]: Refocus prompt after session delete (#3882) 2025-11-04 08:57:59 -06:00
frankdierolf
b41e573886 fix: correct history_next keybinding description (#3891) 2025-11-04 08:52:49 -06:00
arc-source-coder
737ddab300 tui: make /mcp an alias for /status (#3894) 2025-11-04 08:52:28 -06:00
Sebastian Herrlinger
90fc3ddb02 upgrade opentui to address disappearing content issues #3776, #3697 2025-11-04 14:57:15 +01:00
Adam
15d7eebb92 fix: lander specs 2025-11-04 06:15:12 -06:00
GitHub Action
33301c94df ignore: update download stats 2025-11-04 2025-11-04 12:05:02 +00:00
Aiden Cline
d341d26e37 update brew handling 2025-11-04 00:52:26 -06:00
opencode
d49b1b25d1 release: v1.0.20 2025-11-04 05:56:24 +00:00
Dax Raad
25eb100210 tui: fix tool permission lookup to use correct session ID 2025-11-04 00:50:12 -05:00
Dax Raad
9886353715 fix: persist -m model when switching agents
Add initial model from command line to fallback chain so it persists
when switching agents with tab, matching behavior of config model.

Resolves #3863
2025-11-03 23:51:52 -05:00
Aiden Cline
f501501791 fix: piping 2025-11-03 22:36:10 -06:00
Dax Raad
c103052f93 fix: handle parsePatch errors in TUI to prevent crashes
Wrap parsePatch calls in try-catch blocks to gracefully handle malformed
diffs that can occur when undoing after tool_use/tool_result errors or
cancelled prompts. Prevents TUI from crashing with 'Added line count did not
match for hunk' error.

Fixes #3700
2025-11-03 23:36:04 -05:00
Greg Pstrucha
68039d4c71 Fix file tagging in multi line inputs (#3865) 2025-11-03 23:22:38 -05:00
Aiden Cline
d3566d3b1a ignore: delete unused code 2025-11-04 04:01:22 +00:00
Stephen Collings
b275e18d28 fix: Provide OPENCODE & AGENT env vars (#3843)
Co-authored-by: Aiden Cline <aidenpcline@gmail.com>
2025-11-04 04:01:22 +00:00
Dax Raad
af9a1797b5 tui: use keybind helper for history navigation to respect custom keybindings 2025-11-04 04:01:22 +00:00
opencode
29b3e40ddb release: v1.0.19 2025-11-04 04:01:22 +00:00
Dax Raad
c49f5939a2 tui: fix model selection for models with nested paths
Users can now select models with multiple slashes like 'openrouter/google/gemini-2.5-pro'
in the TUI. Previously the TUI would only parse the first two parts of the model
path, showing 'Invalid model openrouter/google' for nested models.
2025-11-03 19:52:43 -05:00
kaanmertkoc
63862b1609 feat: implement stats command (#3832) 2025-11-03 18:41:30 -06:00
Mikhail Wahib
1cf1e88b52 fix: print the modified keybind for command_list (#3859) 2025-11-03 18:29:23 -06:00
Jay V
d06afd87e5 ignore: lander 2025-11-03 18:17:32 -05:00
Frank
9fb6e81007 wip: zen 2025-11-03 17:30:18 -05:00
Adi Yeroslav
3ac82227f1 fix: update logo (#3833) 2025-11-03 16:18:38 -06:00
Aiden Cline
c1f9249c84 ci: auto label web 2025-11-03 16:17:53 -06:00
Dax Raad
9bb66946db fix: correct dirs parameter type in file search 2025-11-03 17:10:31 -05:00
Dax Raad
adcdbbddc7 tui: remove duplicate copy message command entry 2025-11-03 17:10:20 -05:00
Dax Raad
662435c5bb ci: stuff 2025-11-03 22:01:30 +00:00
opencode
36c1a05eaa release: v1.0.18 2025-11-03 22:01:30 +00:00
Dax Raad
5708e3bf1e ci: tweak 2025-11-03 16:56:41 -05:00
Dax Raad
0da1ed3fc8 tui: add copy last assistant message to session menu 2025-11-03 16:47:18 -05:00
Adam
d5179c8b63 wip: desktop work 2025-11-03 15:42:39 -06:00
Adam
bd0a4f7bbe wip: desktop work 2025-11-03 15:42:10 -06:00
Adam
3d43214075 wip: desktop work 2025-11-03 15:42:10 -06:00
Dax Raad
178a14ce3e fix dirs query param 2025-11-03 16:35:55 -05:00
Timo Clasen
8e1010dc3f feat(TUI): don't show /share hint if sharing is disabled (#3835) 2025-11-03 15:30:55 -06:00
Adi Yeroslav
9c82f1f5e9 fix: session rename functionality (#3840) 2025-11-03 15:26:30 -06:00
Dmytro Tiapukhin
e5a651eef7 fix: better mcp sanitization (#3842)
Co-authored-by: Aiden Cline <aidenpcline@gmail.com>
2025-11-03 15:19:49 -06:00
Dax Raad
d26605aa56 tui: add support for Ctrl+_ key combination in keybind parser 2025-11-03 16:16:09 -05:00
opencode
5cc0d337b1 release: v1.0.17 2025-11-03 21:14:52 +00:00
Dax Raad
902763b47d web command 2025-11-03 16:10:23 -05:00
Aiden Cline
55d07a139c fix: mcp error (#3847) 2025-11-03 15:04:53 -06:00
Frank
05232ead93 zen: wip 2025-11-03 15:44:06 -05:00
Tyler Gannon
7652a96064 fix: wait for stdout to flush in generate command (#3821) 2025-11-03 14:05:48 -06:00
Frank
901aae09f7 zen: filter out alpha models 2025-11-03 15:04:59 -05:00
opencode
f95799f17c release: v1.0.16 2025-11-03 17:08:32 +00:00
Dax Raad
99a6c5e44d regen sdk 2025-11-03 11:55:19 -05:00
Dax Raad
07bb75f086 core: add optional dirs parameter to file search API
Allow users to exclude directories from file search results by setting dirs=false parameter in /find/file endpoint
2025-11-03 11:53:41 -05:00
Frank
66eb846e6f zen: wip 2025-11-03 11:30:53 -05:00
Adam
34f11c699e wip: desktop work 2025-11-03 08:29:13 -06:00
Adam
7a32fec008 wip: desktop work 2025-11-03 08:29:13 -06:00
James Alexander
37a6b5177e Add unit tests for util functions: iife, lazy, timeout (#3791) 2025-11-03 09:24:45 -05:00
Haris Gušić
573ffe186b fix(tui): Show correct keybind in session delete confirmation message (#3805) 2025-11-03 09:22:05 -05:00
Alex Knight
0f7ff3fcb1 Log share link immediately after session creation (#3811) 2025-11-03 09:21:43 -05:00
frankdierolf
2c3aa330b9 fix: correct clipboard image encoding and binary handling (#3817) 2025-11-03 09:21:13 -05:00
Pranshu Raj
47b2fb79dc docs: add session_child_cycle and session_child_cycle_reverse keybinds (#3807) 2025-11-03 09:20:35 -05:00
Sebastian Herrlinger
6deaf54bb3 use new opentui getTextRange method and Bun.stringWidth instead of value.length to mitigate issues like #3734 2025-11-03 15:15:55 +01:00
GitHub Action
d549cd3213 ignore: update download stats 2025-11-03 2025-11-03 12:04:38 +00:00
Ivan Starkov
93e52f7ecf feat: Enhance task display with [subagent type] (#3772) 2025-11-03 01:09:31 -06:00
Aiden Cline
88f12b0822 core: prevent TypeError when error handling encounters non-object errors
When API errors like token limit exceeded errors are passed as strings to error checking methods, the 'in' operator would throw a TypeError. This fix adds a type guard to check that the input is an object before attempting to access its properties, allowing proper error classification even when encountering unexpected error formats from providers.
2025-11-02 23:38:56 -06:00
Zeldris
54af7f9e18 docs: use brew official formula (#3733) 2025-11-02 21:00:23 -06:00
Dax Raad
be685e95a3 docs 2025-11-03 01:57:36 +00:00
Dax Raad
dc2ab75fca ci: eventualy consistency 2025-11-03 01:57:36 +00:00
opencode
f1324e886f release: v1.0.15 2025-11-03 01:57:36 +00:00
opencode
c47fde2ca4 release: v1.0.14 2025-11-03 00:12:08 +00:00
Dax Raad
f42e1c6375 tui: fix focus management and dialog interactions 2025-11-02 19:07:22 -05:00
Dax Raad
f68374ad22 DELETE GO BUBBLETEA CRAP HOORAY 2025-11-02 18:43:33 -05:00
opencode
5e86c9b791 release: v1.0.13 2025-11-02 23:31:25 +00:00
Dax Raad
94658c31c5 add back child session cycle 2025-11-02 18:26:38 -05:00
Dax Raad
9fd672a1cb undo 2025-11-02 16:31:32 -05:00
Dax Raad
10523c4372 move dialog select keybind to input 2025-11-02 15:47:04 -05:00
Dax Raad
d1cd7d0344 ci: centralize Bun version to package.json to ensure consistent builds across CI and local development 2025-11-02 15:42:15 -05:00
Dax Raad
06ac1be226 upgrade to bun 1.3.1 2025-11-02 14:00:50 -05:00
Dax Raad
05489bc843 tui: fix file path handling when pasting images with spaces in filename
- Fixes issue where files with spaces in their names couldn't be pasted as images
- Prevents default paste behavior to avoid conflicts with image insertion
- Improves error handling for file reading operations
2025-11-02 13:45:44 -05:00
Dax Raad
3f02eecf22 tui: add /timeline command to quickly navigate to specific messages in session history 2025-11-02 18:27:42 +00:00
opencode
f5ca78ed7b release: v1.0.12 2025-11-02 18:27:42 +00:00
Dax Raad
894cbaa51e fix duplicate plugin subscriptions 2025-11-02 13:22:58 -05:00
John Eismeier
8b70b89fde fix: typos (#3757)
Signed-off-by: John E <jeis4wpi@outlook.com>
2025-11-02 09:56:40 -06:00
Aditya Mathur
f9dbc586dc chore: update hono-openapi to version 1.1.1 (#3738) 2025-11-02 09:21:55 -06:00
GitHub Action
ffeef63ca1 ignore: update download stats 2025-11-02 2025-11-02 12:04:05 +00:00
kcrommett
4da58294d9 add nightowl theme back after opentui release (#3732) 2025-11-02 04:29:14 -05:00
opencode
fa2e88f49b release: v1.0.11 2025-11-02 08:18:59 +00:00
Dax Raad
28e765ef0a fix dialog 2025-11-02 02:53:55 -05:00
Dax Raad
bfbcb5f200 tui: prevent default Enter key behavior when selecting dialog options to avoid conflicts 2025-11-02 01:19:30 -05:00
Aiden Cline
89492b3002 ci: fix regex 2025-11-01 20:23:10 -05:00
opencode-agent[bot]
2663415d47 github action: truncate PR titles to 256 chars to avoid GH api errors (#3727)
Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
Co-authored-by: rekram1-node <rekram1-node@users.noreply.github.com>
2025-11-01 20:09:35 -05:00
Aiden Cline
51be67cc14 ci: stop auto assigning 2025-11-01 19:57:09 -05:00
Sebastian Herrlinger
92a1943771 upgrade to opentui 0.1.32, activates kitty keyboard 2025-11-02 01:45:38 +01:00
opencode
1e15fc273a release: v1.0.10 2025-11-01 18:06:28 +00:00
Dax
104a895a71 Light mode (#3709) 2025-11-01 13:54:01 -04:00
Dax Raad
f98e730405 docs update 2025-11-01 13:23:03 -04:00
Dax Raad
b12bef05d3 docs: update keybinds documentation with current defaults and remove deprecated bindings 2025-11-01 12:32:22 -04:00
opencode
2f1d001cc5 release: v1.0.9 2025-11-01 16:22:49 +00:00
Dax Raad
65d0b3ed6d sync 2025-11-01 12:14:15 -04:00
Haris Gušić
22a34d7958 feat: tui: Port /exit command and all command aliases (#3665) 2025-11-01 12:13:10 -04:00
Aiden Cline
cb4401ec92 ignore: update contributing md 2025-11-01 11:08:07 -05:00
opencode
febf467b03 release: v1.0.8 2025-11-01 15:58:23 +00:00
Dax Raad
d55a2fd56c tui: change delete keybind to ctrl+d in session list dialog 2025-11-01 11:53:46 -04:00
Dax Raad
40f577e5e7 fix modified files being empty 2025-11-01 11:48:47 -04:00
Dax Raad
9e49870118 remember sidebar position 2025-11-01 11:40:33 -04:00
Daniel van Strien
fe38e3ab02 docs: add Hugging Face Inference Providers documentation (#3505)
Co-authored-by: célina <hanouticelina@gmail.com>
2025-11-01 10:33:17 -05:00
Haris Gušić
0170577743 feat: tui: Add --prompt option (#3668) 2025-11-01 11:18:31 -04:00
Giuseppe Rota
7de6ea5922 fix: fix typo in commit message guidelines (#3702) 2025-11-01 10:14:53 -05:00
Yuku Kotani
2fe7d13e69 Add formatter status display to TUI status dialog (#3701) 2025-11-01 11:14:39 -04:00
Dax Raad
1bc3c98ae7 ensure wl-copy is available 2025-11-01 11:10:39 -04:00
Haris Gušić
55787f2caa fix: tui: Handle Clipboard.copy errors properly (#3685) 2025-11-01 15:34:21 +01:00
Haris Gušić
7df61a74a0 fix: tui: add toast for /share url copy (#3686) 2025-11-01 08:06:56 -05:00
GitHub Action
4f23110880 ignore: update download stats 2025-11-01 2025-11-01 12:04:18 +00:00
Aiden Cline
041353f4ff make /init a default slash command on server side (#3677) 2025-11-01 01:14:09 -05:00
Haris Gušić
c72f8b17c6 fix: tui: Fix /editor command (#3663) 2025-11-01 00:16:06 +00:00
opencode
eb304f4115 release: v1.0.7 2025-11-01 00:16:05 +00:00
Dax Raad
5565f14ef5 tab to accept autocomplete 2025-10-31 20:10:01 -04:00
Dax Raad
10a4455c6f tui: fix prompt text aggregation to exclude synthetic content 2025-10-31 20:01:27 -04:00
Dax Raad
5ded6d6ad7 docs: sync 2025-10-31 23:58:57 +00:00
opencode
849a38c30c release: v1.0.6 2025-10-31 23:58:57 +00:00
Dax Raad
68050ab802 tui: prevent clipboard operations from throwing errors on process exit 2025-10-31 19:54:15 -04:00
opencode
91d01fd4cc release: v1.0.5 2025-10-31 23:51:36 +00:00
Dax Raad
9beb0f8512 tui: improve keyboard navigation and MCP server status display 2025-10-31 19:47:08 -04:00
Dax Raad
d4cb47eadc tui: add keyboard shortcuts to cycle through recently used models
Users can now press F2 to cycle forward and Shift+F2 to cycle backward through their recently used models, making it faster to switch between commonly used AI models without opening the model selection dialog.
2025-10-31 19:42:41 -04:00
Dax Raad
261ff416a9 sync 2025-10-31 23:05:11 +00:00
opencode
d0a70cb217 release: v1.0.4 2025-10-31 23:05:10 +00:00
Aiden Cline
20fc56d020 Revert "opentui: fix: Make worker.ts path independent from cwd (#3600)"
This reverts commit d473d4ffc8.
2025-10-31 17:57:56 -05:00
opencode
a57ae3ec93 release: v1.0.3 2025-10-31 22:52:57 +00:00
Dax Raad
30f9fa12d9 tui: add session rename functionality with /rename command
- Add /rename command to autocomplete when a session is active
- Add rename dialog component for changing session names
- Add rename option to session list dialog with 'r' keybind
- Add session rename command to command registry
2025-10-31 18:44:33 -04:00
Haris Gušić
d473d4ffc8 opentui: fix: Make worker.ts path independent from cwd (#3600) 2025-10-31 17:37:31 -05:00
Haris Gušić
af50596529 fix: grep failing when pattern started with a dash 2025-10-31 17:20:22 -05:00
Dax Raad
3823d8d50e tui: simplify theme selection API by renaming setSelectedTheme to set 2025-10-31 18:11:36 -04:00
Dax Raad
7a926b32ce respect theme in config 2025-10-31 18:04:38 -04:00
Haris Gušić
a5ede68241 fix: Remove conflicting "-h" aliases in TUI spawn and thread commands (#3651) 2025-10-31 16:59:59 -05:00
Aiden Cline
60dc38050d fix: unsupported option 2025-10-31 16:53:08 -05:00
Dax Raad
31d0caee38 tui: add /editor command to autocomplete for opening external editor 2025-10-31 17:47:08 -04:00
Dax Raad
2a7ab45605 add /theme 2025-10-31 17:44:41 -04:00
Aiden Cline
019054dd1e Revert "fix: ensure flags & docs match (#3638)"
This reverts commit a018a15f32.
2025-10-31 16:43:29 -05:00
opencode-agent[bot]
a018a15f32 fix: ensure flags & docs match (#3638)
Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
Co-authored-by: rekram1-node <rekram1-node@users.noreply.github.com>
2025-10-31 16:33:46 -05:00
Nathan Thomas
e630d680dd feat: allow ctrl+d to exit the app (#3636) 2025-10-31 16:27:41 -05:00
Haris Gušić
9e392f25a6 feat: Improve error boundary add button to easily create issue in github (#3639) 2025-10-31 16:20:32 -05:00
Aiden Cline
2cc4e6ad7c ci: change model 2025-10-31 16:06:22 -05:00
Adam
70d8d1ab1e wip: desktop work 2025-10-31 15:57:21 -05:00
Adam
342aa27e03 wip: desktop work 2025-10-31 15:37:50 -05:00
Adam
e1aed0cd01 wip: desktop work 2025-10-31 15:37:50 -05:00
opencode
c8ea2c5ce0 release: v1.0.2 2025-10-31 20:33:50 +00:00
Dax Raad
5e8309a353 tui: update hello command with test content 2025-10-31 16:21:30 -04:00
Dax Raad
aae0ce9921 tui: improve autocomplete component styling and update test command 2025-10-31 16:21:30 -04:00
Dax Raad
81b94d84dc ignore 2025-10-31 20:17:40 +00:00
opencode
ceab70f8d9 release: v1.0.1 2025-10-31 20:17:39 +00:00
Dax Raad
afe8cecc2b tui: add persistent key-value storage for user preferences
- Add KVProvider context for storing user preferences like theme and warnings
- Update theme context to use KV storage instead of sync config
- Move openrouter warning to persistent KV storage
- Refactor theme selection to persist user choice across sessions
2025-10-31 16:13:02 -04:00
Aiden Cline
4a292bf977 ci: auto assign 2025-10-31 14:58:18 -05:00
Aiden Cline
e249b41513 ci: autolabel action 2025-10-31 14:55:33 -05:00
Dax Raad
9021dd60a1 tui: add /session command to list available sessions 2025-10-31 15:41:36 -04:00
opencode
b9a39b816c release: v1.0.0 2025-10-31 19:28:07 +00:00
Dax Raad
1eeba770b1 docs: add v1.0 upgrade guide with UX changes documentation 2025-10-31 15:15:52 -04:00
Frank
6cff306be1 wip: zen 2025-10-31 15:09:48 -04:00
Dax
96bdeb3c7b OpenTUI is here (#2685) 2025-10-31 15:07:36 -04:00
opencode
81c617770d release: v0.15.31 2025-10-31 18:56:26 +00:00
Frank
021334509e sync 2025-10-31 14:43:51 -04:00
Frank
4bde3f7b15 zen: billing page layout 2025-10-31 14:43:51 -04:00
Haris Gušić
4355027408 fix: Missing @opencode-ai/plugin causes crash (#3615) 2025-10-31 13:41:04 -05:00
David Hill
b022cf0ed6 Merge branch 'dev' of https://github.com/sst/opencode into dev 2025-10-31 17:02:53 +00:00
David Hill
a529b0324d wip: Tweaking select styles
This ghost style is placeholder for now until we style this properly with an icon and all the states.
2025-10-31 17:02:44 +00:00
David Hill
16f5e16395 wip: Tweaking button styles 2025-10-31 17:02:12 +00:00
Adam
76e080b2cb wip: desktop work 2025-10-31 12:00:44 -05:00
Adam
ffc889b99e wip: desktop work 2025-10-31 12:00:44 -05:00
Steven Martin
36b48a44ac tweak - normalise unix-like identifiers to support git bash for windows (#2100)
Co-authored-by: Steven Martin <smartin@clearcom.com>
2025-10-31 11:41:44 -05:00
David Hill
5379abe330 Merge branch 'dev' of https://github.com/sst/opencode into dev 2025-10-31 16:03:36 +00:00
David Hill
a5bcb76bbf Added border as shadow and updated button 2025-10-31 16:03:33 +00:00
Aiden Cline
b628c580c2 update types 2025-10-31 10:49:52 -05:00
Aiden Cline
46d675b980 tweak: filter out deprecated models 2025-10-31 10:48:51 -05:00
Adam
a8bf1ad40f wip: desktop work 2025-10-31 10:08:24 -05:00
Adam
0ac943de90 wip: desktop work 2025-10-31 09:45:57 -05:00
Adam
485135cf5c wip: desktop work 2025-10-31 07:30:02 -05:00
Adam
543eee78a6 wip: desktop work 2025-10-31 07:24:47 -05:00
GitHub Action
dafb63cfb3 ignore: update download stats 2025-10-31 2025-10-31 12:04:46 +00:00
opencode
504a599473 release: v0.15.30 2025-10-31 06:12:16 +00:00
Dax Raad
750b9f80a5 sync 2025-10-31 02:00:11 -04:00
Aiden Cline
dfdd009750 fix: bash permission case 2025-10-31 00:52:46 -05:00
Haris Gušić
c1ada302f9 fix: Opencode hangs after exit (#3481)
Co-authored-by: Aiden Cline <aidenpcline@gmail.com>
2025-10-30 23:57:58 -05:00
Filip
51e4c9fc4c add optional headers field to model config (#3546) 2025-10-30 23:35:26 -05:00
Jay V
43e272e6c4 ignore: refactor header context menu to use CSS styling and router navigation 2025-10-30 20:24:29 -04:00
David Hill
2f9f189f39 Merge branch 'dev' of https://github.com/sst/opencode into dev 2025-10-30 22:53:00 +00:00
David Hill
f3c70f4ea8 Asset updates 2025-10-30 22:52:56 +00:00
David Hill
5d4441cd2b Fix download zip 2025-10-30 22:41:32 +00:00
David Hill
bf5f34ace7 Brand Assets Zip 2025-10-30 22:38:12 +00:00
David Hill
9589657d21 Configure png and svg downloads 2025-10-30 22:25:07 +00:00
David Hill
37baed99c1 Brand page 2025-10-30 22:13:48 +00:00
Ritoban Dutta
a3ba740de4 fix: resolve hanging permission prompts in headless mode (#3522)
Co-authored-by: Aiden Cline <aidenpcline@gmail.com>
2025-10-30 15:37:41 -05:00
Adam
dc96664578 chore: sanitize tool parts locally 2025-10-30 14:57:38 -05:00
Jay V
4dafc532a8 ignore: update project stats to reflect current growth 2025-10-30 15:47:41 -04:00
Adam
984fe4b769 wip: desktop work 2025-10-30 14:46:38 -05:00
Adam
48f50cf55e wip: desktop work 2025-10-30 14:41:15 -05:00
Frank
ba13f8da08 wip: fix 2025-10-30 15:15:46 -04:00
Frank
1a8b494055 wip: zen 2025-10-30 15:10:29 -04:00
Frank
4f02d7d424 zen: allow byok requests w/o a balance 2025-10-30 15:10:29 -04:00
Adam
4cebd69bf0 wip: desktop work 2025-10-30 13:54:52 -05:00
Adam
dc6e54503c wip: desktop work 2025-10-30 13:49:29 -05:00
David Hill
f18847d739 Adding links to legal 2025-10-30 17:37:30 +00:00
Adam
2a0b67d84f fix: lander space 2025-10-30 12:32:25 -05:00
Adam
89eac737a5 wip: desktop work 2025-10-30 12:30:45 -05:00
Brandon
c68607fb2b feat: Adds session id to Agent context metadata (#3559)
Co-authored-by: Brandon Wisnicki <bwisnicki@palantir.com>
2025-10-30 12:15:21 -05:00
Adam
e944ff0286 wip: desktop work 2025-10-30 12:13:02 -05:00
Adam
ee7612a31c wip: desktop work 2025-10-30 12:02:51 -05:00
Adam
582ed7c363 wip: desktop work 2025-10-30 12:02:50 -05:00
Adam
dce287a42d wip: desktop work 2025-10-30 12:02:50 -05:00
Adam
19974daa67 wip: desktop work 2025-10-30 12:02:50 -05:00
Adam
dcf865a889 wip: desktop work 2025-10-30 12:02:50 -05:00
Adam
3b20935959 wip: desktop work 2025-10-30 12:02:50 -05:00
Adam
30f4c2cf4c wip: desktop work 2025-10-30 12:02:49 -05:00
Aiden Cline
3541fdcb20 tweak: adjust deno lsp (#3581) 2025-10-30 11:59:54 -05:00
David Hill
15de97c10f Change position 2025-10-30 16:55:23 +00:00
Jay V
ee3fd3f7be ignore:lander 2025-10-30 12:40:07 -04:00
Haris Gušić
dc87659791 tweak: move zod validation for tools to ensure it always runs (#3565) 2025-10-30 11:31:44 -05:00
Andrew Pashynnyk
149f5eaa2e fix: preserve metadata from MCP tool results in tool.execute.after hook (#3573) 2025-10-30 11:10:42 -05:00
Aiden Cline
42e0b47a7d fix: better frontmatter errors 2025-10-30 10:56:40 -05:00
oribi
2d5df3ad76 fix: agent model selection priority issue (#3572) 2025-10-30 09:32:39 -05:00
David Hill
f202fa0d89 Theme aware svgs to be copied 2025-10-30 13:01:48 +00:00
David Hill
0abffdb8f8 Icon size update 2025-10-30 12:46:34 +00:00
David Hill
e533d48b51 New assets 2025-10-30 12:36:41 +00:00
David Hill
439372704d Close content menu with escape 2025-10-30 12:19:26 +00:00
David Hill
d7277fd305 Merge branch 'dev' of https://github.com/sst/opencode into dev 2025-10-30 12:16:15 +00:00
GitHub Action
5ae73637d3 ignore: update download stats 2025-10-30 2025-10-30 12:04:36 +00:00
David Hill
bf0cbf2bfa Adding polish 2025-10-30 11:37:00 +00:00
opencode
4b3a841dd9 release: v0.15.29 2025-10-30 06:49:34 +00:00
Aiden Cline
aca32eaa1c fix: tui not showing some errors 2025-10-30 01:41:28 -05:00
Matt Gillard
3ae75d7031 add optional timeout field to mcp config to allow users to use responding servers (#3558)
Co-authored-by: Matt Gillard <matt-github@gillard.biz>
Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
Co-authored-by: rekram1-node <rekram1-node@users.noreply.github.com>
2025-10-30 01:25:24 -05:00
Khang Ha (Kelvin)
4b5e447961 Fix "bufio.Scanner token too long" error by replacing Scanner with Reader in SSE (#3531) 2025-10-30 01:04:06 -05:00
Aiden Cline
7a2b8eae76 tweak: catch err 2025-10-30 00:29:30 -05:00
ElecTwix
d983b9485d fix: add doom loop detection (#3445)
Co-authored-by: Aiden Cline <aidenpcline@gmail.com>
2025-10-30 00:13:18 -05:00
GitHub Action
14836de276 ignore: update download stats 2025-10-30 2025-10-30 02:28:13 +00:00
David Hill
e265efec09 Add right click menu to logo 2025-10-30 00:40:24 +00:00
David Hill
5ae00ba567 Brand page 2025-10-30 00:22:49 +00:00
Jay V
a0f032c9b9 ignore: fix email formatting to ensure proper line breaks between message and signature 2025-10-29 19:19:28 -04:00
Jay V
e6132fc6a4 docs: enterprise 2025-10-29 19:07:43 -04:00
Frank
950b608c4d zen: show browser default time 2025-10-29 17:14:28 -04:00
Adam
3210df7428 wip: desktop work 2025-10-29 16:04:34 -05:00
Adam
cdeb82e9ca wip: desktop work 2025-10-29 16:04:34 -05:00
rienkim
a9cae7b335 feat: add positional argument support to slash commands (#3456)
Co-authored-by: Aiden Cline <aidenpcline@gmail.com>
2025-10-29 14:54:24 -05:00
Frank
972c0893dd zen: fix unified endpoint for codex 2025-10-29 15:06:37 -04:00
opencode
e5d89ca567 release: v0.15.28 2025-10-29 19:00:56 +00:00
Aiden Cline
4ae70d4b0d fix: parcel watcher issue (#3544) 2025-10-29 13:52:38 -05:00
opencode
935cd7481b release: v0.15.27 2025-10-29 18:41:24 +00:00
Dax Raad
5553efea5e only generate user message summary if no diffs 2025-10-29 14:28:43 -04:00
Adam
0ff73ed8a6 wip: desktop work 2025-10-29 16:59:45 +00:00
opencode
5e792d7ac5 release: v0.15.26 2025-10-29 16:59:45 +00:00
David Hill
4a77e94e3c Merge branch 'dev' of https://github.com/sst/opencode into dev 2025-10-29 16:16:56 +00:00
David Hill
4c563ea405 Enron update 2025-10-29 16:16:48 +00:00
Aiden Cline
5875257462 ignore: add label 2025-10-29 11:08:46 -05:00
David Hill
9701891e94 testimonial and other polish 2025-10-29 16:02:25 +00:00
opencode
a2ab37c1b6 release: v0.15.25 2025-10-29 16:01:53 +00:00
Dax Raad
4d6e2d8efc autoupgrade latest major only 2025-10-29 11:53:25 -04:00
Aiden Cline
4407d5d96f fix: ensure tool inputs are zod validated 2025-10-29 10:46:57 -05:00
Adam
244945c0e7 fix: desktop error 2025-10-29 10:43:34 -05:00
opencode
c652b2b4e8 release: v0.15.24 2025-10-29 15:38:55 +00:00
David Hill
aabeeb1431 Adding polish 2025-10-29 15:34:45 +00:00
David Hill
0fbedc5e19 Fix form submission 2025-10-29 15:34:39 +00:00
Dax Raad
12782fff14 remove log 2025-10-29 11:27:51 -04:00
Dax Raad
ca463a2346 session diff only include modified files 2025-10-29 11:26:21 -04:00
Aiden Cline
7265cdf817 ignore: rm 2025-10-29 10:19:02 -05:00
David Hill
7baa751351 First pass at adding an enterprise page 2025-10-29 15:16:17 +00:00
Adam
5b86fa9109 wip: desktop work 2025-10-29 07:32:01 -05:00
Adam
aa7e008fe1 wip: desktop work 2025-10-29 07:32:00 -05:00
GitHub Action
792664071c ignore: update download stats 2025-10-29 2025-10-29 12:04:57 +00:00
Aiden Cline
a0541ba57a zen: fix models endpoint to be openai compatible 2025-10-28 22:48:57 -05:00
Aiden Cline
4994bf1b46 ignore: rename type 2025-10-28 22:39:57 -05:00
Tyler Gannon
1e24514d61 add OpenAPI annotations to tui.ts control endpoints (#3519) 2025-10-28 22:39:22 -05:00
opencode
4b1c6300a0 release: v0.15.23 2025-10-29 01:35:27 +00:00
Dax Raad
db3fb9d316 ci: stuff 2025-10-28 21:28:44 -04:00
Dax Raad
cd79676b42 sync 2025-10-28 20:35:18 -04:00
Dax Raad
09e7e0ab70 tag majors 2025-10-28 20:28:30 -04:00
Kevin King
0e60f66604 ignore: python sdk (#2779)
Co-authored-by: Aiden Cline <aidenpcline@gmail.com>
2025-10-28 18:32:45 -05:00
Aiden Cline
fc8db6cdf9 fix: ensure timeout param passed to bash tool is positive 2025-10-28 17:32:39 -05:00
kcrommett
5cc37c4ea0 mcp: fix status() to not overwrite connected with failed (#3514) 2025-10-28 16:16:03 -05:00
Adam
46ad456718 wip: desktop work 2025-10-28 15:39:41 -05:00
Haris Gušić
832ffd2303 fix: Use process.stdout.write instead of console.log (#3508) 2025-10-28 15:38:08 -05:00
GitHub Action
b261430880 chore: format code 2025-10-28 20:29:47 +00:00
Adam
545f345848 wip: desktop work 2025-10-28 15:29:16 -05:00
Adam
77ae0b527e wip: desktop work 2025-10-28 15:29:16 -05:00
Adam
c1278109c9 wip: desktop work 2025-10-28 15:29:16 -05:00
Adam
a7a88d01ef wip: desktop work 2025-10-28 15:29:16 -05:00
Adam
4e0ab6b634 wip: desktop work 2025-10-28 15:29:16 -05:00
Adam
d36485b7af wip: desktop work 2025-10-28 15:29:15 -05:00
Adam
1da24f6adb wip: desktop work 2025-10-28 15:29:15 -05:00
Frank
e29dd27632 zen: provider affinity 2025-10-28 15:55:03 -04:00
Aiden Cline
37380e1f94 add --title flag to opencode run (#3507) 2025-10-28 13:32:36 -05:00
Dax Raad
1309ca7a81 ignore 2025-10-28 14:13:47 -04:00
Dax Raad
c1515316f5 core: fix additions and deletions counting in edit tool filediff 2025-10-28 14:08:10 -04:00
Danilo Favato
b66e7b6fce tweak: add experimental chatMaxRetries to config (#2116)
Co-authored-by: GitHub Action <action@github.com>
Co-authored-by: Aiden Cline <aidenpcline@gmail.com>
2025-10-28 12:09:41 -05:00
oribi
eb398f1951 add OPENCODE_CONFIG_DIR to allow loading a custom config directory (#3504)
Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
Co-authored-by: rekram1-node <rekram1-node@users.noreply.github.com>
2025-10-28 11:50:09 -05:00
Aiden Cline
643c22d21f add catch for mcp tool execution 2025-10-28 10:23:04 -05:00
Aiden Cline
74acd08ead add catch for mcp tool execution 2025-10-28 10:23:03 -05:00
opencode
49ea5aa2ad release: v0.15.20 2025-10-28 15:12:37 +00:00
Aiden Cline
ee1af0fe80 fix: blank version issue 2025-10-28 10:03:53 -05:00
GitHub Action
dfebf40471 ignore: update download stats 2025-10-28 2025-10-28 12:04:31 +00:00
opencode
6af6a1295f release: v0.15.19 2025-10-28 08:12:32 +00:00
Dax Raad
22821744ef feat: add OPENCODE_FAKE_VCS flag for VCS testing and update todo tracking instructions 2025-10-28 02:54:29 -04:00
Aiden Cline
872c9467b2 chore: rm unused import 2025-10-28 00:43:29 -05:00
Dax Raad
d8249f32a8 do not set temperature for claude models 2025-10-28 01:14:25 -04:00
Aiden Cline
982954cc1b feat (acp): mcp server support, file diffs, some default slash commands (/init, /compact), show todos properly (#3490)
The mcp server support does not mean acp didn't allow u to use mcp servers previously, it means that now you can connect new servers via ACP instead of relying on the opencode defined ones
2025-10-28 00:08:30 -05:00
Frank
4caa458232 acp: fix type error 2025-10-27 21:40:08 -04:00
Frank
6fe8e3973c zen: support 1M claude context 2025-10-27 21:36:10 -04:00
Frank
7816901713 wip: zen doc 2025-10-27 21:25:56 -04:00
Frank
71abca9571 wip: zen 2025-10-27 19:26:28 -04:00
kcrommett
7216a8c86d fix: editor paste functionality for text attachments (#3489) 2025-10-27 17:51:33 -05:00
Jay V
e3e16e58c5 docs: edit 2025-10-27 18:16:48 -04:00
Dax Raad
a2951a2702 Remove typecheck script from desktop package 2025-10-27 18:03:32 -04:00
Jay V
55453dc606 Add missing dependencies for desktop package 2025-10-27 17:49:31 -04:00
Jay V
198d7f7e5f Merge branch 'doc-acp' into dev 2025-10-27 17:49:24 -04:00
Jay V
e3e9fd7aa8 docs: edit 2025-10-27 17:48:17 -04:00
Aiden Cline
3c56dbcf58 chore: rm comment 2025-10-27 16:15:13 -05:00
Aiden Cline
ee07ed2dc4 chore: delete unused file 2025-10-27 15:44:12 -05:00
Adam
485e4520e7 wip: desktop work 2025-10-27 15:37:07 -05:00
Adam
fc115ea367 wip: desktop work 2025-10-27 15:37:07 -05:00
Adam
d03b79e61e wip: desktop work 2025-10-27 15:37:06 -05:00
Adam
0acae8211a wip: desktop work 2025-10-27 15:37:06 -05:00
Aiden Cline
0af4505756 fix: litellm error tool= param must be specified 2025-10-27 14:03:42 -05:00
Aurelien Ribon
a606e1d2ec fix: dont set reasoning effort to medium for gpt-5-pro (#3474) 2025-10-27 10:50:57 -05:00
Aiden Cline
0e65700183 update sdk 2025-10-27 10:47:04 -05:00
Aiden Cline
e6301ca5d5 tweak: rename event 2025-10-27 10:42:47 -05:00
Bernat Pericàs
b562863fcc feat: add session.started event that triggers when a new session is created (#3413) 2025-10-27 07:18:23 -05:00
GitHub Action
db85f01eff ignore: update download stats 2025-10-27 2025-10-27 12:04:50 +00:00
Aiden Cline
1a6fd018f6 Revert "fix: Explicitly exit CLI to prevent hanging subprocesses (#3083)"
This reverts commit a9624c0fff.
2025-10-27 01:30:13 -05:00
Aiden Cline
fdb5bae3c6 docs: acp 2025-10-27 00:56:00 -05:00
Haris Gušić
a9624c0fff fix: Explicitly exit CLI to prevent hanging subprocesses (#3083)
Co-authored-by: Aiden Cline <aidenpcline@gmail.com>
2025-10-27 00:03:10 -05:00
Aiden Cline
316d4c9197 wip 2025-10-26 23:49:56 -05:00
Denys Rybalka
5e886c35d5 chore: use stable URLs in PKGBUILD (#3448) 2025-10-26 19:50:45 -05:00
Aiden Cline
5162268f9d docs: update agent frontmatter permission example 2025-10-26 15:04:48 -05:00
Jérôme Benoit
0eb899a950 chore: cleanup versioned zod imports (#3460)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
Co-authored-by: rekram1-node <rekram1-node@users.noreply.github.com>
2025-10-26 14:50:41 -05:00
Dan McGuirk
3241f6b8bb docs: fix typos (#3454) 2025-10-26 14:37:25 -05:00
GitHub Action
2c792f17e6 ignore: update download stats 2025-10-26 2025-10-26 12:04:22 +00:00
Joscha Götzer
7d0c6860cd fix: make build script work cross-platform (#3430)
Co-authored-by: JosXa <info@josxa.dev>
2025-10-26 01:40:17 -05:00
Aiden Cline
c70e393c81 Remove claude-haiku-4.5 from default priority for GitHub Copilot session title generation 2025-10-26 01:21:34 -05:00
opencode
20963c4186 release: v0.15.18 2025-10-26 03:49:21 +00:00
Aiden Cline
0a778a2789 make title gen more reliable 2025-10-25 22:14:29 -05:00
Aiden Cline
42c1e61bf4 fix: $ invocation not .quiet() (#3449) 2025-10-25 16:27:09 -05:00
Dax Raad
795b845782 update anthropic prompt 2025-10-25 17:26:27 -04:00
Mohammad Alhashemi
2e434a459a feat: add noReply parameter (#3433)
Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
Co-authored-by: rekram1-node <rekram1-node@users.noreply.github.com>
2025-10-25 14:56:54 -05:00
Paulo Edgar Castro
ae62bc8b1f fix: timeout param that allows user to disable provider timeout (#3443) 2025-10-25 12:08:27 -05:00
GitHub Action
187a5fe301 ignore: update download stats 2025-10-25 2025-10-25 12:04:18 +00:00
opencode
fc2afdc92f release: v0.15.17 2025-10-25 06:45:23 +00:00
Aiden Cline
fe5e7cfd1b ignore: rm change 2025-10-25 01:35:43 -05:00
Aiden Cline
98d51dde6a acp: slash commands, agents, permissions, @ references, code cleanup (#3403)
Co-authored-by: yetone <yetoneful@gmail.com>
2025-10-25 01:32:46 -05:00
Aiden Cline
5fec5ff424 fix: bedrock reasoning 2025-10-24 17:35:08 -05:00
Adam
fea6a357bc wip: desktop work 2025-10-24 16:04:44 -05:00
Adam
6b82153263 wip: desktop work 2025-10-24 15:51:31 -05:00
Adam
fa8e714d69 wip: desktop work 2025-10-24 15:43:47 -05:00
Adam
90515bc8c3 wip: desktop work 2025-10-24 15:02:31 -05:00
Adam
e34042e17a wip: accordion css not going to keep me down 2025-10-24 15:01:28 -05:00
Dax Raad
6ff0ce8bc5 ignore: improve session timeline debugging and message display functionality 2025-10-24 15:45:37 -04:00
Aiden Cline
e88b659545 make plan agent whitelist more conservative (#3424) 2025-10-24 14:40:36 -05:00
Dax Raad
74048ece2d ignore: fix new session message loading with retry logic to handle server processing delays 2025-10-24 15:35:53 -04:00
Dax Raad
6646f7264a ignore: highlight active session in sidebar to improve visual feedback 2025-10-24 15:27:20 -04:00
Dax Raad
18e549a474 ignore: fix session activation after creation to ensure proper state management 2025-10-24 15:24:17 -04:00
Adam
82249754e7 fix: pierre dep 2025-10-24 13:51:24 -05:00
Aiden Cline
5a0228897b ignore: reword 2025-10-24 13:46:47 -05:00
Adam
e2920c06a3 wip: desktop work 2025-10-24 13:01:22 -05:00
Dax Raad
4da3aa2eb2 add missing dep 2025-10-24 13:43:33 -04:00
Adam
efe7f01f41 wip: desktop work 2025-10-24 12:38:00 -05:00
Adam
9ae3d74adc wip: desktop work 2025-10-24 12:32:02 -05:00
Adam
477b6c584d wip: desktop work 2025-10-24 12:16:33 -05:00
Adam
86447b5764 wip: desktop work 2025-10-24 12:16:33 -05:00
Adam
fe8f6d7a3e wip: desktop work 2025-10-24 12:16:33 -05:00
Adam
59b5f53509 wip: desktop work 2025-10-24 12:16:32 -05:00
Adam
3eb2db98ed wip: desktop work 2025-10-24 12:16:32 -05:00
Adam
35dec0649d wip: desktop work 2025-10-24 12:16:32 -05:00
Adam
78a7f79143 wip: ui package demo page 2025-10-24 12:16:32 -05:00
Aiden Cline
707ed72381 adjust edit tool multiple matches error wording (#3418) 2025-10-24 12:14:49 -05:00
Dax Raad
21880e199d mroe summary tweaks 2025-10-24 12:37:23 -04:00
Dax Raad
736a85d427 track finish reason 2025-10-24 12:23:24 -04:00
Dax Raad
fb40dc6b20 generate user message title and body 2025-10-24 11:50:42 -04:00
Hieu Nguyen
483fcdaddb feat: support lua lsp (#3402) 2025-10-24 10:37:11 -05:00
Andrew Pashynnyk
883b71ac36 fix: respect local config for autoupdate settings (#3408)
Co-authored-by: Claude <noreply@anthropic.com>
2025-10-24 09:50:09 -05:00
Dax Raad
3e574c71cb potentially fix fetch failed timeout errors 2025-10-24 09:46:28 -04:00
Dax Raad
4cab66da6c test cleanup 2025-10-24 09:29:38 -04:00
Dax Raad
7003efd2da fix summary 2025-10-24 09:24:58 -04:00
Dax Raad
06fe87b361 fix failing migration 2025-10-24 09:20:15 -04:00
GitHub Action
944fda45e6 ignore: update download stats 2025-10-24 2025-10-24 12:05:02 +00:00
opencode
343471b98d release: v0.15.16 2025-10-24 04:52:27 +00:00
Dax Raad
56528493dc codex does not have reasoning effort set 2025-10-24 00:29:34 -04:00
opencode
e66156c86e release: v0.15.15 2025-10-24 03:51:17 +00:00
Dax Raad
8b9b8ca15b update codex prompt 2025-10-23 23:36:32 -04:00
Haris Gušić
50cc641288 fix: Opencode fails with ENOENT posix_spawn '/usr/bin/rg' (#3396) 2025-10-23 18:05:01 -05:00
Bernat Pericàs
4c90bf3e07 refactor: whitelist some safe bash tools in Plan agent (#3288)
Co-authored-by: Aiden Cline <aidenpcline@gmail.com>
2025-10-23 17:11:08 -05:00
Aiden Cline
4216c1c2a9 adjust changelog generation 2025-10-23 16:16:11 -05:00
Dax Raad
4bd7646ccb regen sdk 2025-10-23 16:33:00 -04:00
Dax Raad
cee7106054 session summaries in data 2025-10-23 16:28:20 -04:00
Dax Raad
f4dfae0bb0 ignore: diff stuff 2025-10-23 16:04:58 -04:00
Aiden Cline
9b5fe10df6 add flag wildcard parsing support for bash tool (#3390) 2025-10-23 13:35:09 -05:00
Aiden Cline
b5f336c0ea test: rm flaky test 2025-10-23 12:52:08 -05:00
Aiden Cline
913c3ae799 tweak: split out title before newline 2025-10-23 12:44:43 -05:00
Thierry Delafontaine
a68111ca77 fix: move zod-to-json-schema to dependencies (#3387) 2025-10-23 12:16:03 -05:00
Aiden Cline
5f8a3a574e docs: fix numbers 2025-10-23 11:53:21 -05:00
Aiden Cline
d69e8e5528 docs: tweak google vertex 2025-10-23 11:49:53 -05:00
Yuku Kotani
e5df43f9b7 docs: Add Google Vertex AI provider documentation (#3349) 2025-10-23 11:44:06 -05:00
Andrew Pashynnyk
3c7b229d8b fix: allow tool.execute.after hook to modify MCP tool output (#3381) 2025-10-23 10:38:55 -05:00
Mani Sundararajan
9ab4414aef docs: rm winget as a recommended installation method under windows (#3382)
Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
Co-authored-by: rekram1-node <rekram1-node@users.noreply.github.com>
2025-10-23 09:25:42 -05:00
GitHub Action
c2cf6fb904 ignore: update download stats 2025-10-23 2025-10-23 12:04:55 +00:00
opencode
5e69bdbef4 release: v0.15.14 2025-10-23 05:55:28 +00:00
Yesh Yendamuri
f81e28c673 feat: add model management to ACP sessions (#3358) 2025-10-23 00:43:28 -05:00
Aiden Cline
61899d4fa7 regen sdk 2025-10-22 23:00:03 -05:00
Aiden Cline
7c7ebb0a9d feat: retry parts (#3369) 2025-10-22 18:31:36 -05:00
Dax Raad
9def7cff2d summary tweaks 2025-10-22 19:03:08 -04:00
geril07
c2ef930d2a add option to allow agent switches to not change model (#3356) 2025-10-22 17:51:46 -05:00
Adam
3c3d2f5a6e wip: desktop work 2025-10-22 17:51:16 -05:00
Dax Raad
f435049d36 sync 2025-10-22 18:49:57 -04:00
Dax Raad
1f80de2fa6 core: add experimental turn summarization to compact conversation history 2025-10-22 18:33:46 -04:00
Adam
f194a784b0 wip: desktop work 2025-10-22 17:33:08 -05:00
Adam
89b703c387 wip: desktop work 2025-10-22 17:31:49 -05:00
Aiden Cline
eff12cb484 vscode: eslint fix 2025-10-22 17:17:47 -05:00
Aiden Cline
593e89b4f4 vscode: fix script 2025-10-22 17:11:51 -05:00
Aiden Cline
4d3f703715 vscode: adjust tsconfig 2025-10-22 16:43:06 -05:00
Aiden Cline
123dcc10cc ignore: cleanup bun.lock w/ bun i 2025-10-22 15:34:41 -05:00
Dax Raad
28d8af48a0 add parent id to assistant messages 2025-10-22 15:01:13 -04:00
Kyle Galbraith
10ff6e9830 docs: fix typo in SDK documentation (#3355) 2025-10-22 11:43:28 -05:00
theVinchi
a7b43d82ab add Amazon Nova models to us-* prefix requirement list (#3357) 2025-10-22 11:41:38 -05:00
Aiden Cline
9005fd31ed tweak 2025-10-22 11:29:10 -05:00
Aiden Cline
d2bded23c3 tweak 2025-10-22 11:28:06 -05:00
Aiden Cline
c0cbc37f85 tweak: model priority 2025-10-22 11:12:32 -05:00
Aiden Cline
9df61055e2 change default title model 2025-10-22 10:41:08 -05:00
GitHub Action
074136b1e8 ignore: update download stats 2025-10-22 2025-10-22 12:04:58 +00:00
Affaan Mustafa
8db5951287 feat: Improve editor detection with auto-discovery and better error messages (#3155)
Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
Co-authored-by: rekram1-node <rekram1-node@users.noreply.github.com>
2025-10-21 20:49:42 -05:00
Haris Gušić
97c7e941eb fix: opencode run shouldn't print to stderr (#3341) 2025-10-21 19:53:09 -05:00
Aiden Cline
354f5c3281 ignore: fix acp test (#3339) 2025-10-21 15:27:59 -05:00
opencode
833706cda4 release: v0.15.13 2025-10-21 20:24:20 +00:00
Aiden Cline
2a951cea38 ignore: reword 2025-10-21 14:43:34 -05:00
Dax Raad
d9a8d2032a fix sourcemapping so errors show proper stack trace 2025-10-21 15:32:24 -04:00
Dax Raad
d7cdabe8b7 refactor acp args 2025-10-21 15:24:09 -04:00
Aiden Cline
e7c74d13cc ignore: reword contributing.md 2025-10-21 14:12:33 -05:00
opencode
6ac5a447c2 release: v0.15.12 2025-10-21 17:31:56 +00:00
Aiden Cline
cb4670e6de ignore: add label 2025-10-21 11:12:52 -05:00
Aiden Cline
ca0f3902b7 fix: provider option transforms (#3331) 2025-10-21 11:08:21 -05:00
Dax Raad
e9996342a7 core: provide line-level statistics in file diffs to help users understand the scale of changes 2025-10-21 11:54:41 -04:00
opencode
a84826061d release: v0.15.11 2025-10-21 15:04:22 +00:00
Dax Raad
7a20f77ebf core: improve error handling with console output for debugging 2025-10-21 10:55:10 -04:00
Giuseppe Rota
731122bf99 fix(acp): use newer acp package (#3317) 2025-10-21 09:35:09 -05:00
GitHub Action
f9036734eb ignore: update download stats 2025-10-21 2025-10-21 12:06:20 +00:00
kcrommett
a99bd3aa2c tweak: adjust file api to encode images (#3292) 2025-10-21 00:52:39 -05:00
zWing
96efede846 fix: openai options when using @ai-sdk/azure (#3315) 2025-10-20 23:30:13 -05:00
Cheol Kang
2f66055d25 feat: add -f/--file flag to opencode run command (#3295)
Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
Co-authored-by: rekram1-node <rekram1-node@users.noreply.github.com>
Co-authored-by: Aiden Cline <aidenpcline@gmail.com>
2025-10-20 23:25:54 -05:00
opencode
6995dab1dc release: v0.15.10 2025-10-20 22:21:03 +00:00
Dax Raad
a0a09f421c core: add session diff API to show file changes between snapshots 2025-10-20 17:59:26 -04:00
Joe Schmitt
f3f21194ae feat: Add ACP (Agent Client Protocol) support (#2947)
Co-authored-by: opencode-bot <devnull@opencode.local>
Co-authored-by: Dax Raad <d@ironbay.co>
Co-authored-by: GitHub Action <action@github.com>
2025-10-20 16:55:22 -05:00
opencode
835fa9fb81 release: v0.15.9 2025-10-20 21:16:57 +00:00
Aiden Cline
96ae6d51aa ignore: link labels 2025-10-20 16:02:23 -05:00
Frank
075ef0fa34 wip: share 2025-10-20 16:17:51 -04:00
Aiden Cline
89b72e4442 fix: bash tool permission merges (#3302) 2025-10-20 15:15:14 -05:00
Frank
7a7b3c6315 wip: zen 2025-10-20 13:22:43 -04:00
Rui Ferrão
3d48c14d29 docs: clarify the effects of the subtask command option with primary … (#3299) 2025-10-20 12:16:09 -05:00
GitHub Action
bfa79ed44b ignore: update download stats 2025-10-20 2025-10-20 12:04:59 +00:00
Hieu Nguyen
4d8268c818 feat: support astro lsp (#3242) 2025-10-19 22:49:06 -05:00
Squibid
95d413bec6 theme: add mellow theme (#3198) 2025-10-19 22:34:04 -05:00
Joscha Götzer
1cb5a70382 feat(theme): Add Night Owl theme (#3269) 2025-10-19 22:30:04 -05:00
Walter
6adc16ca8a fix(tui): Allow modals to handle ESC key before force closing (#3279) 2025-10-19 22:16:54 -05:00
Zeldris
10ebe9ae09 docs: add scoop & winget to readme (#3215) 2025-10-19 21:50:51 -05:00
Aiden Cline
43a07c6aca hide invalid option 2025-10-19 20:51:33 -05:00
Aiden Cline
5d3a88f34f fix: snapshot undo bug (#3290) 2025-10-19 18:42:34 -05:00
Ivan Uhalin
e47edfffe4 docs: fix Grep by Vercel link in documentation (#3280) 2025-10-19 11:51:57 -05:00
GitHub Action
141097fc73 ignore: update download stats 2025-10-19 2025-10-19 12:04:24 +00:00
Aiden Cline
c8898463a7 ignore: adjust template 2025-10-18 23:45:01 -05:00
Aiden Cline
1c7bd6365e replace all $ARGUMENTS (#3276) 2025-10-18 23:37:17 -05:00
Aiden Cline
290d15a80f ignore: add version to bug template 2025-10-18 14:56:06 -05:00
Aiden Cline
233a018fe5 docs: contributing.md (#3248)
Co-authored-by: Jay <air@live.ca>
2025-10-18 14:10:14 -05:00
opencode
d69beec087 release: v0.15.8 2025-10-18 18:36:52 +00:00
Aiden Cline
1f869bccc1 make compact interruptable (#3251) 2025-10-18 11:49:29 -05:00
GitHub Action
8da8c9e78c ignore: update download stats 2025-10-18 2025-10-18 12:04:14 +00:00
Adam
335d833655 wip: desktop work 2025-10-17 15:22:11 -05:00
Haris Gušić
1dba01e057 Improve typo directory error (#3247) 2025-10-17 14:34:37 -05:00
Jay V
a3de43f3de ignore: clarify that workspaces are free for teams during beta 2025-10-17 15:19:19 -04:00
Jay V
22ad4f5365 ignore: help users discover that teams feature is free during beta 2025-10-17 14:33:21 -04:00
Jay V
5bfbec60b5 docs: clarify team collaboration features and pricing 2025-10-17 13:58:10 -04:00
Adam
cc18b58ff9 wip: desktop work 2025-10-17 12:07:58 -05:00
Adam
887a819f24 wip: desktop work 2025-10-17 12:06:36 -05:00
mgrachten
fe8b3a2515 set 755 permissions (#3237) 2025-10-17 10:42:42 -05:00
GitHub Action
86079353ef ignore: update download stats 2025-10-17 2025-10-17 12:04:43 +00:00
Frank
b7c8690414 wip: zen 2025-10-17 02:23:45 -04:00
Frank
c25b9bf65a wip: zen 2025-10-17 01:15:25 -04:00
Matt Gillard
ddb2e6957c added AU inference for bedrock haiku 4.5 (#3206)
Co-authored-by: Matt Gillard <matt-github@gillard.biz>
2025-10-16 23:48:41 -05:00
Frank
a590b32a10 wip: zen 2025-10-17 00:26:00 -04:00
Frank
5f7bba11fd wip: zen 2025-10-16 23:43:49 -04:00
Frank
4663ea5faa wip: zen 2025-10-16 23:19:25 -04:00
Frank
dd581e8577 wip: zen 2025-10-17 03:17:07 +00:00
opencode
bad01d76de release: v0.15.7 2025-10-17 03:17:07 +00:00
Aiden Cline
d69366b00c Revert "try to avoid persisting empty thinking/text blocks"
This reverts commit d8a15e7bc9.
2025-10-16 22:04:55 -05:00
Frank
1947580b08 wip: zen 2025-10-16 22:28:34 -04:00
Frank
ca9b13e8a2 wip: zen 2025-10-16 22:28:09 -04:00
Hieu Nguyen
92d9a0ec61 feat: deno lsp (#3210)
Co-authored-by: hiunguynx <hieu.nm1@teko.vn>
Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
2025-10-16 18:08:36 -05:00
opencode
2be9ed2590 release: v0.15.6 2025-10-16 23:02:59 +00:00
Aiden Cline
25861f6d0d sync 2025-10-16 17:49:02 -05:00
Aiden Cline
b24f4e3d2c fix: timeout option (#3229) 2025-10-16 17:47:41 -05:00
Frank
729ad1cb75 wip: zen 2025-10-16 17:50:32 -04:00
Haris Gušić
fb4105a46c docs: fix Ctrl+K styling in documentation (#3021) 2025-10-16 15:30:28 -05:00
Frank
7abc3e9794 ci: fix 2025-10-16 16:04:25 -04:00
Frank
88fef05923 wip: zen 2025-10-16 15:58:51 -04:00
GitHub Action
8552f3555e chore: format code 2025-10-16 19:55:30 +00:00
Adam
47d9e01765 wip: css/ui and desktop work 2025-10-16 14:53:44 -05:00
Aiden Cline
fc18fc8a08 fix: bash hangs & orphans (#3225) 2025-10-16 14:39:36 -05:00
Dax Raad
7474788778 ci: fix 2025-10-16 15:36:12 -04:00
GitHub Action
26d0d20e4d chore: format code 2025-10-16 19:08:21 +00:00
Adam
20229f147b wip: css/ui and desktop work 2025-10-16 14:07:37 -05:00
Aiden Cline
149cb6a9ec fix: connection closed 2025-10-16 14:00:07 -05:00
Frank
7ec5e49e19 zen: support stripe link 2025-10-16 14:59:46 -04:00
Aiden Cline
1c1380d3c8 adjust action 2025-10-16 13:15:27 -05:00
Adam
10680f0cf0 wip: css/ui work 2025-10-16 18:06:59 +00:00
opencode
2517b22552 release: v0.15.5 2025-10-16 18:06:59 +00:00
Aiden Cline
64617c113a ignore: tweak permissions 2025-10-16 12:48:39 -05:00
Aiden Cline
860c6338fc fix: github action (#3223) 2025-10-16 12:33:33 -05:00
Aiden Cline
4a7551e87b ci: fix changelog generation 2025-10-16 11:29:58 -05:00
Moisès Macià
285cc4b9fd docs: fix misspelled word (#3211) 2025-10-16 10:04:11 -05:00
Dax Raad
d8a15e7bc9 try to avoid persisting empty thinking/text blocks 2025-10-16 10:54:10 -04:00
opencode
542b9fa342 release: v0.15.4 2025-10-16 14:53:32 +00:00
GitHub Action
9159afb54b ignore: update download stats 2025-10-16 2025-10-16 12:04:48 +00:00
seridescent
536934548a fix: use ai-sdk openai chat language model instead of completion language model (#3204) 2025-10-16 00:59:49 -05:00
Aiden Cline
1c59530115 Revert "fix: Text content blocks must contain non-whitespace text" (#3200) 2025-10-15 20:02:17 -05:00
Dax Raad
ab8471a7ff core: filter out alpha status models from provider list 2025-10-15 20:12:37 -04:00
Dax Raad
4c674b075b ci: stuff 2025-10-15 19:59:46 -04:00
Dax Raad
ba8a4c5e9f snapshot publish everything 2025-10-15 19:53:14 -04:00
Dax Raad
790fe72f39 sync 2025-10-15 19:48:57 -04:00
Aiden Cline
2d2d4641cb ignore: update readme 2025-10-15 16:06:11 -05:00
Aiden Cline
d3caa55c10 Revert "fix: spawns hanging (#3192)"
This reverts commit 278ffb9a4e.
2025-10-15 15:20:14 -05:00
Fabian Kukuck
ca534a36e5 feat: make compact feature use streaming API (#3079)
Co-authored-by: fku <fabian.kukuck@ipt.ch>
Co-authored-by: Aiden Cline <aidenpcline@gmail.com>
2025-10-15 13:44:16 -05:00
Aiden Cline
278ffb9a4e fix: spawns hanging (#3192) 2025-10-15 13:01:54 -05:00
Aiden Cline
b2ff4be4c6 fix: Text content blocks must contain non-whitespace text (#3194) 2025-10-15 13:00:26 -05:00
Frank
2267ce2511 zen: support haiku 4.5 2025-10-15 13:53:00 -04:00
Matt Gillard
e29d1d339c updated bedrock provider for the new Australian sonnet 4.5 cross region inference (#3050)
Co-authored-by: Matt Gillard <matt-github@gillard.biz>
2025-10-15 11:09:22 -05:00
Haris Gušić
92bc78a2d3 Improve http error codes (#3186) 2025-10-15 10:53:09 -05:00
GitHub Action
1ba5535460 ignore: update download stats 2025-10-15 2025-10-15 12:04:51 +00:00
Frank
7fa9a73bf0 wip: zen 2025-10-15 02:55:01 -04:00
Aiden Cline
b3fcc9a81d tweak: consolidate session lock logic (#3185) 2025-10-15 01:12:51 -05:00
Frank
e8751d976e wip: zen 2025-10-15 01:07:57 -04:00
Frank
43c9702aa7 wip: zen 2025-10-15 00:02:38 -04:00
Frank
ae609be710 wip: zen 2025-10-14 23:45:06 -04:00
Frank
86ee36f562 wip: zen 2025-10-14 23:38:21 -04:00
Frank
0657f09139 wip: zen 2025-10-14 23:04:41 -04:00
Frank
182949dee4 wip: zen 2025-10-14 23:03:13 -04:00
Dax Raad
83655a3b09 ci: run typecheck before tests to catch type errors early 2025-10-14 18:36:03 -04:00
Dax Raad
62e5f4b154 try tsgo 2025-10-14 18:30:32 -04:00
Jay V
ea926f0e1a ignore: prompt 2025-10-14 17:45:10 -04:00
Jay V
6191232d5f web: colocate copy button styles with components that use them 2025-10-14 17:41:17 -04:00
Frank
95f4ce86d6 ci: fix 2025-10-14 17:22:29 -04:00
Frank
5999aefde3 wip: zen 2025-10-14 17:18:39 -04:00
Frank
babe3a0f40 wip: zen 2025-10-14 17:13:21 -04:00
Frank
29b95dee53 wip: zen 2025-10-14 17:06:49 -04:00
Frank
ef9a1e911e wip: zen 2025-10-14 17:06:49 -04:00
Jay V
7eddaa806d docs: improve MCP server configuration guidance with examples and caveats 2025-10-14 16:43:59 -04:00
Dax Raad
d07e79e6ad ci: channels 2025-10-14 15:09:18 -04:00
Dax Raad
f17a7cde8d sync 2025-10-14 14:57:34 -04:00
GitHub Action
6d446c2a03 chore: format code 2025-10-14 18:56:54 +00:00
Dax Raad
61f6091de1 ci: test 2025-10-14 14:56:21 -04:00
Dax Raad
289783f627 ci: version stuff 2025-10-14 14:52:05 -04:00
Dax Raad
4c464cf4c0 ci: fix 2025-10-14 18:44:22 +00:00
opencode
83be5b0171 release: v0.15.3 2025-10-14 18:44:21 +00:00
Dax Raad
0c022ef39d ci: stuff 2025-10-14 14:35:04 -04:00
Aiden Cline
717b544633 fix: false positive package manager detection in upgrade (#3181) 2025-10-14 13:18:40 -05:00
Frank
c1a420717a ci: fix 2025-10-14 13:58:54 -04:00
Frank
42c2ffd842 wip: zen 2025-10-14 13:52:30 -04:00
GitHub Action
5192c51843 chore: format code 2025-10-14 17:08:18 +00:00
Adam
96d7ccea48 wip: css/ui work 2025-10-14 12:07:45 -05:00
Adam
49e859cfd6 wip: css/ui work 2025-10-14 12:06:18 -05:00
Adam
6c57a69af4 wip: desktop work 2025-10-14 12:06:17 -05:00
Netanel Draiman
4d019430e2 feat(cli): add session option to attach command (#3167) 2025-10-14 11:04:32 -05:00
Adam
37e6c8342f wip: css and ui packages 2025-10-14 07:16:24 -05:00
Adam
c04e892991 wip: desktop work 2025-10-14 07:15:08 -05:00
Adam
bb82d43094 wip: desktop work 2025-10-14 07:15:08 -05:00
GitHub Action
2893b6e3a5 ignore: update download stats 2025-10-14 2025-10-14 12:04:50 +00:00
Dax
54c3361be7 feat: use realtime events for live tool call updates in Slack (#3163) 2025-10-14 03:13:48 -04:00
Dax Raad
c50cf21f18 fix: update tsconfig for Slack package 2025-10-14 02:55:21 -04:00
Dax Raad
cb73e2d9e1 fix: export trimDiff function from edit tool 2025-10-14 02:55:02 -04:00
Dax Raad
48057c2c21 fix: resolve TypeScript errors in SDK and Slack package 2025-10-14 02:54:37 -04:00
Dax Raad
1923ddab6e feat: add Slack integration package with Bolt framework 2025-10-14 02:53:55 -04:00
Dax Raad
b8249cde4b core: improve dependency management and error handling for more reliable builds 2025-10-14 01:33:25 -04:00
Dax Raad
19b3f3d7ce core: standardize dependency versions for better reliability
Ensures consistent versions across packages by using workspace catalog for
tailwindcss and tsconfig dependencies, reducing potential conflicts and
installation issues.
2025-10-14 01:27:17 -04:00
Dax Raad
e5e05d390d core: reduce dependency conflicts by standardizing package versions through catalog
This eliminates duplicate package versions that were causing build issues and
inconsistent behavior across the monorepo. Dependencies now resolve to single
versions through the workspace catalog, making installs faster and more reliable.
2025-10-14 01:23:54 -04:00
opencode
38ad6707cf release: v0.15.2 2025-10-14 04:56:00 +00:00
Alberto Fanton
7ef246f98f fix: disable GPG signing in snapshot tests (#3102) 2025-10-13 23:40:41 -05:00
Aiden Cline
b91582d68a fix: config dir overrides (#3160) 2025-10-13 23:25:53 -05:00
Aiden Cline
682d30bd12 fix: custom model (#3156) 2025-10-13 19:58:19 -05:00
pancake
4d68ee5d2c fix: clang formatter name (#3042)
Co-authored-by: pancake <pancake@nopcode.org>
Co-authored-by: Aiden Cline <63023139+rekram1-node@users.noreply.github.com>
2025-10-13 19:55:18 -05:00
Haris Gušić
dbe9fd00b7 fix: make shell more robust (#3051) 2025-10-13 17:37:35 -05:00
maple
cd13a8524e docs: typo in custom-tools.mdx (#3152) 2025-10-13 17:19:20 -05:00
Aiden Cline
59765e0157 fix: typecheck (#3149) 2025-10-13 14:51:12 -05:00
AB
d0519be0d0 fix: add useCompletionUrls option to fix certain azure setups (#2528)
Co-authored-by: andreas.blass <andreas.blass@outlook.com>
Co-authored-by: GitHub Action <action@github.com>
2025-10-13 14:16:21 -05:00
Tommy D. Rossi
066e4f064d tweak: include stack trace in server error responses (#3134) 2025-10-13 14:10:35 -05:00
opencode
f81c469f17 release: v0.15.1 2025-10-13 18:14:52 +00:00
Dax Raad
a398013ecb fix: disable workspace symbol lookup to prevent LSP performance issues 2025-10-13 14:05:54 -04:00
Aiden Cline
53d9717d90 fix: pass options to compact (#3136) 2025-10-13 10:42:39 -05:00
Aiden Cline
5885b691b9 docs: update recommended models list (#3121) 2025-10-12 21:35:31 -05:00
Aiden Cline
fd70b9b057 fix: adjust list tool prompt to handle cwd better (#3115) 2025-10-12 16:48:03 -05:00
Ravshan Samandarov
de13ccb757 docs: Update README.md (#3100) 2025-10-12 16:23:25 -04:00
Jay
7e1abb7bbf docs: Fix formatting of num_ctx in providers.mdx 2025-10-12 16:01:32 -04:00
Aiden Cline
83afcb9c42 docs: ollama num_ctx (#3111) 2025-10-12 10:40:51 -05:00
GitHub Action
afb406c5ff ignore: update download stats 2025-10-12 2025-10-12 12:04:09 +00:00
OpeOginni
36cf9b9922 fix: add timeout to fetch models.dev refresh request (#3059) 2025-10-12 00:20:22 -05:00
opencode
0d21164255 release: v0.15.0 2025-10-12 05:12:15 +00:00
Dax Raad
3ad6f84adb ci: centralize bun setup to reduce duplication and improve caching 2025-10-12 00:46:37 -04:00
Dax Raad
24a5b16af8 ci: tweak 2025-10-12 00:40:59 -04:00
Tommy D. Rossi
b4171aa8e8 fix: rg hanging forever when run in bash, waiting for stdin (#3103)
Co-authored-by: Aiden Cline <aidenpcline@gmail.com>
2025-10-11 23:24:48 -05:00
Dax Raad
d7a79733ea ci: re-enable aur 2025-10-12 00:22:16 -04:00
Frank
34e5b9bdb0 wip: zen 2025-10-11 16:17:39 -04:00
Frank
d32ec9bd52 ci: fix 2025-10-11 15:08:45 -04:00
Frank
89fcfcc50b wip: zen 2025-10-11 15:07:06 -04:00
Frank
9a6fd6a5ee wip: zen 2025-10-11 14:48:34 -04:00
Frank
f144a0384d ci: fix 2025-10-11 14:41:52 -04:00
Frank
a67920a25e wip: zen 2025-10-11 14:38:53 -04:00
Frank
67f894e5d0 Bump sst to latest 2025-10-11 14:38:45 -04:00
Frank
fc1eda5c77 wip: zen 2025-10-11 10:51:17 -04:00
Frank
371fddc820 wip: zen 2025-10-11 09:29:26 -04:00
Frank
8e89c38480 wip: zen 2025-10-11 08:27:32 -04:00
Frank
b732b4caeb wip: zen 2025-10-11 08:27:32 -04:00
Frank
1940d1cf87 wip: zen 2025-10-11 08:27:32 -04:00
GitHub Action
1f0ed24402 ignore: update download stats 2025-10-11 2025-10-11 12:04:02 +00:00
Frank
133da0f448 wip: zen refactor selector 2025-10-11 07:54:57 -04:00
Frank
f93e1e5c92 wip: zen fix drop down style 2025-10-11 07:15:19 -04:00
Frank
ae4af54c7d wip: zen fix template 2025-10-11 06:33:47 -04:00
Dax Raad
9d30bc692c ci: fixes 2025-10-11 00:24:35 -04:00
Dax Raad
44b63dc259 ci: stuff 2025-10-11 00:06:46 -04:00
Dax Raad
de2b4f6538 ci: fix 2025-10-10 23:43:32 -04:00
Frank
b6b82aa847 wip: zen 2025-10-10 21:26:16 -04:00
Frank
2d35b78333 Merge branch 'console-workspaces' into dev 2025-10-10 21:24:05 -04:00
Frank
c7dfbbeed0 wip: zen 2025-10-10 21:21:55 -04:00
Frank
b946fd21b1 wip: zen 2025-10-10 20:32:28 -04:00
Frank
daa0ca40f2 wip: zen 2025-10-10 20:30:13 -04:00
Frank
5b27130d60 wip: zen 2025-10-10 20:16:44 -04:00
Frank
ee1eb35269 wip: zen 2025-10-10 20:02:17 -04:00
Frank
4dda7cc6a4 wip: zen 2025-10-10 19:56:40 -04:00
Frank
cc590364e9 wip: zen 2025-10-10 19:49:59 -04:00
Frank
f14cd4a3db wip: zen 2025-10-10 19:39:01 -04:00
Dax Raad
07645e0705 ci: fixes 2025-10-10 18:17:10 -04:00
Dax Raad
f053862018 ci: fix 2025-10-10 18:11:19 -04:00
Dax Raad
69127aeaa0 ci: stuff 2025-10-10 18:04:08 -04:00
Dax Raad
847455383d ci: stuff 2025-10-10 17:56:33 -04:00
Dax Raad
9da95cb805 upgrade to bun 1.3.0 2025-10-10 17:53:32 -04:00
Frank
48008f91ac wip: zen 2025-10-10 16:42:27 -04:00
Frank
d8b3aa9382 wip: zen 2025-10-10 16:34:07 -04:00
Frank
ea9b5b8d76 wip: zen 2025-10-10 16:04:06 -04:00
Frank
4227b89ebc wip: zen 2025-10-10 14:54:49 -04:00
Frank
ee846235f2 wip: zen 2025-10-10 14:19:06 -04:00
Frank
9463ce8006 wip: zen 2025-10-10 14:11:48 -04:00
Frank
756fb61691 wip: zen 2025-10-10 13:52:54 -04:00
Frank
94d0a3d888 wip: zen style members 2025-10-10 13:48:56 -04:00
Frank
d83af721a6 wip: zen style api keys 2025-10-10 13:45:06 -04:00
Frank
0bc00bef32 wip: zen 2025-10-10 13:26:39 -04:00
Frank
98c13a965b wip: zen 2025-10-10 13:21:51 -04:00
Frank
310065bd0a wip: zen 2025-10-10 12:46:42 -04:00
Rustafarian Dev
34ec6cc978 fix: perl6 file extension (#3066) 2025-10-10 11:28:49 -05:00
Frank
5a90e5f9e2 wip: zen 2025-10-10 12:22:36 -04:00
Frank
5ee3063aab wip: sync 2025-10-10 12:16:57 -04:00
Frank
920373d252 wip: zen settings 2025-10-10 12:04:02 -04:00
Frank
c9155c117a wip: zen 2025-10-10 09:03:49 -04:00
GitHub Action
28d617d867 ignore: update download stats 2025-10-10 2025-10-10 12:04:18 +00:00
Frank
593d0737b5 wip: zen style byok 2025-10-10 03:15:55 -04:00
Frank
64409182ec wip: zen style byok 2025-10-10 02:53:05 -04:00
Frank
8d4607ebd5 wip: zen style byok 2025-10-10 02:37:50 -04:00
Frank
250393978b wip: style byok 2025-10-10 02:34:06 -04:00
Frank
fec70ae9c9 wip: zen 2025-10-10 01:36:15 -04:00
Frank
ad7b4b1fcd wip: zen style nav bar 2025-10-10 00:56:16 -04:00
Frank
03d5089436 wip: zen style model 2025-10-10 00:02:04 -04:00
Dax Raad
9b52d33889 core: improve directory validation error messages to help users fix invalid directory names 2025-10-09 22:40:23 -04:00
Frank
bc0e00cbb7 wip: zen style header 2025-10-09 22:38:42 -04:00
Dax Raad
096710a8cc ensure @opencode-ai/plugin is available in .opencode folder 2025-10-09 21:18:49 -04:00
opencode
50bb201187 release: v0.14.7 2025-10-10 01:02:37 +00:00
Dax Raad
f211fc45a3 drop excess dependency in opencode sdk 2025-10-09 20:55:25 -04:00
Dax Raad
d91781c639 core: use platform-specific watcher backends for better file system monitoring 2025-10-09 18:29:18 -04:00
Dax Raad
f3b71007d2 core: replace chokidar with @parcel/watcher for better performance and cross-platform support 2025-10-09 18:21:38 -04:00
Frank
60dd987efd wip: zen 2025-10-09 17:18:55 -04:00
Dax Raad
0a96d254e8 ignore: add common build and framework directories to ignore list 2025-10-09 16:35:56 -04:00
Frank
51e9979457 wip: zen nav bar 2025-10-09 16:01:52 -04:00
Dax Raad
dfc7ac4cf0 ignore: improve file ignore performance and cross-platform support
- Replace glob patterns with Set lookup for common folders to speed up matching
- Use path.sep for cross-platform compatibility on Windows/Unix systems
- Add comprehensive test coverage for nested and non-nested folder matching
- Simplify implementation by removing unnecessary caching complexity
2025-10-09 15:54:01 -04:00
Adam
c2950d26f0 feat: experimental skip bootstrap 2025-10-09 14:51:11 -05:00
Aiden Cline
47dfebf277 docs: fix bugged example (#3068) 2025-10-09 12:21:44 -05:00
Jay V
f3b5021936 docs: adding tools doc 2025-10-09 13:19:51 -04:00
Jay V
7be9a84b72 docs: document ripgrep .ignore file override in tools 2025-10-09 13:19:51 -04:00
Jay V
78321a95e8 docs: adding spellcheck command 2025-10-09 13:19:51 -04:00
Aiden Cline
225adc46ba feat: allow read tool to handle images (#3052) 2025-10-09 09:05:11 -05:00
GitHub Action
eb4b5721cd ignore: update download stats 2025-10-09 2025-10-09 12:04:27 +00:00
Dax Raad
979c9ea569 lsp: fix root detection to use instance directory instead of worktree 2025-10-09 04:30:30 -04:00
Dax Raad
c0bd29155d lsp: simplify language server root detection to use lock files
Improves project boundary detection by focusing on package manager lock files instead of config files, providing more reliable workspace identification across different project types.
2025-10-09 04:22:38 -04:00
Haris Gušić
c5b5795636 fix: process.stdout.write instead of console.log for export cmd (#3049) 2025-10-09 00:46:19 -05:00
Frank
3ed4f1078f wip: zen 2025-10-08 22:33:20 -04:00
Frank
5b1fd7e539 wip: zen 2025-10-08 18:59:41 -04:00
Frank
d18b6673e6 wip: zen 2025-10-08 17:03:42 -04:00
Frank
c93c0d402d wip: zen 2025-10-08 15:20:50 -04:00
Frank
b168bfe40d wip: zen 2025-10-08 13:31:15 -04:00
Jay V
1d621260ff docs: fix permission docs 2025-10-08 12:13:42 -04:00
GitHub Action
a63fa64dec ignore: update download stats 2025-10-08 2025-10-08 12:04:31 +00:00
Adam
3c282c3c37 fix(tui): suggestions gap on home page 2025-10-08 06:56:18 -05:00
Dax Raad
2046f2e8e7 add free workspace 2025-10-08 02:27:01 -04:00
Frank
af684c80d4 wip: zen 2025-10-08 01:14:39 -04:00
Frank
99b72eb1ea wip: zen 2025-10-08 00:03:36 -04:00
opencode
22a6849ff8 release: v0.14.6 2025-10-07 19:59:08 +00:00
Dax Raad
dca3a5d80d fix issue with blank new version popup 2025-10-07 15:51:59 -04:00
Frank
508067ba5d wip: zen 2025-10-07 13:37:38 -04:00
Aiden Cline
b6c9df970a docs: troubleshooting ProviderModelNotFoundError (#3016) 2025-10-07 11:50:37 -05:00
Sai
1f725cc3ed docs: add agent specific permission example (#3009) 2025-10-07 10:08:52 -05:00
Frank
6c99b833e4 wip: zen 2025-10-07 09:17:08 -04:00
GitHub Action
cd3780b7f5 ignore: update download stats 2025-10-07 2025-10-07 12:04:53 +00:00
Dax Raad
a440e09cfe core: improve MCP reliability and add status monitoring
- Added 5-second timeout to MCP client verification to prevent hanging connections
- New GET /mcp endpoint to monitor server connection status
- Automatically removes unresponsive MCP clients during initialization
2025-10-07 04:04:19 -04:00
opencode
27c211ef86 release: v0.14.5 2025-10-07 06:21:31 +00:00
Aiden Cline
cd528ae78f fix: mcp error (#3006) 2025-10-07 00:45:46 -05:00
Aiden Cline
06c42093c8 tweak: grep tool to handle single file better (#3004) 2025-10-06 23:24:00 -05:00
Frank
0534bc0c09 wip: zen 2025-10-06 23:57:55 -04:00
Frank
4f33594b99 wip: zen 2025-10-06 23:57:54 -04:00
opencode
e3f9e7785e release: v0.14.4 2025-10-07 03:32:10 +00:00
Dax Raad
a20fc2dfdf ignore: 2025-10-06 23:25:01 -04:00
Dax Raad
2bf0e42367 core: restore bash command security validation to prevent accidental directory traversal
The permission validation that prevents commands from accessing paths outside the project directory was accidentally disabled, which could allow commands like 'cd ../' to escape the workspace. This restores the security check that keeps your commands safely contained within your project boundaries.
2025-10-06 23:24:18 -04:00
Dax Raad
10998d62b9 core: improve session API reliability with proper input validation 2025-10-06 19:37:44 -04:00
Dax Raad
aee240150b Update todo tool to use centralized Todo module 2025-10-06 18:54:05 -04:00
Dax Raad
cdd6e98af9 Add missing files and fix type aliases for opentui features 2025-10-06 18:53:35 -04:00
Dax Raad
6417edf998 Add todo list and session forking API endpoints 2025-10-06 18:51:57 -04:00
Dax Raad
9a0735de76 Add session forking functionality and simplify remove logic 2025-10-06 18:50:56 -04:00
Frank
a470859f6f wip: zen 2025-10-06 17:23:10 -04:00
Frank
f47c7c5a07 wip: zen 2025-10-06 17:17:02 -04:00
Frank
c2f57ea74d wip: zen 2025-10-06 17:13:19 -04:00
Frank
9e8fd16e6e wip: zen 2025-10-06 17:13:19 -04:00
Jay V
1b17d8070b docs: update footer 2025-10-06 17:05:45 -04:00
Jay V
1db028dc05 docs: fix styles and zen doc, closes #2912 2025-10-06 17:00:10 -04:00
Jay V
b351b75156 docs: share page css 2025-10-06 16:13:21 -04:00
GitHub Action
2faa28e162 ignore: update download stats 2025-10-06 2025-10-06 12:04:17 +00:00
Aiden Cline
bdf77701cf fix: add timeout message if command times out (#2986) 2025-10-05 23:55:01 -05:00
Mani Sundararajan
889c276558 fix: file references & grep tool for windows (#2980) 2025-10-05 14:32:07 -05:00
GitHub Action
9c6192b00d ignore: update download stats 2025-10-05 2025-10-05 12:03:55 +00:00
opencode
d2a4a0375f release: v0.14.3 2025-10-05 11:22:57 +00:00
Dax Raad
aced8c95f2 ci: publish 2025-10-05 07:14:52 -04:00
Dax Raad
1bb664869c ci: disable aur 2025-10-05 07:12:33 -04:00
Dax Raad
116a006ce6 sdk: simplify getting started with single createOpencode function
Makes it easier for developers to get started by providing a single function that creates both server and client, removing the need to manually coordinate separate server and client creation
2025-10-05 07:01:32 -04:00
Dax Raad
f3c2d1b6c2 sdk: simplify getting started with single createOpencode function
Makes it easier for developers to get started by providing a single function that creates both server and client, removing the need to manually coordinate separate server and client creation
2025-10-05 07:00:29 -04:00
Aiden Cline
71a7e8ef36 fix: max output tokens when using large thinking budget (#2976) 2025-10-04 23:38:41 -05:00
Dax Raad
5f7ae6477b sync 2025-10-04 21:33:47 -04:00
Aiden Cline
f41a54b4b0 fix: allow LSP filename matching when extension is missing (#2975) 2025-10-04 20:30:53 -05:00
iwauo
080fce9601 docs: java-lsp support (#2958) 2025-10-04 11:28:09 -05:00
GitHub Action
b2222cc278 ignore: update download stats 2025-10-04 2025-10-04 12:03:53 +00:00
Frank
82509e8604 wip: zen 2025-10-04 01:12:32 -04:00
Yuku Kotani
e7b6ffb314 feat: Vertex AI support; add google-vertex and google-vertex-anthropic providers (#2347) 2025-10-04 01:10:38 -04:00
Aiden Cline
395c41b748 add command to debug config (#2962) 2025-10-03 23:07:58 -05:00
Frank
a11a608760 wip: zen 2025-10-03 23:48:34 -04:00
Dax Raad
477586835a ci: try regional hostname again 2025-10-03 19:05:32 -04:00
Rovshan Muradov
085f4adbc3 docs: Update models.mdx (#2916) 2025-10-03 17:06:20 -04:00
Frank
9671872059 wip: zen 2025-10-03 16:32:53 -04:00
Jay V
6378e6c06f docs: rename opencode to OpenCode 2025-10-03 13:46:56 -04:00
Frank
4159db4549 wip: zen 2025-10-03 12:54:52 -04:00
Adam
79764c8c4c fix: github stats 2025-10-03 09:34:17 -05:00
Adam
006cb5b36d fix: user-agent 2025-10-03 09:30:51 -05:00
Adam
8ce7d58e6d chore: user-agent header 2025-10-03 09:27:12 -05:00
Adam
b622e924b6 chore: logging errors 2025-10-03 09:19:54 -05:00
Adam
8e80b8f2fa chore: logging errors 2025-10-03 09:10:33 -05:00
Adam
3fa280d218 chore: app -> desktop 2025-10-03 09:04:28 -05:00
Frank
1d58b55482 wip: zen 2025-10-03 08:25:51 -04:00
GitHub Action
aae387f7dc ignore: update download stats 2025-10-03 2025-10-03 12:04:07 +00:00
Frank
60e21642a5 wip: zen 2025-10-03 07:36:16 -04:00
Frank
600b512c9c wip: zen 2025-10-03 07:36:16 -04:00
Frank
3be1f9b67e wip: zen 2025-10-03 07:36:16 -04:00
Dax Raad
ad0f137e35 ci: stuff 2025-10-03 10:53:10 +00:00
opencode
253105bcf5 release: v0.14.1 2025-10-03 10:53:10 +00:00
Dax Raad
bd0ba5ab88 turn on codex medium reasoning again 2025-10-03 06:46:07 -04:00
David Hill
ea993976b0 Firefox email input fix 2025-10-02 23:50:51 +01:00
Jay
4c11ccd334 docs: update theme (#2929)
Co-authored-by: David Hill <iamdavidhill@gmail.com>
2025-10-02 23:20:30 +01:00
David Hill
d766ca23e8 Update index.css 2025-10-02 23:19:53 +01:00
Jay
fe4589d335 ignore: Workspace updates (#2930)
Co-authored-by: David Hill <iamdavidhill@gmail.com>
2025-10-02 23:18:57 +01:00
Frank
6036a1d611 wip: zen 2025-10-02 18:16:29 -04:00
Frank
a8341e2b8b wip: zen 2025-10-02 17:55:54 -04:00
Frank
73115efab1 wip: zen 2025-10-02 16:09:42 -04:00
Frank
a45fa7a93c wip: zen 2025-10-02 13:58:40 -04:00
Jay
ae15c91455 docs: README 2025-10-02 12:33:32 -04:00
Jay V
52f16c496b docs: update README 2025-10-02 12:31:58 -04:00
David Hill
24d9f45506 Copy tweaks 2025-10-02 17:02:33 +01:00
David Hill
2404d70a33 Border top only on safari fix 2025-10-02 16:55:48 +01:00
David Hill
26f1cc87ca Update favicon.svg 2025-10-02 16:55:29 +01:00
Aiden Cline
860e47edea fix: run cmd json format when running command (#2926) 2025-10-02 10:37:42 -05:00
David Hill
e2378f2237 Style fixes 2025-10-02 16:35:23 +01:00
David Hill
9e197a5b67 Update dock.png 2025-10-02 16:24:14 +01:00
David Hill
5f4041c58f Update dock.png 2025-10-02 16:14:52 +01:00
David Hill
d56e81f02b Email input color fix 2025-10-02 16:11:55 +01:00
David Hill
6022d12ea2 Update dock.png 2025-10-02 15:50:56 +01:00
David Hill
f7ef1c286f Testimonial tweaks 2025-10-02 15:37:36 +01:00
David Hill
b35c6b9fff Merge branch 'dev' of https://github.com/sst/opencode into dev 2025-10-02 15:37:13 +01:00
David Hill
30ec02e82d faq icon fix 2025-10-02 15:37:10 +01:00
Frank
bc9522d5d8 ignore: fix 2025-10-02 10:10:07 -04:00
David Hill
b6e80e72f6 Merge branch 'dev' of https://github.com/sst/opencode into dev 2025-10-02 15:03:59 +01:00
David Hill
2ded2aa2d9 Body background fix 2025-10-02 15:03:56 +01:00
David Hill
30dc0cbe58 Mobile nav icon fix 2025-10-02 15:02:57 +01:00
David Hill
2bd0c9c6d2 Mobile nav icon fix 2025-10-02 15:02:44 +01:00
David Hill
f9229889a1 Mobile nav fix 2025-10-02 15:01:22 +01:00
Adam
eb4f55bdf6 fix: broken links 2025-10-02 09:00:33 -05:00
David Hill
9ee4e2e3d4 Update posters for videos 2025-10-02 14:55:38 +01:00
David Hill
decb6ff2d3 Merge branch 'dev' of https://github.com/sst/opencode into dev 2025-10-02 14:54:16 +01:00
David Hill
b9de71dbfa Testimonial tweak 2025-10-02 14:53:54 +01:00
Adam
124e355a3c chore: add email signup back 2025-10-02 08:46:25 -05:00
David Hill
095fe68786 Update faq.tsx 2025-10-02 14:42:49 +01:00
David Hill
afc67caa48 Faq icon color fix 2025-10-02 14:41:57 +01:00
Adam
189b7f1172 fix: testimonial link 2025-10-02 08:34:22 -05:00
Adam
cc955098cd wip: desktop work 2025-10-02 08:34:01 -05:00
GitHub Action
8699e896e6 ignore: update download stats 2025-10-02 2025-10-02 12:04:06 +00:00
opencode
ca4cb85dcd release: v0.14.0 2025-10-02 05:33:58 +00:00
Dax Raad
88474e0653 ci: fix 2025-10-02 01:25:27 -04:00
Dax Raad
5667a7ed16 ci: publsih 2025-10-02 01:24:33 -04:00
Dax Raad
2ae3231ff9 ci: test 2025-10-02 01:19:53 -04:00
Dax Raad
d92fc25e26 ci: install opencode 2025-10-02 01:19:53 -04:00
Dax Raad
c8c0373f1d ci: fix 2025-10-02 05:18:01 +00:00
opencode
bccee29d2f release: v0.13.9 2025-10-02 05:18:01 +00:00
Dax Raad
ad307f7f89 ci: sync 2025-10-02 01:09:58 -04:00
Dax Raad
eac11c0753 ci: stuff 2025-10-02 01:08:29 -04:00
Aiden Cline
0e804c302c docs: fix install fmt (#2914) 2025-10-01 23:32:39 -05:00
Aiden Cline
fb88cb0aa3 docs: fix more links (#2913) 2025-10-01 23:22:17 -05:00
Sandip Wane
8fc6a25142 chore: rm empty try-catch block (#2769)
Co-authored-by: Sandip Wane <sandip.wane@cloudhedge.io>
2025-10-01 23:21:57 -05:00
Dax Raad
5079ba7ce5 core: fix file search limit handling and ensure File module initialization 2025-10-02 00:18:18 -04:00
2180 changed files with 84927 additions and 42090 deletions

59
.github/ISSUE_TEMPLATE/bug-report.yml vendored Normal file
View File

@@ -0,0 +1,59 @@
name: Bug report
description: Report an issue that should be fixed
labels: ["bug"]
body:
- type: textarea
id: description
attributes:
label: Description
description: Describe the bug you encountered
placeholder: What happened?
validations:
required: true
- type: input
id: opencode-version
attributes:
label: OpenCode version
description: What version of OpenCode are you using?
validations:
required: false
- type: textarea
id: reproduce
attributes:
label: Steps to reproduce
description: How can we reproduce this issue?
placeholder: |
1.
2.
3.
validations:
required: false
- type: textarea
id: screenshot-or-link
attributes:
label: Screenshot and/or share link
description: Run `/share` to get a share link, or attach a screenshot
placeholder: Paste link or drag and drop screenshot here
validations:
required: false
- type: input
id: os
attributes:
label: Operating System
description: what OS are you using?
placeholder: e.g., macOS 26.0.1, Ubuntu 22.04, Windows 11
validations:
required: false
- type: input
id: terminal
attributes:
label: Terminal
description: what terminal are you using?
placeholder: e.g., iTerm2, Ghostty, Alacritty, Windows Terminal
validations:
required: false

5
.github/ISSUE_TEMPLATE/config.yml vendored Normal file
View File

@@ -0,0 +1,5 @@
blank_issues_enabled: true
contact_links:
- name: 💬 Discord Community
url: https://discord.gg/opencode
about: For quick questions or real-time discussion. Note that issues are searchable and help others with the same question.

View File

@@ -0,0 +1,20 @@
name: 🚀 Feature Request
description: Suggest an idea, feature, or enhancement
labels: [discussion]
title: "[FEATURE]:"
body:
- type: checkboxes
id: verified
attributes:
label: Feature hasn't been suggested before.
options:
- label: I have verified this feature I'm about to request hasn't been suggested before.
required: true
- type: textarea
attributes:
label: Describe the enhancement you want to request
description: What do you want to change or add? What are the benefits of implementing this? Try to be detailed so we can understand your request better :)
validations:
required: true

11
.github/ISSUE_TEMPLATE/question.yml vendored Normal file
View File

@@ -0,0 +1,11 @@
name: Question
description: Ask a question
labels: ["question"]
body:
- type: textarea
id: question
attributes:
label: Question
description: What's your question?
validations:
required: true

22
.github/actions/setup-bun/action.yml vendored Normal file
View File

@@ -0,0 +1,22 @@
name: "Setup Bun"
description: "Setup Bun with caching and install dependencies"
runs:
using: "composite"
steps:
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version-file: package.json
- name: Cache ~/.bun
id: cache-bun
uses: actions/cache@v4
with:
path: ~/.bun
key: ${{ runner.os }}-bun-${{ hashFiles('package.json') }}-${{ hashFiles('bun.lockb', 'bun.lock') }}
restore-keys: |
${{ runner.os }}-bun-${{ hashFiles('package.json') }}-
- name: Install dependencies
run: bun install
shell: bash

71
.github/publish-python-sdk.yml vendored Normal file
View File

@@ -0,0 +1,71 @@
#
# This file is intentionally in the wrong dir, will move and add later....
#
# name: publish-python-sdk
# on:
# release:
# types: [published]
# workflow_dispatch:
# jobs:
# publish:
# runs-on: ubuntu-latest
# permissions:
# contents: read
# steps:
# - name: Checkout repository
# uses: actions/checkout@v4
# - name: Setup Bun
# uses: oven-sh/setup-bun@v1
# with:
# bun-version: 1.2.21
# - name: Install dependencies (JS/Bun)
# run: bun install
# - name: Install uv
# shell: bash
# run: curl -LsSf https://astral.sh/uv/install.sh | sh
# - name: Generate Python SDK from OpenAPI (CLI)
# shell: bash
# run: |
# ~/.local/bin/uv run --project packages/sdk/python python packages/sdk/python/scripts/generate.py --source cli
# - name: Sync Python dependencies
# shell: bash
# run: |
# ~/.local/bin/uv sync --dev --project packages/sdk/python
# - name: Set version from release tag
# shell: bash
# run: |
# TAG="${GITHUB_REF_NAME:-}"
# if [ -z "$TAG" ]; then
# TAG="$(git describe --tags --abbrev=0 || echo 0.0.0)"
# fi
# echo "Using version: $TAG"
# VERSION="$TAG" ~/.local/bin/uv run --project packages/sdk/python python - <<'PY'
# import os, re, pathlib
# root = pathlib.Path('packages/sdk/python')
# pt = (root / 'pyproject.toml').read_text()
# version = os.environ.get('VERSION','0.0.0').lstrip('v')
# pt = re.sub(r'(?m)^(version\s*=\s*")[^"]+("\s*)$', f"\\1{version}\\2", pt)
# (root / 'pyproject.toml').write_text(pt)
# # Also update generator config override for consistency
# cfgp = root / 'openapi-python-client.yaml'
# if cfgp.exists():
# cfg = cfgp.read_text()
# cfg = re.sub(r'(?m)^(package_version_override:\s*)\S+$', f"\\1{version}", cfg)
# cfgp.write_text(cfg)
# PY
# - name: Build and publish to PyPI
# env:
# PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
# shell: bash
# run: |
# ~/.local/bin/uv run --project packages/sdk/python python packages/sdk/python/scripts/publish.py

55
.github/workflows/auto-label-tui.yml vendored Normal file
View File

@@ -0,0 +1,55 @@
name: Auto-label TUI Issues
on:
issues:
types: [opened]
jobs:
auto-label:
runs-on: ubuntu-latest
permissions:
contents: read
issues: write
steps:
- name: Auto-label and assign issues
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const issue = context.payload.issue;
const title = issue.title;
const description = issue.body || '';
// Check for "opencode web" keyword
const webPattern = /(opencode web)/i;
const isWebRelated = webPattern.test(title) || webPattern.test(description);
// Check for version patterns like v1.0.x or 1.0.x
const versionPattern = /[v]?1\.0\./i;
const isVersionRelated = versionPattern.test(title) || versionPattern.test(description);
if (isWebRelated) {
// Add web label
await github.rest.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: issue.number,
labels: ['web']
});
// Assign to adamdotdevin
await github.rest.issues.addAssignees({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: issue.number,
assignees: ['adamdotdevin']
});
} else if (isVersionRelated) {
// Only add opentui if NOT web-related
await github.rest.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: issue.number,
labels: ['opentui']
});
}

View File

@@ -15,11 +15,7 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: oven-sh/setup-bun@v1
with:
bun-version: 1.2.21
- run: bun install
- uses: ./.github/actions/setup-bun
- run: bun sst deploy --stage=${{ github.ref_name }}
env:

View File

@@ -20,13 +20,10 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Bun
uses: oven-sh/setup-bun@v1
with:
bun-version: 1.2.21
uses: ./.github/actions/setup-bun
- name: run
run: |
bun install
./script/format.ts
env:
CI: true

View File

@@ -8,7 +8,9 @@ jobs:
opencode:
if: |
contains(github.event.comment.body, ' /oc') ||
contains(github.event.comment.body, ' /opencode')
startsWith(github.event.comment.body, '/oc') ||
contains(github.event.comment.body, ' /opencode') ||
startsWith(github.event.comment.body, '/opencode')
runs-on: ubuntu-latest
permissions:
id-token: write
@@ -24,4 +26,4 @@ jobs:
env:
OPENCODE_API_KEY: ${{ secrets.OPENCODE_API_KEY }}
with:
model: opencode/sonic
model: opencode/glm-4.6

View File

@@ -19,16 +19,17 @@ jobs:
with:
fetch-depth: 0
- uses: oven-sh/setup-bun@v2
with:
bun-version: 1.2.21
- uses: ./.github/actions/setup-bun
- run: git fetch --force --tags
- run: bun install -g @vscode/vsce
- name: Install extension dependencies
run: bun install
working-directory: ./sdks/vscode
- name: Publish
run: |
bun install
./script/publish
working-directory: ./sdks/vscode
env:

View File

@@ -12,6 +12,10 @@ on:
- major
- minor
- patch
version:
description: "Override version (optional)"
required: false
type: string
concurrency: ${{ github.workflow }}-${{ github.ref }}
@@ -35,18 +39,7 @@ jobs:
cache: true
cache-dependency-path: go.sum
- uses: oven-sh/setup-bun@v2
with:
bun-version: 1.2.21
- name: Cache ~/.bun
id: cache-bun
uses: actions/cache@v3
with:
path: ~/.bun
key: ${{ runner.os }}-bun-1-2-21-${{ hashFiles('bun.lock') }}
restore-keys: |
${{ runner.os }}-bun-1-2-21-
- uses: ./.github/actions/setup-bun
- name: Install makepkg
run: |
@@ -60,14 +53,22 @@ jobs:
git config --global user.email "opencode@sst.dev"
git config --global user.name "opencode"
ssh-keyscan -H aur.archlinux.org >> ~/.ssh/known_hosts || true
- name: Install dependencies
run: bun install
- name: Install OpenCode
run: curl -fsSL https://opencode.ai/install | bash
- name: Setup npm auth
run: |
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
- name: Publish
run: |
./script/publish.ts
env:
OPENCODE_BUMP: ${{ inputs.bump }}
OPENCODE_VERSION: ${{ inputs.version }}
OPENCODE_CHANNEL: latest
NPM_CONFIG_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.SST_GITHUB_TOKEN }}
AUR_KEY: ${{ secrets.AUR_KEY }}
NPM_CONFIG_TOKEN: ${{ secrets.NPM_TOKEN }}
OPENCODE_API_KEY: ${{ secrets.OPENCODE_API_KEY }}

View File

@@ -4,7 +4,8 @@ on:
push:
branches:
- dev
- opentui
- fix-build
- v0
concurrency: ${{ github.workflow }}-${{ github.ref }}
@@ -24,27 +25,11 @@ jobs:
cache: true
cache-dependency-path: go.sum
- uses: oven-sh/setup-bun@v2
with:
bun-version: 1.2.21
- name: Cache ~/.bun
id: cache-bun
uses: actions/cache@v3
with:
path: ~/.bun
key: ${{ runner.os }}-bun-1-2-21-${{ hashFiles('bun.lock') }}
restore-keys: |
${{ runner.os }}-bun-1-2-21-
- name: Install dependencies
run: bun install
- uses: ./.github/actions/setup-bun
- name: Publish
run: |
./packages/opencode/script/publish.ts
./script/publish.ts
env:
OPENCODE_SNAPSHOT: true
OPENCODE_TAG: ${{ github.ref_name }}
GITHUB_TOKEN: ${{ secrets.SST_GITHUB_TOKEN }}
NPM_CONFIG_TOKEN: ${{ secrets.NPM_TOKEN }}

View File

@@ -16,9 +16,7 @@ jobs:
uses: actions/checkout@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest
uses: ./.github/actions/setup-bun
- name: Run stats script
run: bun script/stats.ts

View File

@@ -0,0 +1,34 @@
name: "sync-zed-extension"
on:
workflow_dispatch:
release:
types: [published]
jobs:
zed:
name: Release Zed Extension
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: ./.github/actions/setup-bun
- name: Get version tag
id: get_tag
run: |
if [ "${{ github.event_name }}" = "release" ]; then
TAG="${{ github.event.release.tag_name }}"
else
TAG=$(git tag --list 'v[0-9]*.*' --sort=-version:refname | head -n 1)
fi
echo "tag=${TAG}" >> $GITHUB_OUTPUT
echo "Using tag: ${TAG}"
- name: Sync Zed extension
run: |
./script/sync-zed.ts ${{ steps.get_tag.outputs.tag }}
env:
GITHUB_TOKEN: ${{ secrets.SST_GITHUB_TOKEN }}

View File

@@ -18,15 +18,13 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Bun
uses: oven-sh/setup-bun@v1
with:
bun-version: 1.2.21
uses: ./.github/actions/setup-bun
- name: run
run: |
git config --global user.email "bot@opencode.ai"
git config --global user.name "opencode"
bun install
bun turbo typecheck
bun turbo test
env:
CI: true

View File

@@ -13,12 +13,7 @@ jobs:
uses: actions/checkout@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v1
with:
bun-version: 1.2.21
- name: Install dependencies
run: bun install
uses: ./.github/actions/setup-bun
- name: Run typecheck
run: bun typecheck

4
.gitignore vendored
View File

@@ -5,8 +5,12 @@ node_modules
.env
.idea
.vscode
*~
openapi.json
playground
tmp
dist
.turbo
**/.serena
.serena/
refs

View File

@@ -1,2 +1,2 @@
#!/bin/sh
bun run typecheck
bun typecheck

View File

@@ -13,7 +13,7 @@ avoid repeating the title of the page, should be 5-10 words long
Chunks of text should not be more than 2 sentences long
Each section is spearated by a divider of 3 dashes
Each section is separated by a divider of 3 dashes
The section titles are short with only the first letter of the word capitalized

View File

@@ -1,3 +1,8 @@
---
description: Git commit and push
subtask: true
---
commit and push
make sure it includes a prefix like
@@ -8,5 +13,12 @@ ci:
ignore:
wip:
For anything in the packages/web use the docs: prefix.
For anything in the packages/app use the ignore: prefix.
prefer to explain WHY something was done from an end user perspective instead of
WHAT was done.
do not do generic messages like "improved agent experience" be very specific
about what user facing changes were made

View File

@@ -1,5 +1,5 @@
---
description: hello world
description: hello world iaosd ioasjdoiasjd oisadjoisajd osiajd oisaj dosaij dsoajsajdaijdoisa jdoias jdoias jdoia jois jo jdois jdoias jdoias j djoasdj
---
hey there $ARGUMENTS

View File

@@ -0,0 +1,5 @@
---
description: Spellcheck all markdown file changes
---
Look at all the unstaged changes to markdown (.md, .mdx) files, pull out the lines that have changed, and check for spelling and grammar errors.

11
.opencode/opencode.jsonc Normal file
View File

@@ -0,0 +1,11 @@
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["opencode-openai-codex-auth"],
"provider": {
"opencode": {
"options": {
// "baseURL": "http://localhost:8080",
},
},
},
}

View File

@@ -0,0 +1,223 @@
{
"$schema": "https://opencode.ai/theme.json",
"defs": {
"nord0": "#2E3440",
"nord1": "#3B4252",
"nord2": "#434C5E",
"nord3": "#4C566A",
"nord4": "#D8DEE9",
"nord5": "#E5E9F0",
"nord6": "#ECEFF4",
"nord7": "#8FBCBB",
"nord8": "#88C0D0",
"nord9": "#81A1C1",
"nord10": "#5E81AC",
"nord11": "#BF616A",
"nord12": "#D08770",
"nord13": "#EBCB8B",
"nord14": "#A3BE8C",
"nord15": "#B48EAD"
},
"theme": {
"primary": {
"dark": "nord8",
"light": "nord10"
},
"secondary": {
"dark": "nord9",
"light": "nord9"
},
"accent": {
"dark": "nord7",
"light": "nord7"
},
"error": {
"dark": "nord11",
"light": "nord11"
},
"warning": {
"dark": "nord12",
"light": "nord12"
},
"success": {
"dark": "nord14",
"light": "nord14"
},
"info": {
"dark": "nord8",
"light": "nord10"
},
"text": {
"dark": "nord4",
"light": "nord0"
},
"textMuted": {
"dark": "nord3",
"light": "nord1"
},
"background": {
"dark": "nord0",
"light": "nord6"
},
"backgroundPanel": {
"dark": "nord1",
"light": "nord5"
},
"backgroundElement": {
"dark": "nord1",
"light": "nord4"
},
"border": {
"dark": "nord2",
"light": "nord3"
},
"borderActive": {
"dark": "nord3",
"light": "nord2"
},
"borderSubtle": {
"dark": "nord2",
"light": "nord3"
},
"diffAdded": {
"dark": "nord14",
"light": "nord14"
},
"diffRemoved": {
"dark": "nord11",
"light": "nord11"
},
"diffContext": {
"dark": "nord3",
"light": "nord3"
},
"diffHunkHeader": {
"dark": "nord3",
"light": "nord3"
},
"diffHighlightAdded": {
"dark": "nord14",
"light": "nord14"
},
"diffHighlightRemoved": {
"dark": "nord11",
"light": "nord11"
},
"diffAddedBg": {
"dark": "#3B4252",
"light": "#E5E9F0"
},
"diffRemovedBg": {
"dark": "#3B4252",
"light": "#E5E9F0"
},
"diffContextBg": {
"dark": "nord1",
"light": "nord5"
},
"diffLineNumber": {
"dark": "nord2",
"light": "nord4"
},
"diffAddedLineNumberBg": {
"dark": "#3B4252",
"light": "#E5E9F0"
},
"diffRemovedLineNumberBg": {
"dark": "#3B4252",
"light": "#E5E9F0"
},
"markdownText": {
"dark": "nord4",
"light": "nord0"
},
"markdownHeading": {
"dark": "nord8",
"light": "nord10"
},
"markdownLink": {
"dark": "nord9",
"light": "nord9"
},
"markdownLinkText": {
"dark": "nord7",
"light": "nord7"
},
"markdownCode": {
"dark": "nord14",
"light": "nord14"
},
"markdownBlockQuote": {
"dark": "nord3",
"light": "nord3"
},
"markdownEmph": {
"dark": "nord12",
"light": "nord12"
},
"markdownStrong": {
"dark": "nord13",
"light": "nord13"
},
"markdownHorizontalRule": {
"dark": "nord3",
"light": "nord3"
},
"markdownListItem": {
"dark": "nord8",
"light": "nord10"
},
"markdownListEnumeration": {
"dark": "nord7",
"light": "nord7"
},
"markdownImage": {
"dark": "nord9",
"light": "nord9"
},
"markdownImageText": {
"dark": "nord7",
"light": "nord7"
},
"markdownCodeBlock": {
"dark": "nord4",
"light": "nord0"
},
"syntaxComment": {
"dark": "nord3",
"light": "nord3"
},
"syntaxKeyword": {
"dark": "nord9",
"light": "nord9"
},
"syntaxFunction": {
"dark": "nord8",
"light": "nord8"
},
"syntaxVariable": {
"dark": "nord7",
"light": "nord7"
},
"syntaxString": {
"dark": "nord14",
"light": "nord14"
},
"syntaxNumber": {
"dark": "nord15",
"light": "nord15"
},
"syntaxType": {
"dark": "nord7",
"light": "nord7"
},
"syntaxOperator": {
"dark": "nord9",
"light": "nord9"
},
"syntaxPunctuation": {
"dark": "nord4",
"light": "nord0"
}
}
}

11
.vscode/launch.example.json vendored Normal file
View File

@@ -0,0 +1,11 @@
{
"version": "0.2.0",
"configurations": [
{
"type": "bun",
"request": "attach",
"name": "opencode (attach)",
"url": "ws://localhost:6499/"
}
]
}

5
.vscode/settings.example.json vendored Normal file
View File

@@ -0,0 +1,5 @@
{
"recommendations": [
"oven.bun-vscode"
]
}

View File

@@ -14,3 +14,34 @@
## Debugging
- To test opencode in the `packages/opencode` directory you can run `bun dev`
## Tool Calling
- ALWAYS USE PARALLEL TOOLS WHEN APPLICABLE. Here is an example illustrating how to execute 3 parallel file reads in this chat environment:
json
{
"recipient_name": "multi_tool_use.parallel",
"parameters": {
"tool_uses": [
{
"recipient_name": "functions.read",
"parameters": {
"filePath": "path/to/file.tsx"
}
},
{
"recipient_name": "functions.read",
"parameters": {
"filePath": "path/to/file.ts"
}
},
{
"recipient_name": "functions.read",
"parameters": {
"filePath": "path/to/file.md"
}
}
]
}
}

100
CONTRIBUTING.md Normal file
View File

@@ -0,0 +1,100 @@
# Contributing to OpenCode
We want to make it easy for you to contribute to OpenCode. Here are the most common type of changes that get merged:
- Bug fixes
- Additional LSPs / Formatters
- Improvements to LLM performance
- Support for new providers
- Fixes for environment-specific quirks
- Missing standard behavior
- Documentation improvements
However, any UI or core product feature must go through a design review with the core team before implementation.
If you are unsure if a PR would be accepted, feel free to ask a maintainer or look for issues with any of the following labels:
- [`help wanted`](https://github.com/sst/opencode/issues?q=is%3Aissue%20state%3Aopen%20label%3Ahelp-wanted)
- [`good first issue`](https://github.com/sst/opencode/issues?q=is%3Aissue%20state%3Aopen%20label%3A%22good%20first%20issue%22)
- [`bug`](https://github.com/sst/opencode/issues?q=is%3Aissue%20state%3Aopen%20label%3Abug)
- [`perf`](https://github.com/sst/opencode/issues?q=is%3Aopen%20is%3Aissue%20label%3A%22perf%22)
> [!NOTE]
> PRs that ignore these guardrails will likely be closed.
Want to take on an issue? Leave a comment and a maintainer may assign it to you unless it is something we are already working on.
## Developing OpenCode
- Requirements: Bun 1.3+
- Install dependencies and start the dev server from the repo root:
```bash
bun install
bun dev
```
- Core pieces:
- `packages/opencode`: OpenCode core business logic & server.
- `packages/opencode/src/cli/cmd/tui/`: The TUI code, written in SolidJS with [opentui](https://github.com/sst/opentui)
- `packages/plugin`: Source for `@opencode-ai/plugin`
> [!NOTE]
> After touching `packages/opencode/src/server/server.ts`, run "./packages/sdk/js/script/build.ts" to regenerate the JS sdk.
### Setting up a Debugger
Bun debugging is currently rough around the edges. We hope this guide helps you get set up and avoid some pain points.
The most reliable way to debug OpenCode is to run it manually in a terminal via `bun run --inspect=<url> dev ...` and attach
your debugger via that URL. Other methods can result in breakpoints being mapped incorrectly, at least in VSCode (YMMV).
Caveats:
- `*.tsx` files won't have their breakpoints correctly mapped. This seems due to Bun currently not supporting source maps on code transformed
via `BunPlugin`s (currently necessary due to our dependency on `@opentui/solid`). Currently, the best you can do in terms of debugging `*.tsx`
files is writing a `debugger;` statement. Debugging facilities like stepping won't work, but at least you will be informed if a specific code
is triggered.
- If you want to run the OpenCode TUI and have breakpoints triggered in the server code, you might need to run `bun dev spawn` instead of
the usual `bun dev`. This is because `bun dev` runs the server in a worker thread and breakpoints might not work there.
Other tips and tricks:
- You might want to use `--inspect-wait` or `--inspect-brk` instead of `--inspect`, depending on your workflow
- Specifying `--inspect=ws://localhost:6499/` on every invocation can be tiresome, you may want to `export BUN_OPTIONS=--inspect=ws://localhost:6499/` instead
#### VSCode Setup
If you use VSCode, you can use our example configurations [.vscode/settings.example.json](.vscode/settings.example.json) and [.vscode/launch.example.json](.vscode/launch.example.json).
Some debug methods that can be problematic:
- Debug configurations with `"request": "launch"` can have breakpoints incorrectly mapped and thus unusable
- The same problem arises when running OpenCode in the VSCode `JavaScript Debug Terminal`
With that said, you may want to try these methods, as they might work for you.
## Pull Request Expectations
- Try to keep pull requests small and focused.
- Link relevant issue(s) in the description
- Explain the issue and why your change fixes it
- Avoid having verbose LLM generated PR descriptions
- Before adding new functions or functionality, ensure that such behavior doesn't already exist elsewhere in the codebase.
### Style Preferences
These are not strictly enforced, they are just general guidelines:
- **Functions:** Keep logic within a single function unless breaking it out adds clear reuse or composition benefits.
- **Destructuring:** Do not do unnecessary destructuring of variables.
- **Control flow:** Avoid `else` statements.
- **Error handling:** Prefer `.catch(...)` instead of `try`/`catch` when possible.
- **Types:** Reach for precise types and avoid `any`.
- **Variables:** Stick to immutable patterns and avoid `let`.
- **Naming:** Choose concise single-word identifiers when they remain descriptive.
- **Runtime APIs:** Use Bun helpers such as `Bun.file()` when they fit the use case.
## Feature Requests
For net-new functionality, start with a design conversation. Open an issue describing the problem, your proposed approach (optional), and why it belongs in OpenCode. The core team will help decide whether it should move forward; please wait for that approval instead of opening a feature PR directly.

View File

@@ -1,20 +1,20 @@
<p align="center">
<a href="https://opencode.ai">
<picture>
<source srcset="packages/web/src/assets/logo-ornate-dark.svg" media="(prefers-color-scheme: dark)">
<source srcset="packages/web/src/assets/logo-ornate-light.svg" media="(prefers-color-scheme: light)">
<img src="packages/web/src/assets/logo-ornate-light.svg" alt="opencode logo">
<source srcset="packages/console/app/src/asset/logo-ornate-dark.svg" media="(prefers-color-scheme: dark)">
<source srcset="packages/console/app/src/asset/logo-ornate-light.svg" media="(prefers-color-scheme: light)">
<img src="packages/console/app/src/asset/logo-ornate-light.svg" alt="OpenCode logo">
</picture>
</a>
</p>
<p align="center">AI coding agent, built for the terminal.</p>
<p align="center">The AI coding agent built for the terminal.</p>
<p align="center">
<a href="https://opencode.ai/discord"><img alt="Discord" src="https://img.shields.io/discord/1391832426048651334?style=flat-square&label=discord" /></a>
<a href="https://www.npmjs.com/package/opencode-ai"><img alt="npm" src="https://img.shields.io/npm/v/opencode-ai?style=flat-square" /></a>
<a href="https://github.com/sst/opencode/actions/workflows/publish.yml"><img alt="Build status" src="https://img.shields.io/github/actions/workflow/status/sst/opencode/publish.yml?style=flat-square&branch=dev" /></a>
</p>
[![opencode Terminal UI](packages/web/src/assets/lander/screenshot.png)](https://opencode.ai)
[![OpenCode Terminal UI](packages/web/src/assets/lander/screenshot.png)](https://opencode.ai)
---
@@ -26,8 +26,11 @@ curl -fsSL https://opencode.ai/install | bash
# Package managers
npm i -g opencode-ai@latest # or bun/pnpm/yarn
brew install sst/tap/opencode # macOS and Linux
scoop bucket add extras; scoop install extras/opencode # Windows
choco install opencode # Windows
brew install opencode # macOS and Linux
paru -S opencode-bin # Arch Linux
mise use --pin -g ubi:sst/opencode # Any OS
```
> [!TIP]
@@ -50,45 +53,15 @@ XDG_BIN_DIR=$HOME/.local/bin curl -fsSL https://opencode.ai/install | bash
### Documentation
For more info on how to configure opencode [**head over to our docs**](https://opencode.ai/docs).
For more info on how to configure OpenCode [**head over to our docs**](https://opencode.ai/docs).
### Contributing
opencode is an opinionated tool so any fundamental feature needs to go through a
design process with the core team.
If you're interested in contributing to OpenCode, please read our [contributing docs](./CONTRIBUTING.md) before submitting a pull request.
> [!IMPORTANT]
> We do not accept PRs for core features.
### Building on OpenCode
However we still merge a ton of PRs - you can contribute:
- Bug fixes
- Improvements to LLM performance
- Support for new providers
- Fixes for env specific quirks
- Missing standard behavior
- Documentation
Take a look at the git history to see what kind of PRs we end up merging.
> [!NOTE]
> If you do not follow the above guidelines we might close your PR.
To run opencode locally you need.
- Bun
- Golang 1.24.x
And run.
```bash
$ bun install
$ bun dev
```
#### Development Notes
**API Client**: After making changes to the TypeScript API endpoints in `packages/opencode/src/server/server.ts`, you will need the opencode team to generate a new stainless sdk for the clients.
If you are working on a project that's related to OpenCode and is using "opencode" as a part of its name; for example, "opencode-dashboard" or "opencode-mobile", please add a note to your README to clarify that it is not built by the OpenCode team and is not affiliated with us in anyway.
### FAQ
@@ -97,9 +70,10 @@ $ bun dev
It's very similar to Claude Code in terms of capability. Here are the key differences:
- 100% open source
- Not coupled to any provider. Although Anthropic is recommended, opencode can be used with OpenAI, Google or even local models. As models evolve the gaps between them will close and pricing will drop so being provider-agnostic is important.
- A focus on TUI. opencode is built by neovim users and the creators of [terminal.shop](https://terminal.shop); we are going to push the limits of what's possible in the terminal.
- A client/server architecture. This for example can allow opencode to run on your computer, while you can drive it remotely from a mobile app. Meaning that the TUI frontend is just one of the possible clients.
- Not coupled to any provider. Although Anthropic is recommended, OpenCode can be used with OpenAI, Google or even local models. As models evolve the gaps between them will close and pricing will drop so being provider-agnostic is important.
- Out of the box LSP support
- A focus on TUI. OpenCode is built by neovim users and the creators of [terminal.shop](https://terminal.shop); we are going to push the limits of what's possible in the terminal.
- A client/server architecture. This for example can allow OpenCode to run on your computer, while you can drive it remotely from a mobile app. Meaning that the TUI frontend is just one of the possible clients.
#### What's the other repo?

239
STATS.md
View File

@@ -1,98 +1,145 @@
# Download Stats
| Date | GitHub Downloads | npm Downloads | Total |
| ---------- | ---------------- | ----------------- | ----------------- |
| 2025-06-29 | 18,789 (+0) | 39,420 (+0) | 58,209 (+0) |
| 2025-06-30 | 20,127 (+1,338) | 41,059 (+1,639) | 61,186 (+2,977) |
| 2025-07-01 | 22,108 (+1,981) | 43,745 (+2,686) | 65,853 (+4,667) |
| 2025-07-02 | 24,814 (+2,706) | 46,168 (+2,423) | 70,982 (+5,129) |
| 2025-07-03 | 27,834 (+3,020) | 49,955 (+3,787) | 77,789 (+6,807) |
| 2025-07-04 | 30,608 (+2,774) | 54,758 (+4,803) | 85,366 (+7,577) |
| 2025-07-05 | 32,524 (+1,916) | 58,371 (+3,613) | 90,895 (+5,529) |
| 2025-07-06 | 33,766 (+1,242) | 59,694 (+1,323) | 93,460 (+2,565) |
| 2025-07-08 | 38,052 (+4,286) | 64,468 (+4,774) | 102,520 (+9,060) |
| 2025-07-09 | 40,924 (+2,872) | 67,935 (+3,467) | 108,859 (+6,339) |
| 2025-07-10 | 43,796 (+2,872) | 71,402 (+3,467) | 115,198 (+6,339) |
| 2025-07-11 | 46,982 (+3,186) | 77,462 (+6,060) | 124,444 (+9,246) |
| 2025-07-12 | 49,302 (+2,320) | 82,177 (+4,715) | 131,479 (+7,035) |
| 2025-07-13 | 50,803 (+1,501) | 86,394 (+4,217) | 137,197 (+5,718) |
| 2025-07-14 | 53,283 (+2,480) | 87,860 (+1,466) | 141,143 (+3,946) |
| 2025-07-15 | 57,590 (+4,307) | 91,036 (+3,176) | 148,626 (+7,483) |
| 2025-07-16 | 62,313 (+4,723) | 95,258 (+4,222) | 157,571 (+8,945) |
| 2025-07-17 | 66,684 (+4,371) | 100,048 (+4,790) | 166,732 (+9,161) |
| 2025-07-18 | 70,379 (+3,695) | 102,587 (+2,539) | 172,966 (+6,234) |
| 2025-07-19 | 73,497 (+3,117) | 105,904 (+3,317) | 179,401 (+6,434) |
| 2025-07-20 | 76,453 (+2,956) | 109,044 (+3,140) | 185,497 (+6,096) |
| 2025-07-21 | 80,197 (+3,744) | 113,537 (+4,493) | 193,734 (+8,237) |
| 2025-07-22 | 84,251 (+4,054) | 118,073 (+4,536) | 202,324 (+8,590) |
| 2025-07-23 | 88,589 (+4,338) | 121,436 (+3,363) | 210,025 (+7,701) |
| 2025-07-24 | 92,469 (+3,880) | 124,091 (+2,655) | 216,560 (+6,535) |
| 2025-07-25 | 96,417 (+3,948) | 126,985 (+2,894) | 223,402 (+6,842) |
| 2025-07-26 | 100,646 (+4,229) | 131,411 (+4,426) | 232,057 (+8,655) |
| 2025-07-27 | 102,644 (+1,998) | 134,736 (+3,325) | 237,380 (+5,323) |
| 2025-07-28 | 105,446 (+2,802) | 136,016 (+1,280) | 241,462 (+4,082) |
| 2025-07-29 | 108,998 (+3,552) | 137,542 (+1,526) | 246,540 (+5,078) |
| 2025-07-30 | 113,544 (+4,546) | 140,317 (+2,775) | 253,861 (+7,321) |
| 2025-07-31 | 118,339 (+4,795) | 143,344 (+3,027) | 261,683 (+7,822) |
| 2025-08-01 | 123,539 (+5,200) | 146,680 (+3,336) | 270,219 (+8,536) |
| 2025-08-02 | 127,864 (+4,325) | 149,236 (+2,556) | 277,100 (+6,881) |
| 2025-08-03 | 131,397 (+3,533) | 150,451 (+1,215) | 281,848 (+4,748) |
| 2025-08-04 | 136,266 (+4,869) | 153,260 (+2,809) | 289,526 (+7,678) |
| 2025-08-05 | 141,596 (+5,330) | 155,752 (+2,492) | 297,348 (+7,822) |
| 2025-08-06 | 147,067 (+5,471) | 158,309 (+2,557) | 305,376 (+8,028) |
| 2025-08-07 | 152,591 (+5,524) | 160,889 (+2,580) | 313,480 (+8,104) |
| 2025-08-08 | 158,187 (+5,596) | 163,448 (+2,559) | 321,635 (+8,155) |
| 2025-08-09 | 162,770 (+4,583) | 165,721 (+2,273) | 328,491 (+6,856) |
| 2025-08-10 | 165,695 (+2,925) | 167,109 (+1,388) | 332,804 (+4,313) |
| 2025-08-11 | 169,297 (+3,602) | 167,953 (+844) | 337,250 (+4,446) |
| 2025-08-12 | 176,307 (+7,010) | 171,876 (+3,923) | 348,183 (+10,933) |
| 2025-08-13 | 182,997 (+6,690) | 177,182 (+5,306) | 360,179 (+11,996) |
| 2025-08-14 | 189,063 (+6,066) | 179,741 (+2,559) | 368,804 (+8,625) |
| 2025-08-15 | 193,608 (+4,545) | 181,792 (+2,051) | 375,400 (+6,596) |
| 2025-08-16 | 198,118 (+4,510) | 184,558 (+2,766) | 382,676 (+7,276) |
| 2025-08-17 | 201,299 (+3,181) | 186,269 (+1,711) | 387,568 (+4,892) |
| 2025-08-18 | 204,559 (+3,260) | 187,399 (+1,130) | 391,958 (+4,390) |
| 2025-08-19 | 209,814 (+5,255) | 189,668 (+2,269) | 399,482 (+7,524) |
| 2025-08-20 | 214,497 (+4,683) | 191,481 (+1,813) | 405,978 (+6,496) |
| 2025-08-21 | 220,465 (+5,968) | 194,784 (+3,303) | 415,249 (+9,271) |
| 2025-08-22 | 225,899 (+5,434) | 197,204 (+2,420) | 423,103 (+7,854) |
| 2025-08-23 | 229,005 (+3,106) | 199,238 (+2,034) | 428,243 (+5,140) |
| 2025-08-24 | 232,098 (+3,093) | 201,157 (+1,919) | 433,255 (+5,012) |
| 2025-08-25 | 236,607 (+4,509) | 202,650 (+1,493) | 439,257 (+6,002) |
| 2025-08-26 | 242,783 (+6,176) | 205,242 (+2,592) | 448,025 (+8,768) |
| 2025-08-27 | 248,409 (+5,626) | 205,242 (+0) | 453,651 (+5,626) |
| 2025-08-28 | 252,796 (+4,387) | 205,242 (+0) | 458,038 (+4,387) |
| 2025-08-29 | 256,045 (+3,249) | 211,075 (+5,833) | 467,120 (+9,082) |
| 2025-08-30 | 258,863 (+2,818) | 212,397 (+1,322) | 471,260 (+4,140) |
| 2025-08-31 | 262,004 (+3,141) | 213,944 (+1,547) | 475,948 (+4,688) |
| 2025-09-01 | 265,359 (+3,355) | 215,115 (+1,171) | 480,474 (+4,526) |
| 2025-09-02 | 270,483 (+5,124) | 217,075 (+1,960) | 487,558 (+7,084) |
| 2025-09-03 | 274,793 (+4,310) | 219,755 (+2,680) | 494,548 (+6,990) |
| 2025-09-04 | 280,430 (+5,637) | 222,103 (+2,348) | 502,533 (+7,985) |
| 2025-09-05 | 283,769 (+3,339) | 223,793 (+1,690) | 507,562 (+5,029) |
| 2025-09-06 | 286,245 (+2,476) | 225,036 (+1,243) | 511,281 (+3,719) |
| 2025-09-07 | 288,623 (+2,378) | 225,866 (+830) | 514,489 (+3,208) |
| 2025-09-08 | 293,341 (+4,718) | 227,073 (+1,207) | 520,414 (+5,925) |
| 2025-09-09 | 300,036 (+6,695) | 229,788 (+2,715) | 529,824 (+9,410) |
| 2025-09-10 | 307,287 (+7,251) | 233,435 (+3,647) | 540,722 (+10,898) |
| 2025-09-11 | 314,083 (+6,796) | 237,356 (+3,921) | 551,439 (+10,717) |
| 2025-09-12 | 321,046 (+6,963) | 240,728 (+3,372) | 561,774 (+10,335) |
| 2025-09-13 | 324,894 (+3,848) | 245,539 (+4,811) | 570,433 (+8,659) |
| 2025-09-14 | 328,876 (+3,982) | 248,245 (+2,706) | 577,121 (+6,688) |
| 2025-09-15 | 334,201 (+5,325) | 250,983 (+2,738) | 585,184 (+8,063) |
| 2025-09-16 | 342,609 (+8,408) | 255,264 (+4,281) | 597,873 (+12,689) |
| 2025-09-17 | 351,117 (+8,508) | 260,970 (+5,706) | 612,087 (+14,214) |
| 2025-09-18 | 358,717 (+7,600) | 266,922 (+5,952) | 625,639 (+13,552) |
| 2025-09-19 | 365,401 (+6,684) | 271,859 (+4,937) | 637,260 (+11,621) |
| 2025-09-20 | 372,092 (+6,691) | 276,917 (+5,058) | 649,009 (+11,749) |
| 2025-09-21 | 377,079 (+4,987) | 280,261 (+3,344) | 657,340 (+8,331) |
| 2025-09-22 | 382,492 (+5,413) | 284,009 (+3,748) | 666,501 (+9,161) |
| 2025-09-23 | 387,008 (+4,516) | 289,129 (+5,120) | 676,137 (+9,636) |
| 2025-09-24 | 393,325 (+6,317) | 294,927 (+5,798) | 688,252 (+12,115) |
| 2025-09-25 | 398,879 (+5,554) | 301,663 (+6,736) | 700,542 (+12,290) |
| 2025-09-26 | 404,334 (+5,455) | 306,713 (+5,050) | 711,047 (+10,505) |
| 2025-09-27 | 411,618 (+7,284) | 317,763 (+11,050) | 729,381 (+18,334) |
| 2025-09-28 | 414,910 (+3,292) | 322,522 (+4,759) | 737,432 (+8,051) |
| 2025-09-29 | 419,919 (+5,009) | 328,033 (+5,511) | 747,952 (+10,520) |
| 2025-09-30 | 427,991 (+8,072) | 336,472 (+8,439) | 764,463 (+16,511) |
| 2025-10-01 | 433,591 (+5,600) | 341,742 (+5,270) | 775,333 (+10,870) |
| Date | GitHub Downloads | npm Downloads | Total |
| ---------- | ----------------- | ----------------- | ------------------- |
| 2025-06-29 | 18,789 (+0) | 39,420 (+0) | 58,209 (+0) |
| 2025-06-30 | 20,127 (+1,338) | 41,059 (+1,639) | 61,186 (+2,977) |
| 2025-07-01 | 22,108 (+1,981) | 43,745 (+2,686) | 65,853 (+4,667) |
| 2025-07-02 | 24,814 (+2,706) | 46,168 (+2,423) | 70,982 (+5,129) |
| 2025-07-03 | 27,834 (+3,020) | 49,955 (+3,787) | 77,789 (+6,807) |
| 2025-07-04 | 30,608 (+2,774) | 54,758 (+4,803) | 85,366 (+7,577) |
| 2025-07-05 | 32,524 (+1,916) | 58,371 (+3,613) | 90,895 (+5,529) |
| 2025-07-06 | 33,766 (+1,242) | 59,694 (+1,323) | 93,460 (+2,565) |
| 2025-07-08 | 38,052 (+4,286) | 64,468 (+4,774) | 102,520 (+9,060) |
| 2025-07-09 | 40,924 (+2,872) | 67,935 (+3,467) | 108,859 (+6,339) |
| 2025-07-10 | 43,796 (+2,872) | 71,402 (+3,467) | 115,198 (+6,339) |
| 2025-07-11 | 46,982 (+3,186) | 77,462 (+6,060) | 124,444 (+9,246) |
| 2025-07-12 | 49,302 (+2,320) | 82,177 (+4,715) | 131,479 (+7,035) |
| 2025-07-13 | 50,803 (+1,501) | 86,394 (+4,217) | 137,197 (+5,718) |
| 2025-07-14 | 53,283 (+2,480) | 87,860 (+1,466) | 141,143 (+3,946) |
| 2025-07-15 | 57,590 (+4,307) | 91,036 (+3,176) | 148,626 (+7,483) |
| 2025-07-16 | 62,313 (+4,723) | 95,258 (+4,222) | 157,571 (+8,945) |
| 2025-07-17 | 66,684 (+4,371) | 100,048 (+4,790) | 166,732 (+9,161) |
| 2025-07-18 | 70,379 (+3,695) | 102,587 (+2,539) | 172,966 (+6,234) |
| 2025-07-19 | 73,497 (+3,117) | 105,904 (+3,317) | 179,401 (+6,434) |
| 2025-07-20 | 76,453 (+2,956) | 109,044 (+3,140) | 185,497 (+6,096) |
| 2025-07-21 | 80,197 (+3,744) | 113,537 (+4,493) | 193,734 (+8,237) |
| 2025-07-22 | 84,251 (+4,054) | 118,073 (+4,536) | 202,324 (+8,590) |
| 2025-07-23 | 88,589 (+4,338) | 121,436 (+3,363) | 210,025 (+7,701) |
| 2025-07-24 | 92,469 (+3,880) | 124,091 (+2,655) | 216,560 (+6,535) |
| 2025-07-25 | 96,417 (+3,948) | 126,985 (+2,894) | 223,402 (+6,842) |
| 2025-07-26 | 100,646 (+4,229) | 131,411 (+4,426) | 232,057 (+8,655) |
| 2025-07-27 | 102,644 (+1,998) | 134,736 (+3,325) | 237,380 (+5,323) |
| 2025-07-28 | 105,446 (+2,802) | 136,016 (+1,280) | 241,462 (+4,082) |
| 2025-07-29 | 108,998 (+3,552) | 137,542 (+1,526) | 246,540 (+5,078) |
| 2025-07-30 | 113,544 (+4,546) | 140,317 (+2,775) | 253,861 (+7,321) |
| 2025-07-31 | 118,339 (+4,795) | 143,344 (+3,027) | 261,683 (+7,822) |
| 2025-08-01 | 123,539 (+5,200) | 146,680 (+3,336) | 270,219 (+8,536) |
| 2025-08-02 | 127,864 (+4,325) | 149,236 (+2,556) | 277,100 (+6,881) |
| 2025-08-03 | 131,397 (+3,533) | 150,451 (+1,215) | 281,848 (+4,748) |
| 2025-08-04 | 136,266 (+4,869) | 153,260 (+2,809) | 289,526 (+7,678) |
| 2025-08-05 | 141,596 (+5,330) | 155,752 (+2,492) | 297,348 (+7,822) |
| 2025-08-06 | 147,067 (+5,471) | 158,309 (+2,557) | 305,376 (+8,028) |
| 2025-08-07 | 152,591 (+5,524) | 160,889 (+2,580) | 313,480 (+8,104) |
| 2025-08-08 | 158,187 (+5,596) | 163,448 (+2,559) | 321,635 (+8,155) |
| 2025-08-09 | 162,770 (+4,583) | 165,721 (+2,273) | 328,491 (+6,856) |
| 2025-08-10 | 165,695 (+2,925) | 167,109 (+1,388) | 332,804 (+4,313) |
| 2025-08-11 | 169,297 (+3,602) | 167,953 (+844) | 337,250 (+4,446) |
| 2025-08-12 | 176,307 (+7,010) | 171,876 (+3,923) | 348,183 (+10,933) |
| 2025-08-13 | 182,997 (+6,690) | 177,182 (+5,306) | 360,179 (+11,996) |
| 2025-08-14 | 189,063 (+6,066) | 179,741 (+2,559) | 368,804 (+8,625) |
| 2025-08-15 | 193,608 (+4,545) | 181,792 (+2,051) | 375,400 (+6,596) |
| 2025-08-16 | 198,118 (+4,510) | 184,558 (+2,766) | 382,676 (+7,276) |
| 2025-08-17 | 201,299 (+3,181) | 186,269 (+1,711) | 387,568 (+4,892) |
| 2025-08-18 | 204,559 (+3,260) | 187,399 (+1,130) | 391,958 (+4,390) |
| 2025-08-19 | 209,814 (+5,255) | 189,668 (+2,269) | 399,482 (+7,524) |
| 2025-08-20 | 214,497 (+4,683) | 191,481 (+1,813) | 405,978 (+6,496) |
| 2025-08-21 | 220,465 (+5,968) | 194,784 (+3,303) | 415,249 (+9,271) |
| 2025-08-22 | 225,899 (+5,434) | 197,204 (+2,420) | 423,103 (+7,854) |
| 2025-08-23 | 229,005 (+3,106) | 199,238 (+2,034) | 428,243 (+5,140) |
| 2025-08-24 | 232,098 (+3,093) | 201,157 (+1,919) | 433,255 (+5,012) |
| 2025-08-25 | 236,607 (+4,509) | 202,650 (+1,493) | 439,257 (+6,002) |
| 2025-08-26 | 242,783 (+6,176) | 205,242 (+2,592) | 448,025 (+8,768) |
| 2025-08-27 | 248,409 (+5,626) | 205,242 (+0) | 453,651 (+5,626) |
| 2025-08-28 | 252,796 (+4,387) | 205,242 (+0) | 458,038 (+4,387) |
| 2025-08-29 | 256,045 (+3,249) | 211,075 (+5,833) | 467,120 (+9,082) |
| 2025-08-30 | 258,863 (+2,818) | 212,397 (+1,322) | 471,260 (+4,140) |
| 2025-08-31 | 262,004 (+3,141) | 213,944 (+1,547) | 475,948 (+4,688) |
| 2025-09-01 | 265,359 (+3,355) | 215,115 (+1,171) | 480,474 (+4,526) |
| 2025-09-02 | 270,483 (+5,124) | 217,075 (+1,960) | 487,558 (+7,084) |
| 2025-09-03 | 274,793 (+4,310) | 219,755 (+2,680) | 494,548 (+6,990) |
| 2025-09-04 | 280,430 (+5,637) | 222,103 (+2,348) | 502,533 (+7,985) |
| 2025-09-05 | 283,769 (+3,339) | 223,793 (+1,690) | 507,562 (+5,029) |
| 2025-09-06 | 286,245 (+2,476) | 225,036 (+1,243) | 511,281 (+3,719) |
| 2025-09-07 | 288,623 (+2,378) | 225,866 (+830) | 514,489 (+3,208) |
| 2025-09-08 | 293,341 (+4,718) | 227,073 (+1,207) | 520,414 (+5,925) |
| 2025-09-09 | 300,036 (+6,695) | 229,788 (+2,715) | 529,824 (+9,410) |
| 2025-09-10 | 307,287 (+7,251) | 233,435 (+3,647) | 540,722 (+10,898) |
| 2025-09-11 | 314,083 (+6,796) | 237,356 (+3,921) | 551,439 (+10,717) |
| 2025-09-12 | 321,046 (+6,963) | 240,728 (+3,372) | 561,774 (+10,335) |
| 2025-09-13 | 324,894 (+3,848) | 245,539 (+4,811) | 570,433 (+8,659) |
| 2025-09-14 | 328,876 (+3,982) | 248,245 (+2,706) | 577,121 (+6,688) |
| 2025-09-15 | 334,201 (+5,325) | 250,983 (+2,738) | 585,184 (+8,063) |
| 2025-09-16 | 342,609 (+8,408) | 255,264 (+4,281) | 597,873 (+12,689) |
| 2025-09-17 | 351,117 (+8,508) | 260,970 (+5,706) | 612,087 (+14,214) |
| 2025-09-18 | 358,717 (+7,600) | 266,922 (+5,952) | 625,639 (+13,552) |
| 2025-09-19 | 365,401 (+6,684) | 271,859 (+4,937) | 637,260 (+11,621) |
| 2025-09-20 | 372,092 (+6,691) | 276,917 (+5,058) | 649,009 (+11,749) |
| 2025-09-21 | 377,079 (+4,987) | 280,261 (+3,344) | 657,340 (+8,331) |
| 2025-09-22 | 382,492 (+5,413) | 284,009 (+3,748) | 666,501 (+9,161) |
| 2025-09-23 | 387,008 (+4,516) | 289,129 (+5,120) | 676,137 (+9,636) |
| 2025-09-24 | 393,325 (+6,317) | 294,927 (+5,798) | 688,252 (+12,115) |
| 2025-09-25 | 398,879 (+5,554) | 301,663 (+6,736) | 700,542 (+12,290) |
| 2025-09-26 | 404,334 (+5,455) | 306,713 (+5,050) | 711,047 (+10,505) |
| 2025-09-27 | 411,618 (+7,284) | 317,763 (+11,050) | 729,381 (+18,334) |
| 2025-09-28 | 414,910 (+3,292) | 322,522 (+4,759) | 737,432 (+8,051) |
| 2025-09-29 | 419,919 (+5,009) | 328,033 (+5,511) | 747,952 (+10,520) |
| 2025-09-30 | 427,991 (+8,072) | 336,472 (+8,439) | 764,463 (+16,511) |
| 2025-10-01 | 433,591 (+5,600) | 341,742 (+5,270) | 775,333 (+10,870) |
| 2025-10-02 | 440,852 (+7,261) | 348,099 (+6,357) | 788,951 (+13,618) |
| 2025-10-03 | 446,829 (+5,977) | 359,937 (+11,838) | 806,766 (+17,815) |
| 2025-10-04 | 452,561 (+5,732) | 370,386 (+10,449) | 822,947 (+16,181) |
| 2025-10-05 | 455,559 (+2,998) | 374,745 (+4,359) | 830,304 (+7,357) |
| 2025-10-06 | 460,927 (+5,368) | 379,489 (+4,744) | 840,416 (+10,112) |
| 2025-10-07 | 467,336 (+6,409) | 385,438 (+5,949) | 852,774 (+12,358) |
| 2025-10-08 | 474,643 (+7,307) | 394,139 (+8,701) | 868,782 (+16,008) |
| 2025-10-09 | 479,203 (+4,560) | 400,526 (+6,387) | 879,729 (+10,947) |
| 2025-10-10 | 484,374 (+5,171) | 406,015 (+5,489) | 890,389 (+10,660) |
| 2025-10-11 | 488,427 (+4,053) | 414,699 (+8,684) | 903,126 (+12,737) |
| 2025-10-12 | 492,125 (+3,698) | 418,745 (+4,046) | 910,870 (+7,744) |
| 2025-10-14 | 505,130 (+13,005) | 429,286 (+10,541) | 934,416 (+23,546) |
| 2025-10-15 | 512,717 (+7,587) | 439,290 (+10,004) | 952,007 (+17,591) |
| 2025-10-16 | 517,719 (+5,002) | 447,137 (+7,847) | 964,856 (+12,849) |
| 2025-10-17 | 526,239 (+8,520) | 457,467 (+10,330) | 983,706 (+18,850) |
| 2025-10-18 | 531,564 (+5,325) | 465,272 (+7,805) | 996,836 (+13,130) |
| 2025-10-19 | 536,209 (+4,645) | 469,078 (+3,806) | 1,005,287 (+8,451) |
| 2025-10-20 | 541,264 (+5,055) | 472,952 (+3,874) | 1,014,216 (+8,929) |
| 2025-10-21 | 548,721 (+7,457) | 479,703 (+6,751) | 1,028,424 (+14,208) |
| 2025-10-22 | 557,949 (+9,228) | 491,395 (+11,692) | 1,049,344 (+20,920) |
| 2025-10-23 | 564,716 (+6,767) | 498,736 (+7,341) | 1,063,452 (+14,108) |
| 2025-10-24 | 572,692 (+7,976) | 506,905 (+8,169) | 1,079,597 (+16,145) |
| 2025-10-25 | 578,927 (+6,235) | 516,129 (+9,224) | 1,095,056 (+15,459) |
| 2025-10-26 | 584,409 (+5,482) | 521,179 (+5,050) | 1,105,588 (+10,532) |
| 2025-10-27 | 589,999 (+5,590) | 526,001 (+4,822) | 1,116,000 (+10,412) |
| 2025-10-28 | 595,776 (+5,777) | 532,438 (+6,437) | 1,128,214 (+12,214) |
| 2025-10-29 | 606,259 (+10,483) | 542,064 (+9,626) | 1,148,323 (+20,109) |
| 2025-10-30 | 613,746 (+7,487) | 542,064 (+0) | 1,155,810 (+7,487) |
| 2025-10-30 | 617,846 (+4,100) | 555,026 (+12,962) | 1,172,872 (+17,062) |
| 2025-10-31 | 626,612 (+8,766) | 564,579 (+9,553) | 1,191,191 (+18,319) |
| 2025-11-01 | 636,100 (+9,488) | 581,806 (+17,227) | 1,217,906 (+26,715) |
| 2025-11-02 | 644,067 (+7,967) | 590,004 (+8,198) | 1,234,071 (+16,165) |
| 2025-11-03 | 653,130 (+9,063) | 597,139 (+7,135) | 1,250,269 (+16,198) |
| 2025-11-04 | 663,912 (+10,782) | 608,056 (+10,917) | 1,271,968 (+21,699) |
| 2025-11-05 | 675,074 (+11,162) | 619,690 (+11,634) | 1,294,764 (+22,796) |
| 2025-11-06 | 686,252 (+11,178) | 630,885 (+11,195) | 1,317,137 (+22,373) |
| 2025-11-07 | 696,646 (+10,394) | 642,146 (+11,261) | 1,338,792 (+21,655) |
| 2025-11-08 | 706,035 (+9,389) | 653,489 (+11,343) | 1,359,524 (+20,732) |
| 2025-11-09 | 713,462 (+7,427) | 660,459 (+6,970) | 1,373,921 (+14,397) |
| 2025-11-10 | 722,288 (+8,826) | 668,225 (+7,766) | 1,390,513 (+16,592) |
| 2025-11-11 | 729,769 (+7,481) | 677,501 (+9,276) | 1,407,270 (+16,757) |
| 2025-11-12 | 740,180 (+10,411) | 686,454 (+8,953) | 1,426,634 (+19,364) |
| 2025-11-13 | 749,905 (+9,725) | 696,157 (+9,703) | 1,446,062 (+19,428) |
| 2025-11-14 | 759,928 (+10,023) | 705,237 (+9,080) | 1,465,165 (+19,103) |
| 2025-11-15 | 765,955 (+6,027) | 712,870 (+7,633) | 1,478,825 (+13,660) |
| 2025-11-16 | 771,069 (+5,114) | 716,596 (+3,726) | 1,487,665 (+8,840) |
| 2025-11-17 | 780,161 (+9,092) | 723,339 (+6,743) | 1,503,500 (+15,835) |

1750
bun.lock

File diff suppressed because it is too large Load Diff

View File

@@ -1,2 +1,2 @@
[install]
exact = true
exact = true

View File

@@ -104,7 +104,7 @@ To test locally:
- `MODEL`: The model used by opencode. Same as the `MODEL` defined in the GitHub workflow.
- `ANTHROPIC_API_KEY`: Your model provider API key. Same as the keys defined in the GitHub workflow.
- `GITHUB_RUN_ID`: Dummy value to emulate GitHub action environment.
- `MOCK_TOKEN`: A GitHub persontal access token. This token is used to verify you have `admin` or `write` access to the test repo. Generate a token [here](https://github.com/settings/personal-access-tokens).
- `MOCK_TOKEN`: A GitHub personal access token. This token is used to verify you have `admin` or `write` access to the test repo. Generate a token [here](https://github.com/settings/personal-access-tokens).
- `MOCK_EVENT`: Mock GitHub event payload (see templates below).
- `/path/to/opencode`: Path to your cloned opencode repo. `bun /path/to/opencode/github/index.ts` runs your local version of `opencode`.
@@ -118,7 +118,7 @@ Replace:
- `"owner":"sst"` with repo owner
- `"repo":"hello-world"` with repo name
- `"actor":"fwang"` with the GitHub username of commentor
- `"actor":"fwang"` with the GitHub username of commenter
- `"number":4` with the GitHub issue id
- `"body":"hey opencode, summarize thread"` with comment body

View File

@@ -6,15 +6,11 @@ branding:
inputs:
model:
description: "The model to use with opencode. Takes the format of `provider/model`."
description: "Model to use"
required: true
share:
description: "Whether to share the opencode session. Defaults to true for public repositories."
required: false
token:
description: "Optional GitHub access token for performing operations such as creating comments, committing changes, and opening pull requests. Defaults to the installation access token from the opencode GitHub App."
description: "Share the opencode session (defaults to true for public repos)"
required: false
runs:
@@ -24,20 +20,10 @@ runs:
shell: bash
run: curl -fsSL https://opencode.ai/install | bash
- name: Install bun
shell: bash
run: npm install -g bun
- name: Install dependencies
shell: bash
run: |
cd ${GITHUB_ACTION_PATH}
bun install
- name: Run opencode
shell: bash
run: bun ${GITHUB_ACTION_PATH}/index.ts
id: run_opencode
run: opencode github run
env:
MODEL: ${{ inputs.model }}
SHARE: ${{ inputs.share }}
TOKEN: ${{ inputs.token }}

View File

@@ -152,6 +152,9 @@ try {
return session.id.slice(-8)
})()
console.log("opencode session", session.id)
if (shareId) {
console.log("Share link:", `${useShareUrl()}/s/${shareId}`)
}
// Handle 3 cases
// 1. Issue
@@ -730,12 +733,13 @@ async function updateComment(body: string) {
async function createPR(base: string, branch: string, title: string, body: string) {
console.log("Creating pull request...")
const { repo } = useContext()
const truncatedTitle = title.length > 256 ? title.slice(0, 253) + "..." : title
const pr = await octoRest.rest.pulls.create({
owner: repo.owner,
repo: repo.repo,
head: branch,
base,
title,
title: truncatedTitle,
body,
})
return pr.data.number

View File

@@ -14,6 +14,6 @@
"@actions/github": "6.0.1",
"@octokit/graphql": "9.0.1",
"@octokit/rest": "22.0.0",
"@opencode-ai/sdk": "0.5.4"
"@opencode-ai/sdk": "workspace:*"
}
}

2
github/sst-env.d.ts vendored
View File

@@ -6,4 +6,4 @@
/// <reference path="../sst-env.d.ts" />
import "sst"
export {}
export {}

View File

@@ -3,6 +3,7 @@ import { domain } from "./stage"
const GITHUB_APP_ID = new sst.Secret("GITHUB_APP_ID")
const GITHUB_APP_PRIVATE_KEY = new sst.Secret("GITHUB_APP_PRIVATE_KEY")
export const EMAILOCTOPUS_API_KEY = new sst.Secret("EMAILOCTOPUS_API_KEY")
const ADMIN_SECRET = new sst.Secret("ADMIN_SECRET")
const bucket = new sst.cloudflare.Bucket("Bucket")
export const api = new sst.cloudflare.Worker("Api", {
@@ -12,7 +13,7 @@ export const api = new sst.cloudflare.Worker("Api", {
WEB_DOMAIN: domain,
},
url: true,
link: [bucket, GITHUB_APP_ID, GITHUB_APP_PRIVATE_KEY],
link: [bucket, GITHUB_APP_ID, GITHUB_APP_PRIVATE_KEY, ADMIN_SECRET],
transform: {
worker: (args) => {
args.logpush = true

View File

@@ -97,7 +97,8 @@ export const stripeWebhook = new stripe.WebhookEndpoint("StripeWebhookEndpoint",
],
})
const ZEN_MODELS = new sst.Secret("ZEN_MODELS")
const ZEN_MODELS1 = new sst.Secret("ZEN_MODELS1")
const ZEN_MODELS2 = new sst.Secret("ZEN_MODELS2")
const STRIPE_SECRET_KEY = new sst.Secret("STRIPE_SECRET_KEY")
const AUTH_API_URL = new sst.Linkable("AUTH_API_URL", {
properties: { value: auth.url.apply((url) => url!) },
@@ -105,6 +106,7 @@ const AUTH_API_URL = new sst.Linkable("AUTH_API_URL", {
const STRIPE_WEBHOOK_SECRET = new sst.Linkable("STRIPE_WEBHOOK_SECRET", {
properties: { value: stripeWebhook.secret },
})
const gatewayKv = new sst.cloudflare.Kv("GatewayKv")
////////////////
// CONSOLE
@@ -130,10 +132,18 @@ new sst.cloudflare.x.SolidStart("Console", {
AUTH_API_URL,
STRIPE_WEBHOOK_SECRET,
STRIPE_SECRET_KEY,
ZEN_MODELS,
ZEN_MODELS1,
ZEN_MODELS2,
EMAILOCTOPUS_API_KEY,
AWS_SES_ACCESS_KEY_ID,
AWS_SES_SECRET_ACCESS_KEY,
...($dev
? [
new sst.Secret("CLOUDFLARE_DEFAULT_ACCOUNT_ID", process.env.CLOUDFLARE_DEFAULT_ACCOUNT_ID!),
new sst.Secret("CLOUDFLARE_API_TOKEN", process.env.CLOUDFLARE_API_TOKEN!),
]
: []),
gatewayKv,
],
environment: {
//VITE_DOCS_URL: web.url.apply((url) => url!),

View File

@@ -2,7 +2,7 @@ import { domain } from "./stage"
new sst.cloudflare.StaticSite("Desktop", {
domain: "desktop." + domain,
path: "packages/app",
path: "packages/desktop",
build: {
command: "bun turbo build",
output: "./dist",

View File

@@ -6,8 +6,8 @@ export const domain = (() => {
export const zoneID = "430ba34c138cfb5360826c4909f99be8"
// new cloudflare.RegionalHostname("RegionalHostname", {
// hostname: domain,
// regionKey: "us",
// zoneId: zoneID,
// })
new cloudflare.RegionalHostname("RegionalHostname", {
hostname: domain,
regionKey: "us",
zoneId: zoneID,
})

13
install
View File

@@ -10,10 +10,14 @@ NC='\033[0m' # No Color
requested_version=${VERSION:-}
os=$(uname -s | tr '[:upper:]' '[:lower:]')
if [[ "$os" == "darwin" ]]; then
os="darwin"
fi
raw_os=$(uname -s)
os=$(echo "$raw_os" | tr '[:upper:]' '[:lower:]')
# Normalize various Unix-like identifiers
case "$raw_os" in
Darwin*) os="darwin" ;;
Linux*) os="linux" ;;
MINGW*|MSYS*|CYGWIN*) os="windows" ;;
esac
arch=$(uname -m)
if [[ "$arch" == "aarch64" ]]; then
@@ -96,6 +100,7 @@ download_and_install() {
curl -# -L -o "$filename" "$url"
unzip -q "$filename"
mv opencode "$INSTALL_DIR"
chmod 755 "${INSTALL_DIR}/opencode"
cd .. && rm -rf opencodetmp
}

View File

@@ -0,0 +1,15 @@
{
"keep": {
"days": true,
"amount": 14
},
"auditLog": "/home/thdxr/dev/projects/sst/opencode/logs/.2c5480b3b2480f80fa29b850af461dce619c0b2f-audit.json",
"files": [
{
"date": 1759827172859,
"name": "/home/thdxr/dev/projects/sst/opencode/logs/mcp-puppeteer-2025-10-07.log",
"hash": "a3d98b26edd793411b968a0d24cfeee8332138e282023c3b83ec169d55c67f16"
}
],
"hashType": "sha256"
}

View File

@@ -0,0 +1,48 @@
{"level":"info","message":"Starting MCP server","service":"mcp-puppeteer","timestamp":"2025-10-07 04:52:52.879"}
{"level":"info","message":"MCP server started successfully","service":"mcp-puppeteer","timestamp":"2025-10-07 04:52:52.880"}
{"level":"info","message":"Starting MCP server","service":"mcp-puppeteer","timestamp":"2025-10-07 04:52:56.191"}
{"level":"info","message":"MCP server started successfully","service":"mcp-puppeteer","timestamp":"2025-10-07 04:52:56.192"}
{"level":"info","message":"Starting MCP server","service":"mcp-puppeteer","timestamp":"2025-10-07 04:52:59.267"}
{"level":"info","message":"MCP server started successfully","service":"mcp-puppeteer","timestamp":"2025-10-07 04:52:59.268"}
{"level":"info","message":"Starting MCP server","service":"mcp-puppeteer","timestamp":"2025-10-07 04:53:20.276"}
{"level":"info","message":"MCP server started successfully","service":"mcp-puppeteer","timestamp":"2025-10-07 04:53:20.277"}
{"level":"info","message":"Starting MCP server","service":"mcp-puppeteer","timestamp":"2025-10-07 04:53:30.838"}
{"level":"info","message":"MCP server started successfully","service":"mcp-puppeteer","timestamp":"2025-10-07 04:53:30.839"}
{"level":"info","message":"Starting MCP server","service":"mcp-puppeteer","timestamp":"2025-10-07 04:53:42.452"}
{"level":"info","message":"MCP server started successfully","service":"mcp-puppeteer","timestamp":"2025-10-07 04:53:42.452"}
{"level":"info","message":"Starting MCP server","service":"mcp-puppeteer","timestamp":"2025-10-07 04:53:46.499"}
{"level":"info","message":"MCP server started successfully","service":"mcp-puppeteer","timestamp":"2025-10-07 04:53:46.500"}
{"level":"info","message":"Starting MCP server","service":"mcp-puppeteer","timestamp":"2025-10-07 04:54:02.295"}
{"level":"info","message":"MCP server started successfully","service":"mcp-puppeteer","timestamp":"2025-10-07 04:54:02.295"}
{"arguments":{"url":"https://google.com"},"level":"debug","message":"Tool call received","service":"mcp-puppeteer","timestamp":"2025-10-07 04:54:37.150","tool":"puppeteer_navigate"}
{"0":"n","1":"p","2":"x","level":"info","message":"Launching browser with config:","service":"mcp-puppeteer","timestamp":"2025-10-07 04:54:37.150"}
{"level":"info","message":"Starting MCP server","service":"mcp-puppeteer","timestamp":"2025-10-07 04:55:08.488"}
{"level":"info","message":"MCP server started successfully","service":"mcp-puppeteer","timestamp":"2025-10-07 04:55:08.489"}
{"level":"info","message":"Starting MCP server","service":"mcp-puppeteer","timestamp":"2025-10-07 05:23:11.815"}
{"level":"info","message":"MCP server started successfully","service":"mcp-puppeteer","timestamp":"2025-10-07 05:23:11.816"}
{"level":"info","message":"Starting MCP server","service":"mcp-puppeteer","timestamp":"2025-10-07 05:23:21.934"}
{"level":"info","message":"MCP server started successfully","service":"mcp-puppeteer","timestamp":"2025-10-07 05:23:21.935"}
{"level":"info","message":"Starting MCP server","service":"mcp-puppeteer","timestamp":"2025-10-07 05:23:32.544"}
{"level":"info","message":"MCP server started successfully","service":"mcp-puppeteer","timestamp":"2025-10-07 05:23:32.544"}
{"level":"info","message":"Starting MCP server","service":"mcp-puppeteer","timestamp":"2025-10-07 05:23:41.154"}
{"level":"info","message":"MCP server started successfully","service":"mcp-puppeteer","timestamp":"2025-10-07 05:23:41.155"}
{"level":"info","message":"Starting MCP server","service":"mcp-puppeteer","timestamp":"2025-10-07 05:23:55.426"}
{"level":"info","message":"MCP server started successfully","service":"mcp-puppeteer","timestamp":"2025-10-07 05:23:55.427"}
{"level":"info","message":"Starting MCP server","service":"mcp-puppeteer","timestamp":"2025-10-07 05:24:15.715"}
{"level":"info","message":"MCP server started successfully","service":"mcp-puppeteer","timestamp":"2025-10-07 05:24:15.716"}
{"level":"info","message":"Starting MCP server","service":"mcp-puppeteer","timestamp":"2025-10-07 05:24:25.063"}
{"level":"info","message":"MCP server started successfully","service":"mcp-puppeteer","timestamp":"2025-10-07 05:24:25.064"}
{"level":"info","message":"Starting MCP server","service":"mcp-puppeteer","timestamp":"2025-10-07 05:24:48.567"}
{"level":"info","message":"MCP server started successfully","service":"mcp-puppeteer","timestamp":"2025-10-07 05:24:48.568"}
{"level":"info","message":"Starting MCP server","service":"mcp-puppeteer","timestamp":"2025-10-07 05:25:08.937"}
{"level":"info","message":"MCP server started successfully","service":"mcp-puppeteer","timestamp":"2025-10-07 05:25:08.938"}
{"level":"info","message":"Starting MCP server","service":"mcp-puppeteer","timestamp":"2025-10-07 22:38:37.120"}
{"level":"info","message":"MCP server started successfully","service":"mcp-puppeteer","timestamp":"2025-10-07 22:38:37.121"}
{"level":"info","message":"Starting MCP server","service":"mcp-puppeteer","timestamp":"2025-10-07 22:38:52.490"}
{"level":"info","message":"MCP server started successfully","service":"mcp-puppeteer","timestamp":"2025-10-07 22:38:52.491"}
{"level":"info","message":"Starting MCP server","service":"mcp-puppeteer","timestamp":"2025-10-07 22:39:25.524"}
{"level":"info","message":"MCP server started successfully","service":"mcp-puppeteer","timestamp":"2025-10-07 22:39:25.525"}
{"level":"info","message":"Starting MCP server","service":"mcp-puppeteer","timestamp":"2025-10-07 22:40:57.126"}
{"level":"info","message":"MCP server started successfully","service":"mcp-puppeteer","timestamp":"2025-10-07 22:40:57.127"}
{"level":"info","message":"Starting MCP server","service":"mcp-puppeteer","timestamp":"2025-10-07 22:42:24.175"}
{"level":"info","message":"MCP server started successfully","service":"mcp-puppeteer","timestamp":"2025-10-07 22:42:24.176"}

View File

@@ -1,3 +0,0 @@
{
"$schema": "https://opencode.ai/config.json"
}

View File

@@ -1,42 +1,64 @@
{
"$schema": "https://json.schemastore.org/package.json",
"name": "opencode",
"description": "AI-powered development tool",
"private": true,
"type": "module",
"packageManager": "bun@1.2.21",
"packageManager": "bun@1.3.2",
"scripts": {
"dev": "bun run packages/opencode/src/index.ts",
"dev": "bun run --cwd packages/opencode --conditions=browser src/index.ts",
"typecheck": "bun turbo typecheck",
"prepare": "husky"
"prepare": "husky",
"random": "echo 'Random script'"
},
"workspaces": {
"packages": [
"packages/*",
"packages/console/*",
"packages/sdk/js"
"packages/sdk/js",
"packages/slack"
],
"catalog": {
"@types/bun": "1.2.21",
"@types/bun": "1.3.0",
"@hono/zod-validator": "0.4.2",
"ulid": "3.0.1",
"@kobalte/core": "0.13.11",
"@types/node": "22.13.9",
"@tsconfig/node22": "22.0.2",
"@tsconfig/bun": "1.0.9",
"@cloudflare/workers-types": "4.20251008.0",
"@openauthjs/openauth": "0.0.0-20250322224806",
"@pierre/precision-diffs": "0.4.4",
"@solidjs/meta": "0.29.4",
"@tailwindcss/vite": "4.1.11",
"diff": "8.0.2",
"ai": "5.0.8",
"hono": "4.7.10",
"fuzzysort": "3.1.0",
"luxon": "3.6.1",
"typescript": "5.8.2",
"@typescript/native-preview": "7.0.0-dev.20251014.1",
"zod": "4.1.8",
"remeda": "2.26.0",
"solid-js": "1.9.9"
"solid-js": "1.9.9",
"solid-list": "0.3.0",
"tailwindcss": "4.1.11",
"virtua": "0.42.3",
"vite": "7.1.4",
"vite-plugin-solid": "2.11.8"
}
},
"devDependencies": {
"@tsconfig/bun": "catalog:",
"husky": "9.1.7",
"prettier": "3.6.2",
"sst": "3.17.13",
"sst": "3.17.23",
"turbo": "2.5.6"
},
"dependencies": {
"@opencode-ai/script": "workspace:*",
"@opencode-ai/sdk": "workspace:*"
},
"repository": {
"type": "git",
"url": "https://github.com/sst/opencode"
@@ -56,5 +78,9 @@
],
"patchedDependencies": {
"@solidjs/start@1.1.7": "patches/@solidjs%2Fstart@1.1.7.patch"
},
"overrides": {
"@types/bun": "catalog:",
"@types/node": "catalog:"
}
}

View File

@@ -1,24 +0,0 @@
<!doctype html>
<html lang="en" class="h-full bg-background">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<link rel="shortcut icon" type="image/ico" href="/src/assets/favicon.svg" />
<link rel="stylesheet" href="/src/assets/theme.css" />
<title>opencode</title>
</head>
<body class="h-full overscroll-none select-none">
<script>
;(function () {
const savedTheme = localStorage.getItem("theme") || "opencode"
const savedDarkMode = localStorage.getItem("darkMode") !== "false"
document.documentElement.setAttribute("data-theme", savedTheme)
document.documentElement.setAttribute("data-dark", savedDarkMode.toString())
})()
</script>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<script src="/src/index.tsx" type="module"></script>
</body>
</html>

View File

@@ -1,163 +0,0 @@
import type { Plugin } from "vite"
import { readdir, readFile, writeFile } from "fs/promises"
import { join, resolve } from "path"
interface ThemeDefinition {
$schema?: string
defs?: Record<string, string>
theme: Record<string, any>
}
interface ResolvedThemeColor {
dark: string
light: string
}
class ColorResolver {
private colors: Map<string, any> = new Map()
private visited: Set<string> = new Set()
constructor(defs: Record<string, string> = {}, theme: Record<string, any> = {}) {
Object.entries(defs).forEach(([key, value]) => {
this.colors.set(key, value)
})
Object.entries(theme).forEach(([key, value]) => {
this.colors.set(key, value)
})
}
resolveColor(key: string, value: any): ResolvedThemeColor {
if (this.visited.has(key)) {
throw new Error(`Circular reference detected for color ${key}`)
}
this.visited.add(key)
try {
if (typeof value === "string") {
if (value === "none") return { dark: value, light: value }
if (value.startsWith("#")) {
return { dark: value.toLowerCase(), light: value.toLowerCase() }
}
const resolved = this.resolveReference(value)
return { dark: resolved, light: resolved }
}
if (typeof value === "object" && value !== null) {
const dark = this.resolveColorValue(value.dark || value.light || "#000000")
const light = this.resolveColorValue(value.light || value.dark || "#FFFFFF")
return { dark, light }
}
return { dark: "#000000", light: "#FFFFFF" }
} finally {
this.visited.delete(key)
}
}
private resolveColorValue(value: any): string {
if (typeof value === "string") {
if (value === "none") return value
if (value.startsWith("#")) {
return value.toLowerCase()
}
return this.resolveReference(value)
}
return value
}
private resolveReference(ref: string): string {
const colorValue = this.colors.get(ref)
if (colorValue === undefined) {
throw new Error(`Color reference '${ref}' not found`)
}
if (typeof colorValue === "string") {
if (colorValue === "none") return colorValue
if (colorValue.startsWith("#")) {
return colorValue.toLowerCase()
}
return this.resolveReference(colorValue)
}
return colorValue
}
}
function kebabCase(str: string): string {
return str.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase()
}
function parseTheme(themeData: ThemeDefinition): Record<string, ResolvedThemeColor> {
const resolver = new ColorResolver(themeData.defs, themeData.theme)
const colors: Record<string, ResolvedThemeColor> = {}
Object.entries(themeData.theme).forEach(([key, value]) => {
colors[key] = resolver.resolveColor(key, value)
})
return colors
}
async function loadThemes(): Promise<Record<string, Record<string, ResolvedThemeColor>>> {
const themesDir = resolve(__dirname, "../../tui/internal/theme/themes")
const files = await readdir(themesDir)
const themes: Record<string, Record<string, ResolvedThemeColor>> = {}
for (const file of files) {
if (!file.endsWith(".json")) continue
const themeName = file.replace(".json", "")
const themeData: ThemeDefinition = JSON.parse(await readFile(join(themesDir, file), "utf-8"))
themes[themeName] = parseTheme(themeData)
}
return themes
}
function generateCSS(themes: Record<string, Record<string, ResolvedThemeColor>>): string {
let css = `/* Auto-generated theme CSS - Do not edit manually */\n:root {\n`
const defaultTheme = themes["opencode"] || Object.values(themes)[0]
if (defaultTheme) {
Object.entries(defaultTheme).forEach(([key, color]) => {
const cssVar = `--theme-${kebabCase(key)}`
css += ` ${cssVar}: ${color.light};\n`
})
}
css += `}\n\n`
Object.entries(themes).forEach(([themeName, colors]) => {
css += `[data-theme="${themeName}"][data-dark="false"] {\n`
Object.entries(colors).forEach(([key, color]) => {
const cssVar = `--theme-${kebabCase(key)}`
css += ` ${cssVar}: ${color.light};\n`
})
css += `}\n\n`
css += `[data-theme="${themeName}"][data-dark="true"] {\n`
Object.entries(colors).forEach(([key, color]) => {
const cssVar = `--theme-${kebabCase(key)}`
css += ` ${cssVar}: ${color.dark};\n`
})
css += `}\n\n`
})
return css
}
export function generateThemeCSS(): Plugin {
return {
name: "generate-theme-css",
async buildStart() {
try {
console.log("Generating theme CSS...")
const themes = await loadThemes()
const css = generateCSS(themes)
const outputPath = resolve(__dirname, "../src/assets/theme.css")
await writeFile(outputPath, css)
console.log(`✅ Generated theme CSS with ${Object.keys(themes).length} themes`)
console.log(` Output: ${outputPath}`)
} catch (error) {
throw new Error(`Theme CSS generation failed: ${error}`)
}
},
}
}

View File

@@ -1,5 +0,0 @@
<svg width="600" height="600" viewBox="0 0 600 600" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="600" height="600" fill="black"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M115 180H300V420H115V180ZM253.75 229.044H161.25V370.405H253.75V229.044Z" fill="white"/>
<path d="M346.25 180H485V229.044H392.5V370.405H485V419.449H346.25V180Z" fill="white"/>
</svg>

Before

Width:  |  Height:  |  Size: 377 B

View File

@@ -1,791 +0,0 @@
import { bundledLanguages, type BundledLanguage, type ShikiTransformer } from "shiki"
import { splitProps, type ComponentProps, createEffect, onMount, onCleanup, createMemo, createResource } from "solid-js"
import { useLocal, useShiki } from "@/context"
import { getFileExtension, getNodeOffsetInLine, getSelectionInContainer } from "@/utils"
interface Props extends ComponentProps<"div"> {
code: string
path: string
}
export function Code(props: Props) {
const ctx = useLocal()
const highlighter = useShiki()
const [local, others] = splitProps(props, ["class", "classList", "code", "path"])
const lang = createMemo(() => {
const ext = getFileExtension(local.path)
if (ext in bundledLanguages) return ext
return "text"
})
let container: HTMLDivElement | undefined
let isProgrammaticSelection = false
const [html] = createResource(async () => {
if (!highlighter.getLoadedLanguages().includes(lang())) {
await highlighter.loadLanguage(lang() as BundledLanguage)
}
return highlighter.codeToHtml(local.code || "", {
lang: lang() && lang() in bundledLanguages ? lang() : "text",
theme: "opencode",
transformers: [transformerUnifiedDiff(), transformerDiffGroups()],
}) as string
})
onMount(() => {
if (!container) return
let ticking = false
const onScroll = () => {
if (!container) return
if (ctx.file.active()?.path !== local.path) return
if (ticking) return
ticking = true
requestAnimationFrame(() => {
ticking = false
ctx.file.scroll(local.path, container!.scrollTop)
})
}
const onSelectionChange = () => {
if (!container) return
if (isProgrammaticSelection) return
if (ctx.file.active()?.path !== local.path) return
const d = getSelectionInContainer(container)
if (!d) return
const p = ctx.file.node(local.path)?.selection
if (p && p.startLine === d.sl && p.endLine === d.el && p.startChar === d.sch && p.endChar === d.ech) return
ctx.file.select(local.path, { startLine: d.sl, startChar: d.sch, endLine: d.el, endChar: d.ech })
}
const MOD = typeof navigator === "object" && /(Mac|iPod|iPhone|iPad)/.test(navigator.platform) ? "Meta" : "Control"
const onKeyDown = (e: KeyboardEvent) => {
if (ctx.file.active()?.path !== local.path) return
const ae = document.activeElement as HTMLElement | undefined
const tag = (ae?.tagName || "").toLowerCase()
const inputFocused = !!ae && (tag === "input" || tag === "textarea" || ae.isContentEditable)
if (inputFocused) return
if (e.getModifierState(MOD) && e.key.toLowerCase() === "a") {
e.preventDefault()
if (!container) return
const element = container.querySelector("code") as HTMLElement | undefined
if (!element) return
const lines = Array.from(element.querySelectorAll(".line"))
if (!lines.length) return
const r = document.createRange()
const last = lines[lines.length - 1]
r.selectNodeContents(last)
const lastLen = r.toString().length
ctx.file.select(local.path, { startLine: 1, startChar: 0, endLine: lines.length, endChar: lastLen })
}
}
container.addEventListener("scroll", onScroll)
document.addEventListener("selectionchange", onSelectionChange)
document.addEventListener("keydown", onKeyDown)
onCleanup(() => {
container?.removeEventListener("scroll", onScroll)
document.removeEventListener("selectionchange", onSelectionChange)
document.removeEventListener("keydown", onKeyDown)
})
})
// Restore scroll position from store when content is ready
createEffect(() => {
const content = html()
if (!container || !content) return
const top = ctx.file.node(local.path)?.scrollTop
if (top !== undefined && container.scrollTop !== top) container.scrollTop = top
})
// Sync selection from store -> DOM
createEffect(() => {
const content = html()
if (!container || !content) return
if (ctx.file.active()?.path !== local.path) return
const codeEl = container.querySelector("code") as HTMLElement | undefined
if (!codeEl) return
const target = ctx.file.node(local.path)?.selection
const current = getSelectionInContainer(container)
const sel = window.getSelection()
if (!sel) return
if (!target) {
if (current) {
isProgrammaticSelection = true
sel.removeAllRanges()
queueMicrotask(() => {
isProgrammaticSelection = false
})
}
return
}
const matches = !!(
current &&
current.sl === target.startLine &&
current.sch === target.startChar &&
current.el === target.endLine &&
current.ech === target.endChar
)
if (matches) return
const lines = Array.from(codeEl.querySelectorAll(".line"))
if (lines.length === 0) return
let sIdx = Math.max(0, target.startLine - 1)
let eIdx = Math.max(0, target.endLine - 1)
let sChar = Math.max(0, target.startChar || 0)
let eChar = Math.max(0, target.endChar || 0)
if (sIdx > eIdx || (sIdx === eIdx && sChar > eChar)) {
const ti = sIdx
sIdx = eIdx
eIdx = ti
const tc = sChar
sChar = eChar
eChar = tc
}
if (eChar === 0 && eIdx > sIdx) {
eIdx = eIdx - 1
eChar = Number.POSITIVE_INFINITY
}
if (sIdx >= lines.length) return
if (eIdx >= lines.length) eIdx = lines.length - 1
const s = getNodeOffsetInLine(lines[sIdx], sChar) ?? { node: lines[sIdx], offset: 0 }
const e = getNodeOffsetInLine(lines[eIdx], eChar) ?? { node: lines[eIdx], offset: lines[eIdx].childNodes.length }
const range = document.createRange()
range.setStart(s.node, s.offset)
range.setEnd(e.node, e.offset)
isProgrammaticSelection = true
sel.removeAllRanges()
sel.addRange(range)
queueMicrotask(() => {
isProgrammaticSelection = false
})
})
// Build/toggle split layout and apply folding (both unified and split)
createEffect(() => {
const content = html()
if (!container || !content) return
const view = ctx.file.view(local.path)
const pres = Array.from(container.querySelectorAll<HTMLPreElement>("pre"))
if (pres.length === 0) return
const originalPre = pres[0]
const split = container.querySelector<HTMLElement>(".diff-split")
if (view === "diff-split") {
applySplitDiff(container)
const next = container.querySelector<HTMLElement>(".diff-split")
if (next) next.style.display = ""
originalPre.style.display = "none"
} else {
if (split) split.style.display = "none"
originalPre.style.display = ""
}
const expanded = ctx.file.folded(local.path)
if (view === "diff-split") {
const left = container.querySelector<HTMLElement>(".diff-split pre:nth-child(1) code")
const right = container.querySelector<HTMLElement>(".diff-split pre:nth-child(2) code")
if (left)
applyDiffFolding(left, 3, { expanded, onExpand: (key) => ctx.file.unfold(local.path, key), side: "left" })
if (right)
applyDiffFolding(right, 3, { expanded, onExpand: (key) => ctx.file.unfold(local.path, key), side: "right" })
} else {
const code = container.querySelector<HTMLElement>("pre code")
if (code)
applyDiffFolding(code, 3, {
expanded,
onExpand: (key) => ctx.file.unfold(local.path, key),
})
}
})
// Highlight groups + scroll coupling
const clearHighlights = () => {
if (!container) return
container.querySelectorAll<HTMLElement>(".diff-selected").forEach((el) => el.classList.remove("diff-selected"))
}
const applyHighlight = (idx: number, scroll?: boolean) => {
if (!container) return
const view = ctx.file.view(local.path)
if (view === "raw") return
clearHighlights()
const nodes: HTMLElement[] = []
if (view === "diff-split") {
const left = container.querySelector<HTMLElement>(".diff-split pre:nth-child(1) code")
const right = container.querySelector<HTMLElement>(".diff-split pre:nth-child(2) code")
if (left)
nodes.push(...Array.from(left.querySelectorAll<HTMLElement>(`[data-chgrp="${idx}"][data-diff="remove"]`)))
if (right)
nodes.push(...Array.from(right.querySelectorAll<HTMLElement>(`[data-chgrp="${idx}"][data-diff="add"]`)))
} else {
const code = container.querySelector<HTMLElement>("pre code")
if (code) nodes.push(...Array.from(code.querySelectorAll<HTMLElement>(`[data-chgrp="${idx}"]`)))
}
for (const n of nodes) n.classList.add("diff-selected")
if (scroll && nodes.length) nodes[0].scrollIntoView({ block: "center", behavior: "smooth" })
}
const countGroups = () => {
if (!container) return 0
const code = container.querySelector<HTMLElement>("pre code")
if (!code) return 0
const set = new Set<string>()
for (const el of Array.from(code.querySelectorAll<HTMLElement>(".diff-line[data-chgrp]"))) {
const v = el.getAttribute("data-chgrp")
if (v != undefined) set.add(v)
}
return set.size
}
let lastIdx: number | undefined = undefined
let lastView: string | undefined
let lastContent: string | undefined
let lastRawIdx: number | undefined = undefined
createEffect(() => {
const content = html()
if (!container || !content) return
const view = ctx.file.view(local.path)
const raw = ctx.file.changeIndex(local.path)
if (raw === undefined) return
const total = countGroups()
if (total <= 0) return
const next = ((raw % total) + total) % total
const navigated = lastRawIdx !== undefined && lastRawIdx !== raw
if (next !== raw) {
ctx.file.setChangeIndex(local.path, next)
applyHighlight(next, true)
} else {
if (lastView !== view || lastContent !== content) applyHighlight(next)
if ((lastIdx !== undefined && lastIdx !== next) || navigated) applyHighlight(next, true)
}
lastRawIdx = raw
lastIdx = next
lastView = view
lastContent = content
})
return (
<div
ref={(el) => {
container = el
}}
innerHTML={html()}
class="
font-mono text-xs tracking-wide overflow-y-auto h-full
[&]:[counter-reset:line]
[&_pre]:focus-visible:outline-none
[&_pre]:overflow-x-auto [&_pre]:no-scrollbar
[&_code]:min-w-full [&_code]:inline-block [&_code]:pb-40
[&_.tab]:relative
[&_.tab::before]:content['⇥']
[&_.tab::before]:absolute
[&_.tab::before]:opacity-0
[&_.space]:relative
[&_.space::before]:content-['·']
[&_.space::before]:absolute
[&_.space::before]:opacity-0
[&_.line]:inline-block [&_.line]:w-full
[&_.line]:hover:bg-background-element
[&_.line::before]:sticky [&_.line::before]:left-0
[&_.line::before]:w-12 [&_.line::before]:pr-4
[&_.line::before]:z-10
[&_.line::before]:bg-background-panel
[&_.line::before]:text-text-muted/60
[&_.line::before]:text-right [&_.line::before]:inline-block
[&_.line::before]:select-none
[&_.line::before]:[counter-increment:line]
[&_.line::before]:content-[counter(line)]
[&_code.code-diff_.line::before]:content-['']
[&_code.code-diff_.line::before]:w-0
[&_code.code-diff_.line::before]:pr-0
[&_.diff-split_code.code-diff::before]:w-10
[&_.diff-split_.diff-newln]:left-0
[&_.diff-oldln]:sticky [&_.diff-oldln]:left-0
[&_.diff-oldln]:w-10 [&_.diff-oldln]:pr-2
[&_.diff-oldln]:z-40
[&_.diff-oldln]:text-text-muted/60
[&_.diff-oldln]:text-right [&_.diff-oldln]:inline-block
[&_.diff-oldln]:select-none
[&_.diff-oldln]:bg-background-panel
[&_.diff-newln]:sticky [&_.diff-newln]:left-10
[&_.diff-newln]:w-10 [&_.diff-newln]:pr-2
[&_.diff-newln]:z-40
[&_.diff-newln]:text-text-muted/60
[&_.diff-newln]:text-right [&_.diff-newln]:inline-block
[&_.diff-newln]:select-none
[&_.diff-newln]:bg-background-panel
[&_.diff-add]:bg-success/20!
[&_.diff-add.diff-selected]:bg-success/50!
[&_.diff-add_.diff-oldln]:bg-success!
[&_.diff-add_.diff-oldln]:text-background-panel!
[&_.diff-add_.diff-newln]:bg-success!
[&_.diff-add_.diff-newln]:text-background-panel!
[&_.diff-remove]:bg-error/20!
[&_.diff-remove.diff-selected]:bg-error/50!
[&_.diff-remove_.diff-newln]:bg-error!
[&_.diff-remove_.diff-newln]:text-background-panel!
[&_.diff-remove_.diff-oldln]:bg-error!
[&_.diff-remove_.diff-oldln]:text-background-panel!
[&_.diff-sign]:inline-block [&_.diff-sign]:px-2 [&_.diff-sign]:select-none
[&_.diff-blank]:bg-background-element
[&_.diff-blank_.diff-oldln]:bg-background-element
[&_.diff-blank_.diff-newln]:bg-background-element
[&_.diff-collapsed]:block! [&_.diff-collapsed]:w-full [&_.diff-collapsed]:relative
[&_.diff-collapsed]:cursor-pointer [&_.diff-collapsed]:select-none
[&_.diff-collapsed]:bg-info/20 [&_.diff-collapsed]:hover:bg-info/40!
[&_.diff-collapsed]:text-info/80 [&_.diff-collapsed]:hover:text-info
[&_.diff-collapsed]:text-xs
[&_.diff-collapsed_.diff-oldln]:bg-info!
[&_.diff-collapsed_.diff-newln]:bg-info!
"
classList={{
...(local.classList || {}),
[local.class ?? ""]: !!local.class,
}}
{...others}
></div>
)
}
function transformerUnifiedDiff(): ShikiTransformer {
const kinds = new Map<number, string>()
const meta = new Map<number, { old?: number; new?: number; sign?: string }>()
let isDiff = false
return {
name: "unified-diff",
preprocess(input) {
kinds.clear()
meta.clear()
isDiff = false
const ls = input.split(/\r?\n/)
const out: Array<string> = []
let oldNo = 0
let newNo = 0
let inHunk = false
for (let i = 0; i < ls.length; i++) {
const s = ls[i]
const m = s.match(/^@@\s*-(\d+)(?:,(\d+))?\s+\+(\d+)(?:,(\d+))?\s*@@/)
if (m) {
isDiff = true
inHunk = true
oldNo = parseInt(m[1], 10)
newNo = parseInt(m[3], 10)
continue
}
if (
/^diff --git /.test(s) ||
/^Index: /.test(s) ||
/^--- /.test(s) ||
/^\+\+\+ /.test(s) ||
/^[=]{3,}$/.test(s) ||
/^\*{3,}$/.test(s) ||
/^\\ No newline at end of file$/.test(s)
) {
isDiff = true
continue
}
if (!inHunk) {
out.push(s)
continue
}
if (/^\+/.test(s)) {
out.push(s)
const ln = out.length
kinds.set(ln, "add")
meta.set(ln, { new: newNo, sign: "+" })
newNo++
continue
}
if (/^-/.test(s)) {
out.push(s)
const ln = out.length
kinds.set(ln, "remove")
meta.set(ln, { old: oldNo, sign: "-" })
oldNo++
continue
}
if (/^ /.test(s)) {
out.push(s)
const ln = out.length
kinds.set(ln, "context")
meta.set(ln, { old: oldNo, new: newNo })
oldNo++
newNo++
continue
}
// fallback in hunks
out.push(s)
}
return out.join("\n").trimEnd()
},
code(node) {
if (isDiff) this.addClassToHast(node, "code-diff")
},
pre(node) {
if (isDiff) this.addClassToHast(node, "code-diff")
},
line(node, line) {
if (!isDiff) return
const kind = kinds.get(line)
if (!kind) return
const m = meta.get(line) || {}
this.addClassToHast(node, "diff-line")
this.addClassToHast(node, `diff-${kind}`)
node.properties = node.properties || {}
;(node.properties as any)["data-diff"] = kind
if (m.old != undefined) (node.properties as any)["data-old"] = String(m.old)
if (m.new != undefined) (node.properties as any)["data-new"] = String(m.new)
const oldSpan = {
type: "element",
tagName: "span",
properties: { className: ["diff-oldln"] },
children: [{ type: "text", value: m.old != undefined ? String(m.old) : " " }],
}
const newSpan = {
type: "element",
tagName: "span",
properties: { className: ["diff-newln"] },
children: [{ type: "text", value: m.new != undefined ? String(m.new) : " " }],
}
if (kind === "add" || kind === "remove" || kind === "context") {
const first = (node.children && (node.children as any[])[0]) as any
if (first && first.type === "element" && first.children && first.children.length > 0) {
const t = first.children[0]
if (t && t.type === "text" && typeof t.value === "string" && t.value.length > 0) {
const ch = t.value[0]
if (ch === "+" || ch === "-" || ch === " ") t.value = t.value.slice(1)
}
}
}
const signSpan = {
type: "element",
tagName: "span",
properties: { className: ["diff-sign"] },
children: [{ type: "text", value: (m as any).sign || " " }],
}
// @ts-expect-error hast typing across versions
node.children = [oldSpan, newSpan, signSpan, ...(node.children || [])]
},
}
}
function transformerDiffGroups(): ShikiTransformer {
let group = -1
let inGroup = false
return {
name: "diff-groups",
pre() {
group = -1
inGroup = false
},
line(node) {
const props = (node.properties || {}) as any
const kind = props["data-diff"] as string | undefined
if (kind === "add" || kind === "remove") {
if (!inGroup) {
group += 1
inGroup = true
}
;(node.properties as any)["data-chgrp"] = String(group)
} else {
inGroup = false
}
},
}
}
function applyDiffFolding(
root: HTMLElement,
context = 3,
options?: { expanded?: string[]; onExpand?: (key: string) => void; side?: "left" | "right" },
) {
if (!root.classList.contains("code-diff")) return
// Cleanup: unwrap previous collapsed blocks and remove toggles
const blocks = Array.from(root.querySelectorAll<HTMLElement>(".diff-collapsed-block"))
for (const block of blocks) {
const p = block.parentNode
if (!p) {
block.remove()
continue
}
while (block.firstChild) p.insertBefore(block.firstChild, block)
block.remove()
}
const toggles = Array.from(root.querySelectorAll<HTMLElement>(".diff-collapsed"))
for (const t of toggles) t.remove()
const lines = Array.from(root.querySelectorAll<HTMLElement>(".diff-line"))
if (lines.length === 0) return
const n = lines.length
const isChange = lines.map((l) => l.dataset["diff"] === "add" || l.dataset["diff"] === "remove")
const isContext = lines.map((l) => l.dataset["diff"] === "context")
if (!isChange.some(Boolean)) return
const visible = new Array(n).fill(false) as boolean[]
for (let i = 0; i < n; i++) if (isChange[i]) visible[i] = true
for (let i = 0; i < n; i++) {
if (isChange[i]) {
const s = Math.max(0, i - context)
const e = Math.min(n - 1, i + context)
for (let j = s; j <= e; j++) if (isContext[j]) visible[j] = true
}
}
type Range = { start: number; end: number }
const ranges: Range[] = []
let i = 0
while (i < n) {
if (!visible[i] && isContext[i]) {
let j = i
while (j + 1 < n && !visible[j + 1] && isContext[j + 1]) j++
ranges.push({ start: i, end: j })
i = j + 1
} else {
i++
}
}
for (const r of ranges) {
const start = lines[r.start]
const end = lines[r.end]
const count = r.end - r.start + 1
const minCollapse = 20
if (count < minCollapse) {
continue
}
// Wrap the entire collapsed chunk (including trailing newline) so it takes no space
const block = document.createElement("span")
block.className = "diff-collapsed-block"
start.parentElement?.insertBefore(block, start)
let cur: Node | undefined = start
while (cur) {
const next: Node | undefined = cur.nextSibling || undefined
block.appendChild(cur)
if (cur === end) {
// Also move the newline after the last line into the block
if (next && next.nodeType === Node.TEXT_NODE && (next.textContent || "").startsWith("\n")) {
block.appendChild(next)
}
break
}
cur = next
}
block.style.display = "none"
const row = document.createElement("span")
row.className = "line diff-collapsed"
row.setAttribute("data-kind", "collapsed")
row.setAttribute("data-count", String(count))
row.setAttribute("tabindex", "0")
row.setAttribute("role", "button")
const oldln = document.createElement("span")
oldln.className = "diff-oldln"
oldln.textContent = " "
const newln = document.createElement("span")
newln.className = "diff-newln"
newln.textContent = " "
const sign = document.createElement("span")
sign.className = "diff-sign"
sign.textContent = "…"
const label = document.createElement("span")
label.textContent = `show ${count} unchanged line${count > 1 ? "s" : ""}`
const key = `o${start.dataset["old"] || ""}-${end.dataset["old"] || ""}:n${start.dataset["new"] || ""}-${end.dataset["new"] || ""}`
const show = (record = true) => {
if (record) options?.onExpand?.(key)
const p = block.parentNode
if (p) {
while (block.firstChild) p.insertBefore(block.firstChild, block)
block.remove()
}
row.remove()
}
row.addEventListener("click", () => show(true))
row.addEventListener("keydown", (ev) => {
if (ev.key === "Enter" || ev.key === " ") {
ev.preventDefault()
show(true)
}
})
block.parentElement?.insertBefore(row, block)
if (!options?.side || options.side === "left") row.appendChild(oldln)
if (!options?.side || options.side === "right") row.appendChild(newln)
row.appendChild(sign)
row.appendChild(label)
if (options?.expanded && options.expanded.includes(key)) {
show(false)
}
}
}
function applySplitDiff(container: HTMLElement) {
const pres = Array.from(container.querySelectorAll<HTMLPreElement>("pre"))
if (pres.length === 0) return
const originalPre = pres[0]
const originalCode = originalPre.querySelector("code") as HTMLElement | undefined
if (!originalCode || !originalCode.classList.contains("code-diff")) return
// Rebuild split each time to match current content
const existing = container.querySelector<HTMLElement>(".diff-split")
if (existing) existing.remove()
const grid = document.createElement("div")
grid.className = "diff-split grid grid-cols-2 gap-x-6"
const makeColumn = () => {
const pre = document.createElement("pre")
pre.className = originalPre.className
const code = document.createElement("code")
code.className = originalCode.className
pre.appendChild(code)
return { pre, code }
}
const left = makeColumn()
const right = makeColumn()
// Helpers
const cloneSide = (line: HTMLElement, side: "old" | "new"): HTMLElement => {
const clone = line.cloneNode(true) as HTMLElement
const oldln = clone.querySelector(".diff-oldln")
const newln = clone.querySelector(".diff-newln")
if (side === "old") {
if (newln) newln.remove()
} else {
if (oldln) oldln.remove()
}
return clone
}
const blankLine = (side: "old" | "new", kind: "add" | "remove"): HTMLElement => {
const span = document.createElement("span")
span.className = "line diff-line diff-blank"
span.setAttribute("data-diff", kind)
const ln = document.createElement("span")
ln.className = side === "old" ? "diff-oldln" : "diff-newln"
ln.textContent = " "
span.appendChild(ln)
return span
}
const lines = Array.from(originalCode.querySelectorAll<HTMLElement>(".diff-line"))
let i = 0
while (i < lines.length) {
const cur = lines[i]
const kind = cur.dataset["diff"]
if (kind === "context") {
left.code.appendChild(cloneSide(cur, "old"))
left.code.appendChild(document.createTextNode("\n"))
right.code.appendChild(cloneSide(cur, "new"))
right.code.appendChild(document.createTextNode("\n"))
i++
continue
}
if (kind === "remove") {
// Batch consecutive removes and following adds, then pair
const removes: HTMLElement[] = []
const adds: HTMLElement[] = []
let j = i
while (j < lines.length && lines[j].dataset["diff"] === "remove") {
removes.push(lines[j])
j++
}
let k = j
while (k < lines.length && lines[k].dataset["diff"] === "add") {
adds.push(lines[k])
k++
}
const pairs = Math.min(removes.length, adds.length)
for (let p = 0; p < pairs; p++) {
left.code.appendChild(cloneSide(removes[p], "old"))
left.code.appendChild(document.createTextNode("\n"))
right.code.appendChild(cloneSide(adds[p], "new"))
right.code.appendChild(document.createTextNode("\n"))
}
for (let p = pairs; p < removes.length; p++) {
left.code.appendChild(cloneSide(removes[p], "old"))
left.code.appendChild(document.createTextNode("\n"))
right.code.appendChild(blankLine("new", "remove"))
right.code.appendChild(document.createTextNode("\n"))
}
for (let p = pairs; p < adds.length; p++) {
left.code.appendChild(blankLine("old", "add"))
left.code.appendChild(document.createTextNode("\n"))
right.code.appendChild(cloneSide(adds[p], "new"))
right.code.appendChild(document.createTextNode("\n"))
}
i = k
continue
}
if (kind === "add") {
// Run of adds not preceded by removes
const adds: HTMLElement[] = []
let j = i
while (j < lines.length && lines[j].dataset["diff"] === "add") {
adds.push(lines[j])
j++
}
for (let p = 0; p < adds.length; p++) {
left.code.appendChild(blankLine("old", "add"))
left.code.appendChild(document.createTextNode("\n"))
right.code.appendChild(cloneSide(adds[p], "new"))
right.code.appendChild(document.createTextNode("\n"))
}
i = j
continue
}
// Any other kind: mirror as context
left.code.appendChild(cloneSide(cur, "old"))
left.code.appendChild(document.createTextNode("\n"))
right.code.appendChild(cloneSide(cur, "new"))
right.code.appendChild(document.createTextNode("\n"))
i++
}
grid.appendChild(left.pre)
grid.appendChild(right.pre)
container.appendChild(grid)
}

View File

@@ -1,23 +0,0 @@
import { useMarked } from "@/context"
import { createResource } from "solid-js"
function strip(text: string): string {
const wrappedRe = /^\s*<([A-Za-z]\w*)>\s*([\s\S]*?)\s*<\/\1>\s*$/
const match = text.match(wrappedRe)
return match ? match[2] : text
}
export function Markdown(props: { text: string; class?: string }) {
const marked = useMarked()
const [html] = createResource(
() => strip(props.text),
async (markdown) => {
return marked.parse(markdown)
},
)
return (
<div
class={`min-w-0 max-w-full text-xs overflow-auto no-scrollbar prose ${props.class ?? ""}`}
innerHTML={html()}
/>
)
}

View File

@@ -1,225 +0,0 @@
import { createEffect, Show, For, createMemo, type JSX, createResource } from "solid-js"
import { Dialog } from "@kobalte/core/dialog"
import { Icon, IconButton } from "@/ui"
import { createStore } from "solid-js/store"
import { entries, flatMap, groupBy, map, pipe } from "remeda"
import { createList } from "solid-list"
import fuzzysort from "fuzzysort"
interface SelectDialogProps<T> {
items: T[] | ((filter: string) => Promise<T[]>)
key: (item: T) => string
render: (item: T) => JSX.Element
filter?: string[]
current?: T
placeholder?: string
groupBy?: (x: T) => string
onSelect?: (value: T | undefined) => void
onClose?: () => void
}
export function SelectDialog<T>(props: SelectDialogProps<T>) {
let scrollRef: HTMLDivElement | undefined
const [store, setStore] = createStore({
filter: "",
mouseActive: false,
})
const [grouped] = createResource(
() => store.filter,
async (filter) => {
const needle = filter.toLowerCase()
const all = (typeof props.items === "function" ? await props.items(needle) : props.items) || []
const result = pipe(
all,
(x) => {
if (!needle) return x
if (!props.filter && Array.isArray(x) && x.every((e) => typeof e === "string")) {
return fuzzysort.go(needle, x).map((x) => x.target) as T[]
}
return fuzzysort.go(needle, x, { keys: props.filter! }).map((x) => x.obj)
},
groupBy((x) => (props.groupBy ? props.groupBy(x) : "")),
// mapValues((x) => x.sort((a, b) => props.key(a).localeCompare(props.key(b)))),
entries(),
map(([k, v]) => ({ category: k, items: v })),
)
return result
},
)
const flat = createMemo(() => {
return pipe(
grouped() || [],
flatMap((x) => x.items),
)
})
const list = createList({
items: () => flat().map(props.key),
initialActive: props.current ? props.key(props.current) : undefined,
loop: true,
})
const resetSelection = () => {
const all = flat()
if (all.length === 0) return
list.setActive(props.key(all[0]))
}
createEffect(() => {
store.filter
scrollRef?.scrollTo(0, 0)
resetSelection()
})
createEffect(() => {
const all = flat()
if (store.mouseActive || all.length === 0) return
if (list.active() === props.key(all[0])) {
scrollRef?.scrollTo(0, 0)
return
}
const element = scrollRef?.querySelector(`[data-key="${list.active()}"]`)
element?.scrollIntoView({ block: "nearest", behavior: "smooth" })
})
const handleInput = (value: string) => {
setStore("filter", value)
resetSelection()
}
const handleSelect = (item: T) => {
props.onSelect?.(item)
props.onClose?.()
}
const handleKey = (e: KeyboardEvent) => {
setStore("mouseActive", false)
if (e.key === "Enter") {
e.preventDefault()
const selected = flat().find((x) => props.key(x) === list.active())
if (selected) handleSelect(selected)
} else if (e.key === "Escape") {
e.preventDefault()
props.onClose?.()
} else {
list.onKeyDown(e)
}
}
return (
<Dialog defaultOpen modal onOpenChange={(open) => open || props.onClose?.()}>
<Dialog.Portal>
<Dialog.Overlay class="fixed inset-0 bg-black/50 backdrop-blur-sm z-[100]" />
<Dialog.Content
class="fixed top-[20%] left-1/2 -translate-x-1/2 w-[90vw] max-w-2xl
shadow-[0_0_33px_rgba(0,0,0,0.8)]
bg-background border border-border-subtle/30 rounded-lg z-[101]
max-h-[60vh] flex flex-col"
>
<div class="border-b border-border-subtle/30">
<div class="relative">
<Icon name="command" size={16} class="absolute left-3 top-1/2 -translate-y-1/2 text-text-muted/80" />
<input
type="text"
value={store.filter}
onInput={(e) => handleInput(e.currentTarget.value)}
onKeyDown={handleKey}
placeholder={props.placeholder}
class="w-full pl-10 pr-4 py-2 rounded-t-md
text-sm text-text placeholder-text-muted/70
focus:outline-none"
autofocus
spellcheck={false}
autocorrect="off"
autocomplete="off"
autocapitalize="off"
/>
<div class="absolute right-3 top-1/2 -translate-y-1/2 flex items-center gap-2">
{/* <Show when={fileResults.loading && mode() === "files"}>
<div class="text-text-muted">
<Icon name="refresh" size={14} class="animate-spin" />
</div>
</Show> */}
<Show when={store.filter}>
<IconButton
size="xs"
variant="ghost"
class="text-text-muted hover:text-text"
onClick={() => {
setStore("filter", "")
resetSelection()
}}
>
<Icon name="close" size={14} />
</IconButton>
</Show>
</div>
</div>
</div>
<div ref={(el) => (scrollRef = el)} class="relative flex-1 overflow-y-auto">
<Show
when={flat().length > 0}
fallback={<div class="text-center py-8 text-text-muted text-sm">No results</div>}
>
<For each={grouped()}>
{(group) => (
<>
<Show when={group.category}>
<div class="top-0 sticky z-10 bg-background-panel p-2 text-xs text-text-muted/60 tracking-wider uppercase">
{group.category}
</div>
</Show>
<div class="p-2">
<For each={group.items}>
{(item) => (
<button
data-key={props.key(item)}
onClick={() => handleSelect(item)}
onMouseMove={() => {
setStore("mouseActive", true)
list.setActive(props.key(item))
}}
classList={{
"w-full px-3 py-2 flex items-center gap-3": true,
"rounded-md text-left transition-colors group": true,
"bg-background-element": props.key(item) === list.active(),
}}
>
{props.render(item)}
</button>
)}
</For>
</div>
</>
)}
</For>
</Show>
</div>
<div class="p-3 border-t border-border-subtle/30 flex items-center justify-between text-xs text-text-muted">
<div class="flex items-center gap-5">
<span class="flex items-center gap-1.5">
<kbd class="px-1.5 py-0.5 bg-background-element border border-border-subtle/30 rounded text-[10px]">
</kbd>
Navigate
</span>
<span class="flex items-center gap-1.5">
<kbd class="px-1.5 py-0.5 bg-background-element border border-border-subtle/30 rounded text-[10px]">
</kbd>
Select
</span>
<span class="flex items-center gap-1.5">
<kbd class="px-1.5 py-0.5 bg-background-element border border-border-subtle/30 rounded text-[10px]">
ESC
</kbd>
Close
</span>
</div>
<span>{`${flat().length} results`}</span>
</div>
</Dialog.Content>
</Dialog.Portal>
</Dialog>
)
}

View File

@@ -1,107 +0,0 @@
import { Select as KobalteSelect } from "@kobalte/core/select"
import { createMemo } from "solid-js"
import type { ComponentProps } from "solid-js"
import { Icon } from "@/ui/icon"
import { pipe, groupBy, entries, map } from "remeda"
import { Button, type ButtonProps } from "@/ui"
export interface SelectProps<T> {
placeholder?: string
options: T[]
current?: T
value?: (x: T) => string
label?: (x: T) => string
groupBy?: (x: T) => string
onSelect?: (value: T | undefined) => void
class?: ComponentProps<"div">["class"]
classList?: ComponentProps<"div">["classList"]
}
export function Select<T>(props: SelectProps<T> & ButtonProps) {
const grouped = createMemo(() => {
const result = pipe(
props.options,
groupBy((x) => (props.groupBy ? props.groupBy(x) : "")),
// mapValues((x) => x.sort((a, b) => a.title.localeCompare(b.title))),
entries(),
map(([k, v]) => ({ category: k, options: v })),
)
return result
})
return (
<KobalteSelect<T, { category: string; options: T[] }>
value={props.current}
options={grouped()}
optionValue={(x) => (props.value ? props.value(x) : (x as string))}
optionTextValue={(x) => (props.label ? props.label(x) : (x as string))}
optionGroupChildren="options"
placeholder={props.placeholder}
sectionComponent={(props) => (
<KobalteSelect.Section class="text-xs uppercase text-text-muted/60 font-light mt-3 first:mt-0 ml-2">
{props.section.rawValue.category}
</KobalteSelect.Section>
)}
itemComponent={(itemProps) => (
<KobalteSelect.Item
classList={{
"relative flex cursor-pointer select-none items-center": true,
"rounded-sm px-2 py-0.5 text-xs outline-none text-text": true,
"transition-colors data-[disabled]:pointer-events-none": true,
"data-[highlighted]:bg-background-element data-[disabled]:opacity-50": true,
[props.class ?? ""]: !!props.class,
}}
{...itemProps}
>
<KobalteSelect.ItemLabel>
{props.label ? props.label(itemProps.item.rawValue) : (itemProps.item.rawValue as string)}
</KobalteSelect.ItemLabel>
<KobalteSelect.ItemIndicator class="ml-auto">
<Icon name="checkmark" size={16} />
</KobalteSelect.ItemIndicator>
</KobalteSelect.Item>
)}
onChange={(v) => {
props.onSelect?.(v ?? undefined)
}}
>
<KobalteSelect.Trigger
as={Button}
size={props.size || "sm"}
variant={props.variant || "secondary"}
classList={{
...(props.classList ?? {}),
[props.class ?? ""]: !!props.class,
}}
>
<KobalteSelect.Value<T>>
{(state) => {
const selected = state.selectedOption() ?? props.current
if (!selected) return props.placeholder || ""
if (props.label) return props.label(selected)
return selected as string
}}
</KobalteSelect.Value>
<KobalteSelect.Icon
classList={{
"size-fit shrink-0 text-text-muted transition-transform duration-100 data-[expanded]:rotate-180": true,
}}
>
<Icon name="chevron-down" size={24} />
</KobalteSelect.Icon>
</KobalteSelect.Trigger>
<KobalteSelect.Portal>
<KobalteSelect.Content
classList={{
"min-w-32 overflow-hidden rounded-md border border-border-subtle/40": true,
"bg-background-panel p-1 shadow-md z-50": true,
"data-[closed]:animate-out data-[closed]:fade-out-0 data-[closed]:zoom-out-95": true,
"data-[expanded]:animate-in data-[expanded]:fade-in-0 data-[expanded]:zoom-in-95": true,
}}
>
<KobalteSelect.Listbox class="overflow-y-auto max-h-48" />
</KobalteSelect.Content>
</KobalteSelect.Portal>
</KobalteSelect>
)
}

View File

@@ -1,28 +0,0 @@
import { useSync, useLocal } from "@/context"
import { Button, Tooltip } from "@/ui"
import { VList } from "virtua/solid"
export default function SessionList() {
const sync = useSync()
const local = useLocal()
return (
<VList data={sync.data.session} class="p-2">
{(session) => (
<Tooltip placement="right" value={session.title} class="w-full min-w-0">
<Button
size="sm"
variant="ghost"
classList={{
"w-full min-w-0 py-1 text-left truncate justify-start text-text-muted text-xs": true,
"text-text!": local.session.active()?.id === session.id,
}}
onClick={() => local.session.setActive(session.id)}
>
<span class="truncate">{session.title}</span>
</Button>
</Tooltip>
)}
</VList>
)
}

View File

@@ -1,471 +0,0 @@
import { useLocal, useSync } from "@/context"
import { Collapsible, Icon } from "@/ui"
import type { Part, ToolPart } from "@opencode-ai/sdk"
import { DateTime } from "luxon"
import {
createSignal,
onMount,
For,
Match,
splitProps,
Switch,
type ComponentProps,
type ParentProps,
createEffect,
createMemo,
Show,
} from "solid-js"
import { getFilename } from "@/utils"
import { Markdown } from "./markdown"
import { Code } from "./code"
import { createElementSize } from "@solid-primitives/resize-observer"
import { createScrollPosition } from "@solid-primitives/scroll"
function Part(props: ParentProps & ComponentProps<"div">) {
const [local, others] = splitProps(props, ["class", "classList", "children"])
return (
<div
classList={{
...(local.classList ?? {}),
"h-6 flex items-center": true,
[local.class ?? ""]: !!local.class,
}}
{...others}
>
<p class="text-xs leading-4 text-left text-text-muted/60 font-medium">{local.children}</p>
</div>
)
}
function CollapsiblePart(props: { title: ParentProps["children"] } & ParentProps & ComponentProps<typeof Collapsible>) {
return (
<Collapsible {...props}>
<Collapsible.Trigger class="peer/collapsible">
<Part>{props.title}</Part>
</Collapsible.Trigger>
<Collapsible.Content>
<p class="flex-auto py-1 text-xs min-w-0 text-pretty">
<span class="text-text-muted/60 break-words">{props.children}</span>
</p>
</Collapsible.Content>
</Collapsible>
)
}
function ReadToolPart(props: { part: ToolPart }) {
const sync = useSync()
const local = useLocal()
return (
<Switch>
<Match when={props.part.state.status === "pending"}>
<Part>Reading file...</Part>
</Match>
<Match when={props.part.state.status === "completed" && props.part.state}>
{(state) => {
const path = state().input["filePath"] as string
return (
<Part class="cursor-pointer" onClick={() => local.file.open(path)}>
<span class="text-text-muted">Read</span> {getFilename(path)}
</Part>
)
}}
</Match>
<Match when={props.part.state.status === "error" && props.part.state}>
{(state) => (
<div>
<Part>
<span class="text-text-muted">Read</span> {getFilename(state().input["filePath"] as string)}
</Part>
<div class="text-error">{sync.sanitize(state().error)}</div>
</div>
)}
</Match>
</Switch>
)
}
function EditToolPart(props: { part: ToolPart }) {
const sync = useSync()
return (
<Switch>
<Match when={props.part.state.status === "pending"}>
<Part>Preparing edit...</Part>
</Match>
<Match when={props.part.state.status === "completed" && props.part.state}>
{(state) => (
<CollapsiblePart
defaultOpen
title={
<>
<span class="text-text-muted">Edit</span> {getFilename(state().input["filePath"] as string)}
</>
}
>
<Code
path={state().input["filePath"] as string}
code={state().metadata["diff"] as string}
class="[&_code]:pb-0!"
/>
</CollapsiblePart>
)}
</Match>
<Match when={props.part.state.status === "error" && props.part.state}>
{(state) => (
<CollapsiblePart
title={
<>
<span class="text-text-muted">Edit</span> {getFilename(state().input["filePath"] as string)}
</>
}
>
<div class="text-error">{sync.sanitize(state().error)}</div>
</CollapsiblePart>
)}
</Match>
</Switch>
)
}
function WriteToolPart(props: { part: ToolPart }) {
const sync = useSync()
return (
<Switch>
<Match when={props.part.state.status === "pending"}>
<Part>Preparing write...</Part>
</Match>
<Match when={props.part.state.status === "completed" && props.part.state}>
{(state) => (
<CollapsiblePart
title={
<>
<span class="text-text-muted">Write</span> {getFilename(state().input["filePath"] as string)}
</>
}
>
<div class="p-2 bg-background-panel rounded-md border border-border-subtle"></div>
</CollapsiblePart>
)}
</Match>
<Match when={props.part.state.status === "error" && props.part.state}>
{(state) => (
<div>
<Part>
<span class="text-text-muted">Write</span> {getFilename(state().input["filePath"] as string)}
</Part>
<div class="text-error">{sync.sanitize(state().error)}</div>
</div>
)}
</Match>
</Switch>
)
}
function BashToolPart(props: { part: ToolPart }) {
const sync = useSync()
return (
<Switch>
<Match when={props.part.state.status === "pending"}>
<Part>Writing shell command...</Part>
</Match>
<Match when={props.part.state.status === "completed" && props.part.state}>
{(state) => (
<CollapsiblePart
defaultOpen
title={
<>
<span class="text-text-muted">Run command:</span> {state().input["command"]}
</>
}
>
<Markdown text={`\`\`\`command\n${state().input["command"]}\n${state().output}\`\`\``} />
</CollapsiblePart>
)}
</Match>
<Match when={props.part.state.status === "error" && props.part.state}>
{(state) => (
<CollapsiblePart
title={
<>
<span class="text-text-muted">Shell</span> {state().input["command"]}
</>
}
>
<div class="text-error">{sync.sanitize(state().error)}</div>
</CollapsiblePart>
)}
</Match>
</Switch>
)
}
function ToolPart(props: { part: ToolPart }) {
// read
// edit
// write
// bash
// ls
// glob
// grep
// todowrite
// todoread
// webfetch
// websearch
// patch
// task
return (
<div class="min-w-0 flex-auto text-xs">
<Switch
fallback={
<span>
{props.part.type}:{props.part.tool}
</span>
}
>
<Match when={props.part.tool === "read"}>
<ReadToolPart part={props.part} />
</Match>
<Match when={props.part.tool === "edit"}>
<EditToolPart part={props.part} />
</Match>
<Match when={props.part.tool === "write"}>
<WriteToolPart part={props.part} />
</Match>
<Match when={props.part.tool === "bash"}>
<BashToolPart part={props.part} />
</Match>
</Switch>
</div>
)
}
export default function SessionTimeline(props: { session: string; class?: string }) {
const sync = useSync()
const [scrollElement, setScrollElement] = createSignal<HTMLElement | undefined>(undefined)
const [root, setRoot] = createSignal<HTMLDivElement | undefined>(undefined)
const [tail, setTail] = createSignal(true)
const size = createElementSize(root)
const scroll = createScrollPosition(scrollElement)
onMount(() => sync.session.sync(props.session))
const session = createMemo(() => sync.session.get(props.session))
const messages = createMemo(() => sync.data.message[props.session] ?? [])
const working = createMemo(() => {
const last = messages()[messages().length - 1]
if (!last) return false
if (last.role === "user") return true
return !last.time.completed
})
const getScrollParent = (el: HTMLElement | null): HTMLElement | undefined => {
let p = el?.parentElement
while (p && p !== document.body) {
const s = getComputedStyle(p)
if (s.overflowY === "auto" || s.overflowY === "scroll") return p
p = p.parentElement
}
return undefined
}
createEffect(() => {
if (!root()) return
setScrollElement(getScrollParent(root()!))
})
const scrollToBottom = () => {
const element = scrollElement()
if (!element) return
element.scrollTop = element.scrollHeight
}
createEffect(() => {
size.height
if (tail()) scrollToBottom()
})
createEffect(() => {
if (working()) {
setTail(true)
scrollToBottom()
}
})
let lastScrollY = 0
createEffect(() => {
if (scroll.y < lastScrollY) {
setTail(false)
}
lastScrollY = scroll.y
})
const valid = (part: Part) => {
if (!part) return false
switch (part.type) {
case "step-start":
case "step-finish":
case "file":
case "patch":
return false
case "text":
return !part.synthetic
case "reasoning":
return part.text.trim()
default:
return true
}
}
const duration = (part: Part) => {
switch (part.type) {
default:
if (
"time" in part &&
part.time &&
"start" in part.time &&
part.time.start &&
"end" in part.time &&
part.time.end
) {
const start = DateTime.fromMillis(part.time.start)
const end = DateTime.fromMillis(part.time.end)
return end.diff(start).toFormat("s")
}
return ""
}
}
return (
<div
ref={setRoot}
classList={{
"p-4 select-text flex flex-col gap-y-1": true,
[props.class ?? ""]: !!props.class,
}}
>
<ul role="list" class="flex flex-col gap-1">
<For each={messages()}>
{(message) => (
<For each={sync.data.part[message.id]?.filter(valid)}>
{(part) => (
<li class="group/li">
<Switch fallback={<div class="flex-auto min-w-0 text-xs mt-1 text-left">{part.type}</div>}>
<Match when={part.type === "text" && part}>
{(part) => (
<Switch>
<Match when={message.role === "user"}>
<div class="w-full flex flex-col items-end justify-stretch gap-y-1.5 min-w-0 mt-5 group-first/li:mt-0">
<p class="w-full rounded-md p-3 ring-1 ring-text/15 ring-inset text-xs bg-background-panel">
<span class="font-medium text-text whitespace-pre-wrap break-words">{part().text}</span>
</p>
<p class="text-xs text-text-muted">
{DateTime.fromMillis(message.time.created).toRelative()} ·{" "}
{sync.data.config.username ?? "user"}
</p>
</div>
</Match>
<Match when={message.role === "assistant"}>
<Markdown text={sync.sanitize(part().text)} class="text-text mt-1" />
</Match>
</Switch>
)}
</Match>
<Match when={part.type === "reasoning" && part}>
{(part) => (
<CollapsiblePart
title={
<Switch fallback={<span class="text-text-muted">Thinking</span>}>
<Match when={part().time.end}>
<span class="text-text-muted">Thought</span> for {duration(part())}s
</Match>
</Switch>
}
>
<Markdown text={part().text} />
</CollapsiblePart>
)}
</Match>
<Match when={part.type === "tool" && part}>{(part) => <ToolPart part={part()} />}</Match>
</Switch>
</li>
)}
</For>
)}
</For>
</ul>
<Show when={false}>
<Collapsible defaultOpen={false}>
<Collapsible.Trigger>
<div class="mt-12 ml-1 flex items-center gap-x-2 text-xs text-text-muted">
<Icon name="file-code" size={16} />
<span>Raw Session Data</span>
<Collapsible.Arrow size={18} class="text-text-muted" />
</div>
</Collapsible.Trigger>
<Collapsible.Content class="mt-5">
<ul role="list" class="space-y-2">
<li>
<Collapsible>
<Collapsible.Trigger>
<div class="flex items-center gap-x-2 text-xs text-text-muted ml-1">
<Icon name="file-code" size={16} />
<span>session</span>
<Collapsible.Arrow size={18} class="text-text-muted" />
</div>
</Collapsible.Trigger>
<Collapsible.Content>
<Code path="session.json" code={JSON.stringify(session(), null, 2)} class="[&_code]:pb-0!" />
</Collapsible.Content>
</Collapsible>
</li>
<For each={messages()}>
{(message) => (
<>
<li>
<Collapsible>
<Collapsible.Trigger>
<div class="flex items-center gap-x-2 text-xs text-text-muted ml-1">
<Icon name="file-code" size={16} />
<span>{message.role === "user" ? "user" : "assistant"}</span>
<Collapsible.Arrow size={18} class="text-text-muted" />
</div>
</Collapsible.Trigger>
<Collapsible.Content>
<Code
path={message.id + ".json"}
code={JSON.stringify(message, null, 2)}
class="[&_code]:pb-0!"
/>
</Collapsible.Content>
</Collapsible>
</li>
<For each={sync.data.part[message.id]?.filter(valid)}>
{(part) => (
<li>
<Collapsible>
<Collapsible.Trigger>
<div class="flex items-center gap-x-2 text-xs text-text-muted ml-1">
<Icon name="file-code" size={16} />
<span>{part.type}</span>
<Collapsible.Arrow size={18} class="text-text-muted" />
</div>
</Collapsible.Trigger>
<Collapsible.Content>
<Code
path={message.id + "." + part.id + ".json"}
code={JSON.stringify(part, null, 2)}
class="[&_code]:pb-0!"
/>
</Collapsible.Content>
</Collapsible>
</li>
)}
</For>
</>
)}
</For>
</ul>
</Collapsible.Content>
</Collapsible>
</Show>
</div>
)
}

View File

@@ -1,48 +0,0 @@
import { For } from "solid-js"
import { Icon, Link, Logo, Tooltip } from "@/ui"
import { useLocation } from "@solidjs/router"
const navigation = [
{ name: "Sessions", href: "/sessions", icon: "dashboard" as const },
{ name: "Commands", href: "/commands", icon: "slash" as const },
{ name: "Agents", href: "/agents", icon: "bolt" as const },
{ name: "Providers", href: "/providers", icon: "cloud" as const },
{ name: "Tools (MCP)", href: "/tools", icon: "hammer" as const },
{ name: "LSP", href: "/lsp", icon: "code" as const },
{ name: "Settings", href: "/settings", icon: "settings" as const },
]
export default function SidebarNav() {
const location = useLocation()
return (
<div class="hidden md:fixed md:inset-y-0 md:left-0 md:z-50 md:block md:w-16 md:overflow-y-auto md:bg-background-panel md:pb-4">
<div class="flex h-16 shrink-0 items-center justify-center">
<Logo variant="mark" size={28} />
</div>
<nav class="mt-5">
<ul role="list" class="flex flex-col items-center space-y-1">
<For each={navigation}>
{(item) => (
<li>
<Tooltip placement="right" value={item.name}>
<Link
href={item.href}
classList={{
"bg-background-element text-text": location.pathname.startsWith(item.href),
"text-text-muted hover:bg-background-element hover:text-text": location.pathname !== item.href,
"flex gap-x-3 rounded-md p-3 text-sm font-semibold": true,
"focus-visible:outline-1 focus-visible:-outline-offset-1 focus-visible:outline-border-active": true,
}}
>
<Icon name={item.icon} size={20} />
<span class="sr-only">{item.name}</span>
</Link>
</Tooltip>
</li>
)}
</For>
</ul>
</nav>
</div>
)
}

View File

@@ -1,34 +0,0 @@
import { createContext, useContext, type ParentProps } from "solid-js"
import { createEventBus } from "@solid-primitives/event-bus"
import type { Event as SDKEvent } from "@opencode-ai/sdk"
import { useSDK } from "@/context"
export type Event = SDKEvent // can extend with custom events later
function init() {
const sdk = useSDK()
const bus = createEventBus<Event>()
sdk.event.subscribe().then(async (events) => {
for await (const event of events.stream) {
bus.emit(event)
}
})
return bus
}
type EventContext = ReturnType<typeof init>
const ctx = createContext<EventContext>()
export function EventProvider(props: ParentProps) {
const value = init()
return <ctx.Provider value={value}>{props.children}</ctx.Provider>
}
export function useEvent() {
const value = useContext(ctx)
if (!value) {
throw new Error("useEvent must be used within a EventProvider")
}
return value
}

View File

@@ -1,7 +0,0 @@
export { EventProvider, useEvent } from "./event"
export { LocalProvider, useLocal } from "./local"
export { MarkedProvider, useMarked } from "./marked"
export { SDKProvider, useSDK } from "./sdk"
export { ShikiProvider, useShiki } from "./shiki"
export { SyncProvider, useSync } from "./sync"
export { ThemeProvider, useTheme } from "./theme"

View File

@@ -1,434 +0,0 @@
import { createStore, produce, reconcile } from "solid-js/store"
import { batch, createContext, createEffect, createMemo, useContext, type ParentProps } from "solid-js"
import { uniqueBy } from "remeda"
import type { FileContent, FileNode, Model, Provider, File as FileStatus } from "@opencode-ai/sdk"
import { useSDK, useEvent, useSync } from "@/context"
export type LocalFile = FileNode &
Partial<{
loaded: boolean
pinned: boolean
expanded: boolean
content: FileContent
selection: { startLine: number; startChar: number; endLine: number; endChar: number }
scrollTop: number
view: "raw" | "diff-unified" | "diff-split"
folded: string[]
selectedChange: number
status: FileStatus
}>
export type TextSelection = LocalFile["selection"]
export type View = LocalFile["view"]
export type LocalModel = Omit<Model, "provider"> & {
provider: Provider
}
export type ModelKey = { providerID: string; modelID: string }
function init() {
const sdk = useSDK()
const sync = useSync()
const agent = (() => {
const list = createMemo(() => sync.data.agent.filter((x) => x.mode !== "subagent"))
const [store, setStore] = createStore<{
current: string
}>({
current: list()[0].name,
})
return {
list,
current() {
return list().find((x) => x.name === store.current)!
},
set(name: string | undefined) {
setStore("current", name ?? list()[0].name)
},
move(direction: 1 | -1) {
let next = list().findIndex((x) => x.name === store.current) + direction
if (next < 0) next = list().length - 1
if (next >= list().length) next = 0
const value = list()[next]
setStore("current", value.name)
if (value.model)
model.set({
providerID: value.model.providerID,
modelID: value.model.modelID,
})
},
}
})()
const model = (() => {
const list = createMemo(() =>
sync.data.provider.flatMap((p) => Object.values(p.models).map((m) => ({ ...m, provider: p }) as LocalModel)),
)
const find = (key: ModelKey) => list().find((m) => m.id === key?.modelID && m.provider.id === key.providerID)
const [store, setStore] = createStore<{
model: Record<string, ModelKey>
recent: ModelKey[]
}>({
model: {},
recent: [],
})
const value = localStorage.getItem("model")
setStore("recent", JSON.parse(value ?? "[]"))
createEffect(() => {
localStorage.setItem("model", JSON.stringify(store.recent))
})
const fallback = createMemo(() => {
if (store.recent.length) return store.recent[0]
const provider = sync.data.provider[0]
const model = Object.values(provider.models)[0]
return { modelID: model.id, providerID: provider.id }
})
const current = createMemo(() => {
const a = agent.current()
return find(store.model[agent.current().name]) ?? find(a.model ?? fallback())
})
const recent = createMemo(() => store.recent.map(find).filter(Boolean))
return {
list,
current,
recent,
set(model: ModelKey | undefined, options?: { recent?: boolean }) {
batch(() => {
setStore("model", agent.current().name, model ?? fallback())
if (options?.recent && model) {
const uniq = uniqueBy([model, ...store.recent], (x) => x.providerID + x.modelID)
if (uniq.length > 5) uniq.pop()
setStore("recent", uniq)
}
})
},
}
})()
const file = (() => {
const [store, setStore] = createStore<{
node: Record<string, LocalFile>
opened: string[]
active?: string
}>({
node: Object.fromEntries(sync.data.node.map((x) => [x.path, x])),
opened: [],
})
const active = createMemo(() => {
if (!store.active) return undefined
return store.node[store.active]
})
const opened = createMemo(() => store.opened.map((x) => store.node[x]))
const changeset = createMemo(() => new Set(sync.data.changes.map((f) => f.path)))
const changes = createMemo(() => Array.from(changeset()).sort((a, b) => a.localeCompare(b)))
createEffect((prev: FileStatus[]) => {
const removed = prev.filter((p) => !sync.data.changes.find((c) => c.path === p.path))
for (const p of removed) {
setStore(
"node",
p.path,
produce((draft) => {
draft.status = undefined
draft.view = "raw"
}),
)
load(p.path)
}
for (const p of sync.data.changes) {
if (store.node[p.path] === undefined) {
fetch(p.path).then(() => setStore("node", p.path, "status", p))
} else {
setStore("node", p.path, "status", p)
}
}
return sync.data.changes
}, sync.data.changes)
const changed = (path: string) => {
const node = store.node[path]
if (node?.status) return true
const set = changeset()
if (set.has(path)) return true
for (const p of set) {
if (p.startsWith(path ? path + "/" : "")) return true
}
return false
}
const resetNode = (path: string) => {
setStore("node", path, undefined!)
}
const relative = (path: string) => path.replace(sync.data.path.directory + "/", "")
const load = async (path: string) => {
const relativePath = relative(path)
sdk.file.read({ query: { path: relativePath } }).then((x) => {
setStore(
"node",
relativePath,
produce((draft) => {
draft.loaded = true
draft.content = x.data
}),
)
})
}
const fetch = async (path: string) => {
const relativePath = relative(path)
const parent = relativePath.split("/").slice(0, -1).join("/")
if (parent) {
await list(parent)
}
}
const open = async (path: string, options?: { pinned?: boolean; view?: LocalFile["view"] }) => {
const relativePath = relative(path)
if (!store.node[relativePath]) await fetch(path)
setStore("opened", (x) => {
if (x.includes(relativePath)) return x
return [
...opened()
.filter((x) => x.pinned)
.map((x) => x.path),
relativePath,
]
})
setStore("active", relativePath)
if (options?.pinned) setStore("node", path, "pinned", true)
if (options?.view && store.node[relativePath].view === undefined) setStore("node", path, "view", options.view)
if (store.node[relativePath].loaded) return
return load(relativePath)
}
const list = async (path: string) => {
return sdk.file.list({ query: { path: path + "/" } }).then((x) => {
setStore(
"node",
produce((draft) => {
x.data!.forEach((node) => {
if (node.path in draft) return
draft[node.path] = node
})
}),
)
})
}
const search = (query: string) => sdk.find.files({ query: { query } }).then((x) => x.data!)
const bus = useEvent()
bus.listen((event) => {
switch (event.type) {
case "message.part.updated":
const part = event.properties.part
if (part.type === "tool" && part.state.status === "completed") {
switch (part.tool) {
case "read":
break
case "edit":
// load(part.state.input["filePath"] as string)
break
default:
break
}
}
break
case "file.watcher.updated":
setTimeout(sync.load.changes, 1000)
const relativePath = relative(event.properties.file)
if (relativePath.startsWith(".git/")) return
load(relativePath)
break
}
})
return {
active,
opened,
node: (path: string) => store.node[path],
update: (path: string, node: LocalFile) => setStore("node", path, reconcile(node)),
open,
load,
close(path: string) {
setStore("opened", (opened) => opened.filter((x) => x !== path))
if (store.active === path) {
const index = store.opened.findIndex((f) => f === path)
const previous = store.opened[Math.max(0, index - 1)]
setStore("active", previous)
}
resetNode(path)
},
expand(path: string) {
setStore("node", path, "expanded", true)
if (store.node[path].loaded) return
setStore("node", path, "loaded", true)
list(path)
},
collapse(path: string) {
setStore("node", path, "expanded", false)
},
select(path: string, selection: TextSelection | undefined) {
setStore("node", path, "selection", selection)
},
scroll(path: string, scrollTop: number) {
setStore("node", path, "scrollTop", scrollTop)
},
move(path: string, to: number) {
const index = store.opened.findIndex((f) => f === path)
if (index === -1) return
setStore(
"opened",
produce((opened) => {
opened.splice(to, 0, opened.splice(index, 1)[0])
}),
)
setStore("node", path, "pinned", true)
},
view(path: string): View {
const n = store.node[path]
return n && n.view ? n.view : "raw"
},
setView(path: string, view: View) {
setStore("node", path, "view", view)
},
unfold(path: string, key: string) {
setStore("node", path, "folded", (xs) => {
const a = xs ?? []
if (a.includes(key)) return a
return [...a, key]
})
},
fold(path: string, key: string) {
setStore("node", path, "folded", (xs) => (xs ?? []).filter((k) => k !== key))
},
folded(path: string) {
const n = store.node[path]
return n && n.folded ? n.folded : []
},
changeIndex(path: string) {
return store.node[path]?.selectedChange
},
setChangeIndex(path: string, index: number | undefined) {
setStore("node", path, "selectedChange", index)
},
changes,
changed,
children(path: string) {
return Object.values(store.node).filter(
(x) =>
x.path.startsWith(path) &&
x.path !== path &&
!x.path.replace(new RegExp(`^${path + "/"}`), "").includes("/"),
)
},
search,
relative,
}
})()
const layout = (() => {
const [store, setStore] = createStore<{
rightPane: boolean
leftWidth: number
rightWidth: number
}>({
rightPane: false,
leftWidth: 200, // Default 50 * 4px (w-50 = 12.5rem = 200px)
rightWidth: 320, // Default 80 * 4px (w-80 = 20rem = 320px)
})
const value = localStorage.getItem("layout")
if (value) {
const v = JSON.parse(value)
if (typeof v?.rightPane === "boolean") setStore("rightPane", v.rightPane)
if (typeof v?.leftWidth === "number") setStore("leftWidth", Math.max(150, Math.min(400, v.leftWidth)))
if (typeof v?.rightWidth === "number") setStore("rightWidth", Math.max(200, Math.min(500, v.rightWidth)))
}
createEffect(() => {
localStorage.setItem("layout", JSON.stringify(store))
})
return {
rightPane() {
return store.rightPane
},
leftWidth() {
return store.leftWidth
},
rightWidth() {
return store.rightWidth
},
toggleRightPane() {
setStore("rightPane", (x) => !x)
},
openRightPane() {
setStore("rightPane", true)
},
closeRightPane() {
setStore("rightPane", false)
},
setLeftWidth(width: number) {
setStore("leftWidth", Math.max(150, Math.min(400, width)))
},
setRightWidth(width: number) {
setStore("rightWidth", Math.max(200, Math.min(500, width)))
},
}
})()
const session = (() => {
const [store, setStore] = createStore<{
active?: string
}>({})
const active = createMemo(() => {
if (!store.active) return undefined
return sync.session.get(store.active)
})
return {
active,
setActive(sessionId: string | undefined) {
setStore("active", sessionId)
},
clearActive() {
setStore("active", undefined)
},
}
})()
const result = {
model,
agent,
file,
layout,
session,
}
return result
}
type LocalContext = ReturnType<typeof init>
const ctx = createContext<LocalContext>()
export function LocalProvider(props: ParentProps) {
const value = init()
return <ctx.Provider value={value}>{props.children}</ctx.Provider>
}
export function useLocal() {
const value = useContext(ctx)
if (!value) {
throw new Error("useLocal must be used within a LocalProvider")
}
return value
}

View File

@@ -1,43 +0,0 @@
import { createContext, useContext, type ParentProps } from "solid-js"
import { useShiki } from "@/context"
import { marked } from "marked"
import markedShiki from "marked-shiki"
import { bundledLanguages, type BundledLanguage } from "shiki"
function init(highlighter: ReturnType<typeof useShiki>) {
return marked.use(
markedShiki({
async highlight(code, lang) {
if (!(lang in bundledLanguages)) {
lang = "text"
}
if (!highlighter.getLoadedLanguages().includes(lang)) {
await highlighter.loadLanguage(lang as BundledLanguage)
}
return highlighter.codeToHtml(code, {
lang: lang || "text",
theme: "opencode",
tabindex: false,
})
},
}),
)
}
type MarkedContext = ReturnType<typeof init>
const ctx = createContext<MarkedContext>()
export function MarkedProvider(props: ParentProps) {
const highlighter = useShiki()
const value = init(highlighter)
return <ctx.Provider value={value}>{props.children}</ctx.Provider>
}
export function useMarked() {
const value = useContext(ctx)
if (!value) {
throw new Error("useMarked must be used within a MarkedProvider")
}
return value
}

View File

@@ -1,29 +0,0 @@
import { createContext, useContext, type ParentProps } from "solid-js"
import { createOpencodeClient } from "@opencode-ai/sdk/client"
const host = import.meta.env.VITE_OPENCODE_SERVER_HOST ?? "127.0.0.1"
const port = import.meta.env.VITE_OPENCODE_SERVER_PORT ?? "4096"
function init() {
const client = createOpencodeClient({
baseUrl: `http://${host}:${port}`,
})
return client
}
type SDKContext = ReturnType<typeof init>
const ctx = createContext<SDKContext>()
export function SDKProvider(props: ParentProps) {
const value = init()
return <ctx.Provider value={value}>{props.children}</ctx.Provider>
}
export function useSDK() {
const value = useContext(ctx)
if (!value) {
throw new Error("useSDK must be used within a SDKProvider")
}
return value
}

View File

@@ -1,582 +0,0 @@
import { createHighlighter, type ThemeInput } from "shiki"
import { createContext, useContext, type ParentProps } from "solid-js"
const theme: ThemeInput = {
colors: {
"actionBar.toggledBackground": "var(--theme-background-element)",
"activityBarBadge.background": "var(--theme-accent)",
"checkbox.border": "var(--theme-border)",
"editor.background": "transparent",
"editor.foreground": "var(--theme-text)",
"editor.inactiveSelectionBackground": "var(--theme-background-element)",
"editor.selectionHighlightBackground": "var(--theme-border-active)",
"editorIndentGuide.activeBackground1": "var(--theme-border-subtle)",
"editorIndentGuide.background1": "var(--theme-border-subtle)",
"input.placeholderForeground": "var(--theme-text-muted)",
"list.activeSelectionIconForeground": "var(--theme-text)",
"list.dropBackground": "var(--theme-background-element)",
"menu.background": "var(--theme-background-panel)",
"menu.border": "var(--theme-border)",
"menu.foreground": "var(--theme-text)",
"menu.selectionBackground": "var(--theme-primary)",
"menu.separatorBackground": "var(--theme-border)",
"ports.iconRunningProcessForeground": "var(--theme-success)",
"sideBarSectionHeader.background": "transparent",
"sideBarSectionHeader.border": "var(--theme-border-subtle)",
"sideBarTitle.foreground": "var(--theme-text-muted)",
"statusBarItem.remoteBackground": "var(--theme-success)",
"statusBarItem.remoteForeground": "var(--theme-text)",
"tab.lastPinnedBorder": "var(--theme-border-subtle)",
"tab.selectedBackground": "var(--theme-background-element)",
"tab.selectedForeground": "var(--theme-text-muted)",
"terminal.inactiveSelectionBackground": "var(--theme-background-element)",
"widget.border": "var(--theme-border)",
},
displayName: "opencode",
name: "opencode",
semanticHighlighting: true,
semanticTokenColors: {
customLiteral: "var(--theme-syntax-function)",
newOperator: "var(--theme-syntax-operator)",
numberLiteral: "var(--theme-syntax-number)",
stringLiteral: "var(--theme-syntax-string)",
},
tokenColors: [
{
scope: [
"meta.embedded",
"source.groovy.embedded",
"string meta.image.inline.markdown",
"variable.legacy.builtin.python",
],
settings: {
foreground: "var(--theme-text)",
},
},
{
scope: "emphasis",
settings: {
fontStyle: "italic",
},
},
{
scope: "strong",
settings: {
fontStyle: "bold",
},
},
{
scope: "header",
settings: {
foreground: "var(--theme-markdown-heading)",
},
},
{
scope: "comment",
settings: {
foreground: "var(--theme-syntax-comment)",
},
},
{
scope: "constant.language",
settings: {
foreground: "var(--theme-syntax-keyword)",
},
},
{
scope: [
"constant.numeric",
"variable.other.enummember",
"keyword.operator.plus.exponent",
"keyword.operator.minus.exponent",
],
settings: {
foreground: "var(--theme-syntax-number)",
},
},
{
scope: "constant.regexp",
settings: {
foreground: "var(--theme-syntax-operator)",
},
},
{
scope: "entity.name.tag",
settings: {
foreground: "var(--theme-syntax-keyword)",
},
},
{
scope: ["entity.name.tag.css", "entity.name.tag.less"],
settings: {
foreground: "var(--theme-syntax-operator)",
},
},
{
scope: "entity.other.attribute-name",
settings: {
foreground: "var(--theme-syntax-variable)",
},
},
{
scope: [
"entity.other.attribute-name.class.css",
"source.css entity.other.attribute-name.class",
"entity.other.attribute-name.id.css",
"entity.other.attribute-name.parent-selector.css",
"entity.other.attribute-name.parent.less",
"source.css entity.other.attribute-name.pseudo-class",
"entity.other.attribute-name.pseudo-element.css",
"source.css.less entity.other.attribute-name.id",
"entity.other.attribute-name.scss",
],
settings: {
foreground: "var(--theme-syntax-operator)",
},
},
{
scope: "invalid",
settings: {
foreground: "var(--theme-error)",
},
},
{
scope: "markup.underline",
settings: {
fontStyle: "underline",
},
},
{
scope: "markup.bold",
settings: {
fontStyle: "bold",
foreground: "var(--theme-markdown-strong)",
},
},
{
scope: "markup.heading",
settings: {
fontStyle: "bold",
foreground: "var(--theme-markdown-heading)",
},
},
{
scope: "markup.italic",
settings: {
fontStyle: "italic",
},
},
{
scope: "markup.strikethrough",
settings: {
fontStyle: "strikethrough",
},
},
{
scope: "markup.inserted",
settings: {
foreground: "var(--theme-diff-added)",
},
},
{
scope: "markup.deleted",
settings: {
foreground: "var(--theme-diff-removed)",
},
},
{
scope: "markup.changed",
settings: {
foreground: "var(--theme-diff-context)",
},
},
{
scope: "punctuation.definition.quote.begin.markdown",
settings: {
foreground: "var(--theme-markdown-block-quote)",
},
},
{
scope: "punctuation.definition.list.begin.markdown",
settings: {
foreground: "var(--theme-markdown-list-enumeration)",
},
},
{
scope: "markup.inline.raw",
settings: {
foreground: "var(--theme-markdown-code)",
},
},
{
scope: "punctuation.definition.tag",
settings: {
foreground: "var(--theme-syntax-punctuation)",
},
},
{
scope: ["meta.preprocessor", "entity.name.function.preprocessor"],
settings: {
foreground: "var(--theme-syntax-keyword)",
},
},
{
scope: "meta.preprocessor.string",
settings: {
foreground: "var(--theme-syntax-string)",
},
},
{
scope: "meta.preprocessor.numeric",
settings: {
foreground: "var(--theme-syntax-number)",
},
},
{
scope: "meta.structure.dictionary.key.python",
settings: {
foreground: "var(--theme-syntax-variable)",
},
},
{
scope: "meta.diff.header",
settings: {
foreground: "var(--theme-diff-hunk-header)",
},
},
{
scope: "storage",
settings: {
foreground: "var(--theme-syntax-keyword)",
},
},
{
scope: "storage.type",
settings: {
foreground: "var(--theme-syntax-keyword)",
},
},
{
scope: ["storage.modifier", "keyword.operator.noexcept"],
settings: {
foreground: "var(--theme-syntax-keyword)",
},
},
{
scope: ["string", "meta.embedded.assembly"],
settings: {
foreground: "var(--theme-syntax-string)",
},
},
{
scope: "string.tag",
settings: {
foreground: "var(--theme-syntax-string)",
},
},
{
scope: "string.value",
settings: {
foreground: "var(--theme-syntax-string)",
},
},
{
scope: "string.regexp",
settings: {
foreground: "var(--theme-syntax-operator)",
},
},
{
scope: [
"punctuation.definition.template-expression.begin",
"punctuation.definition.template-expression.end",
"punctuation.section.embedded",
],
settings: {
foreground: "var(--theme-syntax-keyword)",
},
},
{
scope: ["meta.template.expression"],
settings: {
foreground: "var(--theme-text)",
},
},
{
scope: [
"support.type.vendored.property-name",
"support.type.property-name",
"source.css variable",
"source.coffee.embedded",
],
settings: {
foreground: "var(--theme-syntax-variable)",
},
},
{
scope: "keyword",
settings: {
foreground: "var(--theme-syntax-keyword)",
},
},
{
scope: "keyword.control",
settings: {
foreground: "var(--theme-syntax-keyword)",
},
},
{
scope: "keyword.operator",
settings: {
foreground: "var(--theme-syntax-operator)",
},
},
{
scope: [
"keyword.operator.new",
"keyword.operator.expression",
"keyword.operator.cast",
"keyword.operator.sizeof",
"keyword.operator.alignof",
"keyword.operator.typeid",
"keyword.operator.alignas",
"keyword.operator.instanceof",
"keyword.operator.logical.python",
"keyword.operator.wordlike",
],
settings: {
foreground: "var(--theme-syntax-keyword)",
},
},
{
scope: "keyword.other.unit",
settings: {
foreground: "var(--theme-syntax-number)",
},
},
{
scope: ["punctuation.section.embedded.begin.php", "punctuation.section.embedded.end.php"],
settings: {
foreground: "var(--theme-syntax-keyword)",
},
},
{
scope: "support.function.git-rebase",
settings: {
foreground: "var(--theme-syntax-variable)",
},
},
{
scope: "constant.sha.git-rebase",
settings: {
foreground: "var(--theme-syntax-number)",
},
},
{
scope: ["storage.modifier.import.java", "variable.language.wildcard.java", "storage.modifier.package.java"],
settings: {
foreground: "var(--theme-text)",
},
},
{
scope: "variable.language",
settings: {
foreground: "var(--theme-syntax-keyword)",
},
},
{
scope: [
"entity.name.function",
"support.function",
"support.constant.handlebars",
"source.powershell variable.other.member",
"entity.name.operator.custom-literal",
],
settings: {
foreground: "var(--theme-syntax-function)",
},
},
{
scope: [
"support.class",
"support.type",
"entity.name.type",
"entity.name.namespace",
"entity.other.attribute",
"entity.name.scope-resolution",
"entity.name.class",
"storage.type.numeric.go",
"storage.type.byte.go",
"storage.type.boolean.go",
"storage.type.string.go",
"storage.type.uintptr.go",
"storage.type.error.go",
"storage.type.rune.go",
"storage.type.cs",
"storage.type.generic.cs",
"storage.type.modifier.cs",
"storage.type.variable.cs",
"storage.type.annotation.java",
"storage.type.generic.java",
"storage.type.java",
"storage.type.object.array.java",
"storage.type.primitive.array.java",
"storage.type.primitive.java",
"storage.type.token.java",
"storage.type.groovy",
"storage.type.annotation.groovy",
"storage.type.parameters.groovy",
"storage.type.generic.groovy",
"storage.type.object.array.groovy",
"storage.type.primitive.array.groovy",
"storage.type.primitive.groovy",
],
settings: {
foreground: "var(--theme-syntax-type)",
},
},
{
scope: [
"meta.type.cast.expr",
"meta.type.new.expr",
"support.constant.math",
"support.constant.dom",
"support.constant.json",
"entity.other.inherited-class",
"punctuation.separator.namespace.ruby",
],
settings: {
foreground: "var(--theme-syntax-type)",
},
},
{
scope: [
"keyword.control",
"source.cpp keyword.operator.new",
"keyword.operator.delete",
"keyword.other.using",
"keyword.other.directive.using",
"keyword.other.operator",
"entity.name.operator",
],
settings: {
foreground: "var(--theme-syntax-operator)",
},
},
{
scope: [
"variable",
"meta.definition.variable.name",
"support.variable",
"entity.name.variable",
"constant.other.placeholder",
],
settings: {
foreground: "var(--theme-syntax-variable)",
},
},
{
scope: ["variable.other.constant", "variable.other.enummember"],
settings: {
foreground: "var(--theme-syntax-variable)",
},
},
{
scope: ["meta.object-literal.key"],
settings: {
foreground: "var(--theme-syntax-variable)",
},
},
{
scope: [
"support.constant.property-value",
"support.constant.font-name",
"support.constant.media-type",
"support.constant.media",
"constant.other.color.rgb-value",
"constant.other.rgb-value",
"support.constant.color",
],
settings: {
foreground: "var(--theme-syntax-string)",
},
},
{
scope: [
"punctuation.definition.group.regexp",
"punctuation.definition.group.assertion.regexp",
"punctuation.definition.character-class.regexp",
"punctuation.character.set.begin.regexp",
"punctuation.character.set.end.regexp",
"keyword.operator.negation.regexp",
"support.other.parenthesis.regexp",
],
settings: {
foreground: "var(--theme-syntax-string)",
},
},
{
scope: [
"constant.character.character-class.regexp",
"constant.other.character-class.set.regexp",
"constant.other.character-class.regexp",
"constant.character.set.regexp",
],
settings: {
foreground: "var(--theme-syntax-operator)",
},
},
{
scope: ["keyword.operator.or.regexp", "keyword.control.anchor.regexp"],
settings: {
foreground: "var(--theme-syntax-operator)",
},
},
{
scope: "keyword.operator.quantifier.regexp",
settings: {
foreground: "var(--theme-syntax-operator)",
},
},
{
scope: ["constant.character", "constant.other.option"],
settings: {
foreground: "var(--theme-syntax-keyword)",
},
},
{
scope: "constant.character.escape",
settings: {
foreground: "var(--theme-syntax-operator)",
},
},
{
scope: "entity.name.label",
settings: {
foreground: "var(--theme-text-muted)",
},
},
],
type: "dark",
}
const highlighter = await createHighlighter({
themes: [theme],
langs: [],
})
type ShikiContext = typeof highlighter
const ctx = createContext<ShikiContext>()
export function ShikiProvider(props: ParentProps) {
return <ctx.Provider value={highlighter}>{props.children}</ctx.Provider>
}
export function useShiki() {
const value = useContext(ctx)
if (!value) {
throw new Error("useShiki must be used within a ShikiProvider")
}
return value
}

View File

@@ -1,172 +0,0 @@
import type { Message, Agent, Provider, Session, Part, Config, Path, File, FileNode } from "@opencode-ai/sdk"
import { createStore, produce, reconcile } from "solid-js/store"
import { createContext, createMemo, Show, useContext, type ParentProps } from "solid-js"
import { useSDK, useEvent } from "@/context"
import { Binary } from "@/utils/binary"
function init() {
const [store, setStore] = createStore<{
ready: boolean
provider: Provider[]
agent: Agent[]
config: Config
path: Path
session: Session[]
message: {
[sessionID: string]: Message[]
}
part: {
[messageID: string]: Part[]
}
node: FileNode[]
changes: File[]
}>({
config: {},
path: { state: "", config: "", worktree: "", directory: "" },
ready: false,
agent: [],
provider: [],
session: [],
message: {},
part: {},
node: [],
changes: [],
})
const bus = useEvent()
bus.listen((event) => {
switch (event.type) {
case "session.updated": {
const result = Binary.search(store.session, event.properties.info.id, (s) => s.id)
if (result.found) {
setStore("session", result.index, reconcile(event.properties.info))
break
}
setStore(
"session",
produce((draft) => {
draft.splice(result.index, 0, event.properties.info)
}),
)
break
}
case "message.updated": {
const messages = store.message[event.properties.info.sessionID]
if (!messages) {
setStore("message", event.properties.info.sessionID, [event.properties.info])
break
}
const result = Binary.search(messages, event.properties.info.id, (m) => m.id)
if (result.found) {
setStore("message", event.properties.info.sessionID, result.index, reconcile(event.properties.info))
break
}
setStore(
"message",
event.properties.info.sessionID,
produce((draft) => {
draft.splice(result.index, 0, event.properties.info)
}),
)
break
}
case "message.part.updated": {
const parts = store.part[event.properties.part.messageID]
if (!parts) {
setStore("part", event.properties.part.messageID, [event.properties.part])
break
}
const result = Binary.search(parts, event.properties.part.id, (p) => p.id)
if (result.found) {
setStore("part", event.properties.part.messageID, result.index, reconcile(event.properties.part))
break
}
setStore(
"part",
event.properties.part.messageID,
produce((draft) => {
draft.splice(result.index, 0, event.properties.part)
}),
)
break
}
}
})
const sdk = useSDK()
const load = {
provider: () => sdk.config.providers().then((x) => setStore("provider", x.data!.providers)),
path: () => sdk.path.get().then((x) => setStore("path", x.data!)),
agent: () => sdk.app.agents().then((x) => setStore("agent", x.data ?? [])),
session: () =>
sdk.session.list().then((x) =>
setStore(
"session",
(x.data ?? []).slice().sort((a, b) => a.id.localeCompare(b.id)),
),
),
config: () => sdk.config.get().then((x) => setStore("config", x.data!)),
changes: () => sdk.file.status().then((x) => setStore("changes", x.data!)),
node: () => sdk.file.list({ query: { path: "/" } }).then((x) => setStore("node", x.data!)),
}
Promise.all(Object.values(load).map((p) => p())).then(() => setStore("ready", true))
const sanitizer = createMemo(() => new RegExp(`${store.path.directory}/`, "g"))
const sanitize = (text: string) => text.replace(sanitizer(), "")
return {
data: store,
set: setStore,
session: {
get(sessionID: string) {
const match = Binary.search(store.session, sessionID, (s) => s.id)
if (match.found) return store.session[match.index]
return undefined
},
async sync(sessionID: string) {
const [session, messages] = await Promise.all([
sdk.session.get({ path: { id: sessionID } }),
sdk.session.messages({ path: { id: sessionID } }),
])
setStore(
produce((draft) => {
const match = Binary.search(draft.session, sessionID, (s) => s.id)
draft.session[match.index] = session.data!
draft.message[sessionID] = messages
.data!.map((x) => x.info)
.slice()
.sort((a, b) => a.id.localeCompare(b.id))
for (const message of messages.data!) {
draft.part[message.info.id] = message.parts.slice().sort((a, b) => a.id.localeCompare(b.id))
}
}),
)
},
},
load,
sanitize,
}
}
type SyncContext = ReturnType<typeof init>
const ctx = createContext<SyncContext>()
export function SyncProvider(props: ParentProps) {
const value = init()
return (
<Show when={value.data.ready}>
<ctx.Provider value={value}>{props.children}</ctx.Provider>
</Show>
)
}
export function useSync() {
const value = useContext(ctx)
if (!value) {
throw new Error("useSync must be used within a SyncProvider")
}
return value
}

View File

@@ -1,92 +0,0 @@
import {
createContext,
useContext,
createSignal,
createEffect,
onMount,
type ParentComponent,
onCleanup,
} from "solid-js"
export interface ThemeContextValue {
theme: string | undefined
isDark: boolean
setTheme: (themeName: string) => void
setDarkMode: (isDark: boolean) => void
}
const ThemeContext = createContext<ThemeContextValue>()
export const useTheme = () => {
const context = useContext(ThemeContext)
if (!context) {
throw new Error("useTheme must be used within a ThemeProvider")
}
return context
}
interface ThemeProviderProps {
defaultTheme?: string
defaultDarkMode?: boolean
}
const themes = ["opencode", "tokyonight", "ayu", "nord", "catppuccin"]
export const ThemeProvider: ParentComponent<ThemeProviderProps> = (props) => {
const [theme, setThemeSignal] = createSignal<string | undefined>()
const [isDark, setIsDark] = createSignal(props.defaultDarkMode ?? false)
const handleKeyDown = (event: KeyboardEvent) => {
if (event.key === "t" && event.ctrlKey) {
event.preventDefault()
const current = theme()
if (!current) return
const index = themes.indexOf(current)
const next = themes[(index + 1) % themes.length]
setTheme(next)
}
}
onMount(() => {
window.addEventListener("keydown", handleKeyDown)
})
onCleanup(() => {
window.removeEventListener("keydown", handleKeyDown)
})
onMount(() => {
const savedTheme = localStorage.getItem("theme") ?? "opencode"
const savedDarkMode = localStorage.getItem("darkMode") ?? "true"
setIsDark(savedDarkMode === "true")
setTheme(savedTheme)
})
createEffect(() => {
const currentTheme = theme()
const darkMode = isDark()
if (currentTheme) {
document.documentElement.setAttribute("data-theme", currentTheme)
document.documentElement.setAttribute("data-dark", darkMode.toString())
}
})
const setTheme = async (theme: string) => {
setThemeSignal(theme)
localStorage.setItem("theme", theme)
}
const setDarkMode = (dark: boolean) => {
setIsDark(dark)
localStorage.setItem("darkMode", dark.toString())
}
const contextValue: ThemeContextValue = {
theme: theme(),
isDark: isDark(),
setTheme,
setDarkMode,
}
return <ThemeContext.Provider value={contextValue}>{props.children}</ThemeContext.Provider>
}

View File

@@ -1,168 +0,0 @@
@import "tailwindcss";
:root {
interpolate-size: allow-keywords;
}
@layer components {
[data-popper-positioner] {
pointer-events: none;
}
body {
line-height: 1;
}
::selection {
background-color: color-mix(in srgb, var(--color-primary) 33%, transparent);
/* background-color: var(--color-primary); */
/* color: var(--color-background); */
}
::-webkit-scrollbar-track {
background: var(--theme-background-panel);
}
::-webkit-scrollbar-thumb {
background-color: var(--theme-border-subtle);
border-radius: 6px;
}
* {
scrollbar-color: var(--theme-border-subtle) var(--theme-background-panel);
}
.prose h1 {
color: var(--color-text);
font-size: var(--text-sm);
line-height: var(--text-sm--line-height);
margin-bottom: calc(var(--spacing) * 3);
}
.prose h2 {
color: var(--color-text);
font-size: var(--text-sm);
line-height: var(--text-sm--line-height);
margin-bottom: calc(var(--spacing) * 3);
}
.prose h3 {
color: var(--color-text);
font-size: var(--text-xs);
line-height: var(--text-xs--line-height);
margin-bottom: calc(var(--spacing) * 2);
}
.prose h4 {
color: var(--color-text);
font-size: var(--text-xs);
line-height: var(--text-xs--line-height);
margin-bottom: calc(var(--spacing) * 2);
}
.prose h5 {
color: var(--color-text);
font-size: var(--text-xs);
line-height: var(--text-xs--line-height);
margin-bottom: calc(var(--spacing) * 2);
}
.prose h6 {
color: var(--color-text);
font-size: var(--text-xs);
line-height: var(--text-xs--line-height);
margin-bottom: calc(var(--spacing) * 2);
}
.prose p {
font-size: var(--text-xs);
line-height: var(--text-xs--line-height);
margin-bottom: calc(var(--spacing) * 2);
}
.prose strong {
color: var(--color-text);
}
.prose ul,
ol {
list-style-type: disc;
list-style-position: inside;
margin-bottom: calc(var(--spacing) * 2);
}
.prose pre {
background-color: var(--color-background-panel);
padding: calc(var(--spacing) * 2);
border-radius: var(--radius-md);
border: 1px solid var(--color-border-subtle);
overflow-x: auto;
white-space: pre;
margin-bottom: calc(var(--spacing) * 2);
@apply no-scrollbar;
}
.prose code {
font-family: var(--font-mono);
font-size: var(--text-xs);
line-height: var(--text-xs--line-height);
}
.prose blockquote {
margin-bottom: calc(var(--spacing) * 2);
}
}
@utility no-scrollbar {
&::-webkit-scrollbar {
display: none;
}
/* Hide scrollbar for IE, Edge and Firefox */
& {
-ms-overflow-style: none; /* IE and Edge */
scrollbar-width: none; /* Firefox */
}
}
@theme {
--color-*: initial;
--color-primary: var(--theme-primary);
--color-secondary: var(--theme-secondary);
--color-accent: var(--theme-accent);
--color-error: var(--theme-error);
--color-warning: var(--theme-warning);
--color-success: var(--theme-success);
--color-info: var(--theme-info);
--color-text: var(--theme-text);
--color-text-muted: var(--theme-text-muted);
--color-background: var(--theme-background);
--color-background-panel: var(--theme-background-panel);
--color-background-element: var(--theme-background-element);
--color-border: var(--theme-border);
--color-border-active: var(--theme-border-active);
--color-border-subtle: var(--theme-border-subtle);
--color-diff-added: var(--theme-diff-added);
--color-diff-removed: var(--theme-diff-removed);
--color-diff-context: var(--theme-diff-context);
--color-diff-hunk-header: var(--theme-diff-hunk-header);
--color-diff-highlight-added: var(--theme-diff-highlight-added);
--color-diff-highlight-removed: var(--theme-diff-highlight-removed);
--color-diff-added-bg: var(--theme-diff-added-bg);
--color-diff-removed-bg: var(--theme-diff-removed-bg);
--color-diff-context-bg: var(--theme-diff-context-bg);
--color-diff-line-number: var(--theme-diff-line-number);
--color-diff-added-line-number-bg: var(--theme-diff-added-line-number-bg);
--color-diff-removed-line-number-bg: var(--theme-diff-removed-line-number-bg);
--color-markdown-text: var(--theme-markdown-text);
--color-markdown-heading: var(--theme-markdown-heading);
--color-markdown-link: var(--theme-markdown-link);
--color-markdown-link-text: var(--theme-markdown-link-text);
--color-markdown-code: var(--theme-markdown-code);
--color-markdown-block-quote: var(--theme-markdown-block-quote);
--color-markdown-emph: var(--theme-markdown-emph);
--color-markdown-strong: var(--theme-markdown-strong);
--color-markdown-horizontal-rule: var(--theme-markdown-horizontal-rule);
--color-markdown-list-item: var(--theme-markdown-list-item);
--color-markdown-list-enumeration: var(--theme-markdown-list-enumeration);
--color-markdown-image: var(--theme-markdown-image);
--color-markdown-image-text: var(--theme-markdown-image-text);
--color-markdown-code-block: var(--theme-markdown-code-block);
--color-syntax-comment: var(--theme-syntax-comment);
--color-syntax-keyword: var(--theme-syntax-keyword);
--color-syntax-function: var(--theme-syntax-function);
--color-syntax-variable: var(--theme-syntax-variable);
--color-syntax-string: var(--theme-syntax-string);
--color-syntax-number: var(--theme-syntax-number);
--color-syntax-type: var(--theme-syntax-type);
--color-syntax-operator: var(--theme-syntax-operator);
--color-syntax-punctuation: var(--theme-syntax-punctuation);
}

View File

@@ -1,48 +0,0 @@
/* @refresh reload */
import { render } from "solid-js/web"
import { Router, Route } from "@solidjs/router"
import "@/index.css"
import Layout from "@/pages/layout"
import Home from "@/pages"
import {
EventProvider,
SDKProvider,
SyncProvider,
LocalProvider,
ThemeProvider,
ShikiProvider,
MarkedProvider,
} from "@/context"
const root = document.getElementById("root")
if (import.meta.env.DEV && !(root instanceof HTMLElement)) {
throw new Error(
"Root element not found. Did you forget to add it to your index.html? Or maybe the id attribute got misspelled?",
)
}
render(
() => (
<div class="h-full bg-background text-text-muted">
<ThemeProvider defaultTheme="opencode" defaultDarkMode={true}>
<ShikiProvider>
<MarkedProvider>
<SDKProvider>
<EventProvider>
<SyncProvider>
<LocalProvider>
<Router root={Layout}>
<Route path="/" component={Home} />
</Router>
</LocalProvider>
</SyncProvider>
</EventProvider>
</SDKProvider>
</MarkedProvider>
</ShikiProvider>
</ThemeProvider>
</div>
),
root!,
)

View File

@@ -1,708 +0,0 @@
import { Button, FileIcon, Icon, IconButton, Logo, Tooltip } from "@/ui"
import { Tabs } from "@/ui/tabs"
import { Select } from "@/components/select"
import FileTree from "@/components/file-tree"
import { For, Match, onCleanup, onMount, Show, Switch } from "solid-js"
import { SelectDialog } from "@/components/select-dialog"
import { useLocal, useSDK } from "@/context"
import { Code } from "@/components/code"
import {
DragDropProvider,
DragDropSensors,
DragOverlay,
SortableProvider,
createSortable,
closestCenter,
useDragDropContext,
} from "@thisbeyond/solid-dnd"
import type { DragEvent, Transformer } from "@thisbeyond/solid-dnd"
import type { LocalFile } from "@/context/local"
import SessionList from "@/components/session-list"
import SessionTimeline from "@/components/session-timeline"
import { createStore } from "solid-js/store"
import { getDirectory, getFilename } from "@/utils"
export default function Page() {
const sdk = useSDK()
const local = useLocal()
const [store, setStore] = createStore({
clickTimer: undefined as number | undefined,
activeItem: undefined as string | undefined,
prompt: "",
dragging: undefined as "left" | "right" | undefined,
modelSelectOpen: false,
fileSelectOpen: false,
})
let inputRef: HTMLInputElement | undefined = undefined
const MOD = typeof navigator === "object" && /(Mac|iPod|iPhone|iPad)/.test(navigator.platform) ? "Meta" : "Control"
onMount(() => {
document.addEventListener("keydown", handleKeyDown)
})
onCleanup(() => {
document.removeEventListener("keydown", handleKeyDown)
})
const handleKeyDown = (e: KeyboardEvent) => {
if (e.getModifierState(MOD) && e.shiftKey && e.key.toLowerCase() === "p") {
e.preventDefault()
// TODO: command palette
return
}
if (e.getModifierState(MOD) && e.key.toLowerCase() === "p") {
e.preventDefault()
setStore("fileSelectOpen", true)
return
}
const inputFocused = document.activeElement === inputRef
if (inputFocused) {
if (e.key === "Escape") {
inputRef?.blur()
}
return
}
if (document.activeElement?.id === "select-filter") {
return
}
if (local.file.active()) {
if (e.getModifierState(MOD)) {
if (e.key.toLowerCase() === "a") {
return
}
if (e.key.toLowerCase() === "c") {
return
}
}
}
if (e.key.length === 1 && e.key !== "Unidentified") {
inputRef?.focus()
}
}
const navigateChange = (dir: 1 | -1) => {
const active = local.file.active()
if (!active) return
const current = local.file.changeIndex(active.path)
const next = current == undefined ? (dir === 1 ? 0 : -1) : current + dir
local.file.setChangeIndex(active.path, next)
}
const resetClickTimer = () => {
if (!store.clickTimer) return
clearTimeout(store.clickTimer)
setStore("clickTimer", undefined)
}
const startClickTimer = () => {
const newClickTimer = setTimeout(() => {
setStore("clickTimer", undefined)
}, 300)
setStore("clickTimer", newClickTimer as unknown as number)
}
const handleFileClick = async (file: LocalFile) => {
if (store.clickTimer) {
resetClickTimer()
local.file.update(file.path, { ...file, pinned: true })
} else {
local.file.open(file.path)
startClickTimer()
}
}
const handleTabChange = (path: string) => {
local.file.open(path)
}
const handleTabClose = (file: LocalFile) => {
local.file.close(file.path)
}
const onDragStart = (event: any) => {
setStore("activeItem", event.draggable.id as string)
}
const onDragOver = (event: DragEvent) => {
const { draggable, droppable } = event
if (draggable && droppable) {
const currentFiles = local.file.opened().map((f) => f.path)
const fromIndex = currentFiles.indexOf(draggable.id.toString())
const toIndex = currentFiles.indexOf(droppable.id.toString())
if (fromIndex !== toIndex) {
local.file.move(draggable.id.toString(), toIndex)
}
}
}
const onDragEnd = () => {
setStore("activeItem", undefined)
}
const handleLeftDragStart = (e: MouseEvent) => {
e.preventDefault()
setStore("dragging", "left")
const startX = e.clientX
const startWidth = local.layout.leftWidth()
const handleMouseMove = (e: MouseEvent) => {
const deltaX = e.clientX - startX
const newWidth = startWidth + deltaX
local.layout.setLeftWidth(newWidth)
}
const handleMouseUp = () => {
setStore("dragging", undefined)
document.removeEventListener("mousemove", handleMouseMove)
document.removeEventListener("mouseup", handleMouseUp)
}
document.addEventListener("mousemove", handleMouseMove)
document.addEventListener("mouseup", handleMouseUp)
}
const handleRightDragStart = (e: MouseEvent) => {
e.preventDefault()
setStore("dragging", "right")
const startX = e.clientX
const startWidth = local.layout.rightWidth()
const handleMouseMove = (e: MouseEvent) => {
const deltaX = startX - e.clientX
const newWidth = startWidth + deltaX
local.layout.setRightWidth(newWidth)
}
const handleMouseUp = () => {
setStore("dragging", undefined)
document.removeEventListener("mousemove", handleMouseMove)
document.removeEventListener("mouseup", handleMouseUp)
}
document.addEventListener("mousemove", handleMouseMove)
document.addEventListener("mouseup", handleMouseUp)
}
const handleSubmit = async (e: SubmitEvent) => {
e.preventDefault()
const prompt = store.prompt
setStore("prompt", "")
inputRef?.blur()
const session =
(local.layout.rightPane() ? local.session.active() : undefined) ??
(await sdk.session.create().then((x) => x.data!))
local.session.setActive(session!.id)
local.layout.openRightPane()
const response = await sdk.session.prompt({
path: { id: session!.id },
body: {
agent: local.agent.current()!.name,
model: { modelID: local.model.current()!.id, providerID: local.model.current()!.provider.id },
parts: [
{
type: "text",
text: prompt,
},
...local.file
.opened()
.filter((f) => f.selection || local.file.active()?.path === f.path)
.flatMap((f) => [
{
type: "file" as const,
mime: "text/plain",
url: `file://${f.absolute}${f.selection ? `?start=${f.selection.startLine}&end=${f.selection.endLine}` : ""}`,
filename: f.name,
source: {
type: "file" as const,
text: {
value: "@" + f.name,
start: 0, // f.start,
end: 0, // f.end,
},
path: f.absolute,
},
},
]),
],
},
})
console.log("response", response)
}
return (
<div class="relative">
<div
class="fixed top-0 left-0 h-full border-r border-border-subtle/30 flex flex-col overflow-hidden bg-background z-10"
style={`width: ${local.layout.leftWidth()}px`}
>
<Tabs class="relative flex flex-col h-full" defaultValue="files">
<div class="sticky top-0 shrink-0 flex">
<Tabs.List class="grow w-full after:hidden">
<Tabs.Trigger value="files" class="flex-1 justify-center text-xs">
Files
</Tabs.Trigger>
<Tabs.Trigger value="changes" class="flex-1 justify-center text-xs">
Changes
</Tabs.Trigger>
</Tabs.List>
</div>
<Tabs.Content value="files" class="grow min-h-0 py-2 bg-background">
<FileTree path="" onFileClick={handleFileClick} />
</Tabs.Content>
<Tabs.Content value="changes" class="grow min-h-0 py-2 bg-background">
<Show
when={local.file.changes().length}
fallback={<div class="px-2 text-xs text-text-muted">No changes</div>}
>
<ul class="">
<For each={local.file.changes()}>
{(path) => (
<li>
<button
onClick={() => local.file.open(path, { view: "diff-unified", pinned: true })}
class="w-full flex items-center px-2 py-0.5 gap-x-2 text-text-muted grow min-w-0 cursor-pointer hover:bg-background-element"
>
<FileIcon node={{ path, type: "file" }} class="shrink-0 size-3" />
<span class="text-xs text-text whitespace-nowrap">{getFilename(path)}</span>
<span class="text-xs text-text-muted/60 whitespace-nowrap truncate min-w-0">
{getDirectory(path)}
</span>
</button>
</li>
)}
</For>
</ul>
</Show>
</Tabs.Content>
</Tabs>
</div>
<div
class="fixed top-0 h-full w-1.5 bg-transparent cursor-col-resize z-50 group"
style={`left: ${local.layout.leftWidth()}px`}
onMouseDown={(e) => handleLeftDragStart(e)}
>
<div
classList={{
"w-0.5 h-full bg-transparent group-hover:bg-border-active transition-colors": true,
"bg-border-active!": store.dragging === "left",
}}
/>
</div>
<Show when={local.layout.rightPane()}>
<div
class="fixed top-0 right-0 h-full border-l border-border-subtle/30 flex flex-col overflow-hidden bg-background z-10"
style={`width: ${local.layout.rightWidth()}px`}
>
<div class="relative flex-1 min-h-0 overflow-y-auto overflow-x-hidden">
<Show when={local.session.active()} fallback={<SessionList />}>
{(activeSession) => (
<div class="relative">
<div class="sticky top-0 bg-background z-50 px-2 h-8 border-b border-border-subtle/30">
<div class="h-full flex items-center gap-2">
<IconButton
size="xs"
variant="ghost"
onClick={() => local.session.clearActive()}
class="text-text-muted hover:text-text"
>
<Icon name="arrow-left" size={14} />
</IconButton>
<h2 class="text-sm font-medium text-text truncate">
{activeSession().title || "Untitled Session"}
</h2>
</div>
</div>
<SessionTimeline session={activeSession().id} />
</div>
)}
</Show>
</div>
</div>
<div
class="fixed top-0 h-full w-1.5 bg-transparent cursor-col-resize z-50 group flex justify-end"
style={`right: ${local.layout.rightWidth()}px`}
onMouseDown={(e) => handleRightDragStart(e)}
>
<div
classList={{
"w-0.5 h-full bg-transparent group-hover:bg-border-active transition-colors": true,
"bg-border-active!": store.dragging === "right",
}}
/>
</div>
</Show>
<div
class="relative"
style={`margin-left: ${local.layout.leftWidth()}px; margin-right: ${local.layout.rightPane() ? local.layout.rightWidth() : 0}px`}
>
<Logo
size={64}
variant="ornate"
class="absolute top-2/5 left-1/2 transform -translate-x-1/2 -translate-y-1/2"
/>
<DragDropProvider
onDragStart={onDragStart}
onDragEnd={onDragEnd}
onDragOver={onDragOver}
collisionDetector={closestCenter}
>
<DragDropSensors />
<ConstrainDragYAxis />
<Tabs
class="relative grow w-full flex flex-col h-screen"
value={local.file.active()?.path}
onChange={handleTabChange}
>
<div class="sticky top-0 shrink-0 flex">
<Tabs.List class="grow">
<SortableProvider ids={local.file.opened().map((f) => f.path)}>
<For each={local.file.opened()}>
{(file) => <SortableTab file={file} onTabClick={handleFileClick} onTabClose={handleTabClose} />}
</For>
</SortableProvider>
</Tabs.List>
<div class="shrink-0 h-full flex items-center gap-1 px-2 border-b border-border-subtle/40">
<Show when={local.file.active() && local.file.active()!.content?.diff}>
{(() => {
const f = local.file.active()!
const view = local.file.view(f.path)
return (
<div class="flex items-center gap-1">
<Show when={view !== "raw"}>
<div class="mr-1 flex items-center gap-1">
<Tooltip value="Previous change" placement="bottom">
<IconButton size="xs" variant="ghost" onClick={() => navigateChange(-1)}>
<Icon name="arrow-up" size={14} />
</IconButton>
</Tooltip>
<Tooltip value="Next change" placement="bottom">
<IconButton size="xs" variant="ghost" onClick={() => navigateChange(1)}>
<Icon name="arrow-down" size={14} />
</IconButton>
</Tooltip>
</div>
</Show>
<Tooltip value="Raw" placement="bottom">
<IconButton
size="xs"
variant="ghost"
classList={{
"text-text": view === "raw",
"text-text-muted/70": view !== "raw",
"bg-background-element": view === "raw",
}}
onClick={() => local.file.setView(f.path, "raw")}
>
<Icon name="file-text" size={14} />
</IconButton>
</Tooltip>
<Tooltip value="Unified diff" placement="bottom">
<IconButton
size="xs"
variant="ghost"
classList={{
"text-text": view === "diff-unified",
"text-text-muted/70": view !== "diff-unified",
"bg-background-element": view === "diff-unified",
}}
onClick={() => local.file.setView(f.path, "diff-unified")}
>
<Icon name="checklist" size={14} />
</IconButton>
</Tooltip>
<Tooltip value="Split diff" placement="bottom">
<IconButton
size="xs"
variant="ghost"
classList={{
"text-text": view === "diff-split",
"text-text-muted/70": view !== "diff-split",
"bg-background-element": view === "diff-split",
}}
onClick={() => local.file.setView(f.path, "diff-split")}
>
<Icon name="columns" size={14} />
</IconButton>
</Tooltip>
</div>
)
})()}
</Show>
<Tooltip value={local.layout.rightPane() ? "Close pane" : "Open pane"} placement="bottom">
<IconButton size="xs" variant="ghost" onClick={() => local.layout.toggleRightPane()}>
<Icon name={local.layout.rightPane() ? "close-pane" : "open-pane"} size={14} />
</IconButton>
</Tooltip>
</div>
</div>
<For each={local.file.opened()}>
{(file) => (
<Tabs.Content value={file.path} class="grow h-full pt-1 select-text">
{(() => {
const view = local.file.view(file.path)
const showRaw = view === "raw" || !file.content?.diff
const code = showRaw ? (file.content?.content ?? "") : (file.content?.diff ?? "")
return <Code path={file.path} code={code} />
})()}
</Tabs.Content>
)}
</For>
</Tabs>
<DragOverlay>
{store.activeItem &&
(() => {
const draggedFile = local.file.node(store.activeItem!)
return (
<div
class="relative px-3 h-8 flex items-center
text-sm font-medium text-text whitespace-nowrap
shrink-0 bg-background-panel
border-x border-border-subtle/40 border-b border-b-transparent"
>
<TabVisual file={draggedFile} />
</div>
)
})()}
</DragOverlay>
</DragDropProvider>
<form
onSubmit={handleSubmit}
class="peer/editor absolute inset-x-4 z-50 flex items-center justify-center"
classList={{
"bottom-8": !!local.file.active(),
"bottom-2/5": local.file.active() === undefined,
}}
>
<div
class="w-full max-w-xl min-w-0 p-2 mx-auto rounded-lg isolate backdrop-blur-xs
flex flex-col gap-1
bg-gradient-to-b from-background-panel/90 to-background/90
ring-1 ring-border-active/50 border border-transparent
shadow-[0_0_33px_rgba(0,0,0,0.8)]
focus-within:ring-2 focus-within:ring-primary/40 focus-within:border-primary"
>
<div class="flex flex-wrap gap-1">
<Show when={local.file.active()}>
<FileTag
default
file={local.file.active()!}
onClose={() => local.file.close(local.file.active()?.path ?? "")}
/>
</Show>
<For each={local.file.opened().filter((x) => x.selection)}>
{(file) => <FileTag file={file} onClose={() => local.file.select(file.path, undefined)} />}
</For>
</div>
<input
ref={(el) => (inputRef = el)}
type="text"
value={store.prompt}
onInput={(e) => setStore("prompt", e.currentTarget.value)}
placeholder="Placeholder text..."
class="w-full p-1 pb-4 text-text font-light placeholder-text-muted/70 text-sm focus:outline-none"
/>
<div class="flex justify-between items-center text-xs text-text-muted">
<div class="flex gap-2 items-center">
<Select
options={local.agent.list().map((a) => a.name)}
current={local.agent.current().name}
onSelect={local.agent.set}
class="uppercase"
/>
<Button onClick={() => setStore("modelSelectOpen", true)}>
{local.model.current()?.name ?? "Select model"}
<Icon name="chevron-down" size={24} class="text-text-muted" />
</Button>
<span class="text-text-muted/70 whitespace-nowrap">{local.model.current()?.provider.name}</span>
</div>
<div class="flex gap-1 items-center">
<IconButton class="text-text-muted" size="xs" variant="ghost">
<Icon name="photo" size={16} />
</IconButton>
<IconButton class="text-background-panel! bg-primary rounded-full!" size="xs" variant="ghost">
<Icon name="arrow-up" size={14} />
</IconButton>
</div>
</div>
</div>
</form>
</div>
<Show when={store.modelSelectOpen}>
<SelectDialog
key={(x) => `${x.provider.id}:${x.id}`}
items={local.model.list()}
current={local.model.current()}
render={(i) => (
<div class="w-full flex items-center justify-between">
<div class="flex items-center gap-x-2 text-text-muted grow min-w-0">
<img src={`https://models.dev/logos/${i.provider.id}.svg`} class="size-4 invert opacity-40" />
<span class="text-xs text-text whitespace-nowrap">{i.name}</span>
<span class="text-xs text-text-muted/80 whitespace-nowrap overflow-hidden overflow-ellipsis truncate min-w-0">
{i.id}
</span>
</div>
<div class="flex items-center gap-x-1 text-text-muted/40 shrink-0">
<Tooltip forceMount={false} value="Reasoning">
<Icon name="brain" size={16} classList={{ "text-accent": i.reasoning }} />
</Tooltip>
<Tooltip forceMount={false} value="Tools">
<Icon name="hammer" size={16} classList={{ "text-secondary": i.tool_call }} />
</Tooltip>
<Tooltip forceMount={false} value="Attachments">
<Icon name="photo" size={16} classList={{ "text-success": i.attachment }} />
</Tooltip>
<div class="rounded-full bg-text-muted/20 text-text-muted/80 w-9 h-4 flex items-center justify-center text-[10px]">
{new Intl.NumberFormat("en-US", {
notation: "compact",
compactDisplay: "short",
}).format(i.limit.context)}
</div>
<Tooltip forceMount={false} value={`$${i.cost?.input}/1M input, $${i.cost?.output}/1M output`}>
<div class="rounded-full bg-success/20 text-success/80 w-9 h-4 flex items-center justify-center text-[10px]">
<Switch fallback="FREE">
<Match when={i.cost?.input > 10}>$$$</Match>
<Match when={i.cost?.input > 1}>$$</Match>
<Match when={i.cost?.input > 0.1}>$</Match>
</Switch>
</div>
</Tooltip>
</div>
</div>
)}
filter={["provider.name", "name", "id"]}
groupBy={(x) => x.provider.name}
onClose={() => setStore("modelSelectOpen", false)}
onSelect={(x) => local.model.set(x ? { modelID: x.id, providerID: x.provider.id } : undefined)}
/>
</Show>
<Show when={store.fileSelectOpen}>
<SelectDialog
items={local.file.search}
key={(x) => x}
render={(i) => (
<div class="w-full flex items-center justify-between">
<div class="flex items-center gap-x-2 text-text-muted grow min-w-0">
<FileIcon node={{ path: i, type: "file" }} class="shrink-0 size-4" />
<span class="text-xs text-text whitespace-nowrap">{getFilename(i)}</span>
<span class="text-xs text-text-muted/80 whitespace-nowrap overflow-hidden overflow-ellipsis truncate min-w-0">
{getDirectory(i)}
</span>
</div>
<div class="flex items-center gap-x-1 text-text-muted/40 shrink-0"></div>
</div>
)}
onClose={() => setStore("fileSelectOpen", false)}
onSelect={(x) => (x ? local.file.open(x, { pinned: true }) : undefined)}
/>
</Show>
</div>
)
}
const TabVisual = (props: { file: LocalFile }) => {
return (
<div class="flex items-center gap-x-1.5">
<FileIcon node={props.file} class="" />
<span classList={{ "text-xs": true, "text-primary": !!props.file.status?.status, italic: !props.file.pinned }}>
{props.file.name}
</span>
<span class="text-xs opacity-70">
<Switch>
<Match when={props.file.status?.status === "modified"}>
<span class="text-primary">M</span>
</Match>
<Match when={props.file.status?.status === "added"}>
<span class="text-success">A</span>
</Match>
<Match when={props.file.status?.status === "deleted"}>
<span class="text-error">D</span>
</Match>
</Switch>
</span>
</div>
)
}
const SortableTab = (props: {
file: LocalFile
onTabClick: (file: LocalFile) => void
onTabClose: (file: LocalFile) => void
}) => {
const sortable = createSortable(props.file.path)
return (
// @ts-ignore
<div use:sortable classList={{ "opacity-0": sortable.isActiveDraggable }}>
<Tooltip value={props.file.path} placement="bottom">
<div class="relative">
<Tabs.Trigger value={props.file.path} class="peer/tab pr-7" onClick={() => props.onTabClick(props.file)}>
<TabVisual file={props.file} />
</Tabs.Trigger>
<IconButton
class="absolute right-1 top-1.5 opacity-0 text-text-muted/60
peer-data-[selected]/tab:opacity-100 peer-data-[selected]/tab:text-text
peer-data-[selected]/tab:hover:bg-border-subtle
hover:opacity-100 peer-hover/tab:opacity-100"
size="xs"
variant="ghost"
onClick={() => props.onTabClose(props.file)}
>
<Icon name="close" size={16} />
</IconButton>
</div>
</Tooltip>
</div>
)
}
const FileTag = (props: { file: LocalFile; default?: boolean; onClose: () => void }) => (
<div
class="flex items-center bg-background group/tag
border border-border-subtle/60 border-dashed
rounded-md text-xs text-text-muted"
>
<IconButton class="text-text-muted" size="xs" variant="ghost" onClick={props.onClose}>
<Switch fallback={<FileIcon node={props.file} class="group-hover/tag:hidden size-3!" />}>
<Match when={props.default}>
<Icon name="file" class="group-hover/tag:hidden" size={12} />
</Match>
</Switch>
<Icon name="close" class="hidden group-hover/tag:block" size={12} />
</IconButton>
<div class="pr-1 flex gap-1 items-center">
<span>{props.file.name}</span>
<Show when={!props.default && props.file.selection}>
<span class="">
({props.file.selection!.startLine}-{props.file.selection!.endLine})
</span>
</Show>
</div>
</div>
)
const ConstrainDragYAxis = () => {
const context = useDragDropContext()
if (!context) return <></>
const [, { onDragStart, onDragEnd, addTransformer, removeTransformer }] = context
const transformer: Transformer = {
id: "constrain-y-axis",
order: 100,
callback: (transform) => ({ ...transform, y: 0 }),
}
onDragStart((event: any) => {
addTransformer("draggables", event.draggable.id, transformer)
})
onDragEnd((event: any) => {
removeTransformer("draggables", event.draggable.id, transformer.id)
})
return <></>
}

View File

@@ -1,5 +0,0 @@
import { type ParentProps } from "solid-js"
export default function Layout(props: ParentProps) {
return <main class="">{props.children}</main>
}

View File

@@ -1,36 +0,0 @@
import { Button as Kobalte } from "@kobalte/core/button"
import { type ComponentProps, splitProps } from "solid-js"
export interface ButtonProps {
variant?: "primary" | "secondary" | "ghost"
size?: "sm" | "md" | "lg"
}
export function Button(props: ComponentProps<"button"> & ButtonProps) {
const [split, rest] = splitProps(props, ["variant", "size", "class", "classList"])
return (
<Kobalte
{...rest}
data-size={split.size || "sm"}
data-variant={split.variant || "secondary"}
class="inline-flex items-center justify-center rounded-md cursor-pointer font-medium transition-colors
min-w-0 whitespace-nowrap truncate
data-[size=sm]:h-6 data-[size=sm]:pl-2 data-[size=sm]:text-xs
data-[size=md]:h-8 data-[size=md]:pl-3 data-[size=md]:text-sm
data-[size=lg]:h-10 data-[size=lg]:pl-4 data-[size=lg]:text-base
data-[variant=primary]:bg-primary data-[variant=primary]:text-background
data-[variant=primary]:hover:bg-secondary data-[variant=primary]:focus-visible:ring-primary
data-[variant=secondary]:bg-background-element data-[variant=secondary]:text-text
data-[variant=secondary]:hover:bg-background-element data-[variant=secondary]:focus-visible:ring-secondary
data-[variant=ghost]:text-text data-[variant=ghost]:hover:bg-background-panel data-[variant=ghost]:focus-visible:ring-border-active
focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-offset-transparent
disabled:pointer-events-none disabled:opacity-50"
classList={{
...(split.classList ?? {}),
[split.class ?? ""]: !!split.class,
}}
>
{props.children}
</Kobalte>
)
}

View File

@@ -1,38 +0,0 @@
import { Button as KobalteButton } from "@kobalte/core/button"
import { splitProps } from "solid-js"
import type { ComponentProps, JSX } from "solid-js"
export interface IconButtonProps extends ComponentProps<typeof KobalteButton> {
variant?: "primary" | "secondary" | "outline" | "ghost"
size?: "xs" | "sm" | "md" | "lg"
children: JSX.Element
}
export function IconButton(props: IconButtonProps) {
const [local, others] = splitProps(props, ["variant", "size", "class", "classList"])
return (
<KobalteButton
classList={{
...(local.classList || {}),
"inline-flex items-center justify-center rounded-md font-medium cursor-pointer": true,
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2": true,
"disabled:pointer-events-none disabled:opacity-50": true,
"bg-primary text-background hover:bg-secondary focus-visible:ring-primary data-[disabled]:opacity-50":
(local.variant || "primary") === "primary",
"bg-background-panel text-text hover:bg-background-element focus-visible:ring-secondary data-[disabled]:opacity-50":
local.variant === "secondary",
"border border-border bg-transparent text-text hover:bg-background-panel": local.variant === "outline",
"focus-visible:ring-border-active data-[disabled]:border-border-subtle data-[disabled]:text-text-muted":
local.variant === "outline",
"text-text hover:bg-background-panel focus-visible:ring-border-active data-[disabled]:text-text-muted":
local.variant === "ghost",
"h-5 w-5 text-xs": local.size === "xs",
"h-8 w-8 text-sm": local.size === "sm",
"h-10 w-10 text-sm": (local.size || "md") === "md",
"h-12 w-12 text-base": local.size === "lg",
[local.class ?? ""]: !!local.class,
}}
{...others}
/>
)
}

View File

@@ -1,13 +0,0 @@
export { Button, type ButtonProps } from "./button"
export {
Collapsible,
type CollapsibleProps,
type CollapsibleTriggerProps,
type CollapsibleContentProps,
} from "./collapsible"
export { FileIcon, type FileIconProps } from "./file-icon"
export { Icon, type IconProps } from "./icon"
export { IconButton, type IconButtonProps } from "./icon-button"
export { Link, type LinkProps } from "./link"
export { Logo, type LogoProps } from "./logo"
export { Tooltip, type TooltipProps } from "./tooltip"

View File

@@ -1,13 +0,0 @@
import { A } from "@solidjs/router"
import { splitProps } from "solid-js"
import type { ComponentProps } from "solid-js"
export interface LinkProps extends ComponentProps<typeof A> {
variant?: "primary" | "secondary" | "ghost"
size?: "sm" | "md" | "lg"
}
export function Link(props: LinkProps) {
const [, others] = splitProps(props, ["variant", "size", "class"])
return <A {...others} />
}

View File

@@ -1,125 +0,0 @@
import type { ComponentProps } from "solid-js"
export interface LogoProps extends ComponentProps<"svg"> {
variant?: "mark" | "full" | "ornate"
size?: number
}
export function Logo(props: LogoProps) {
const { variant = "mark", size = 64, ...others } = props
if (variant === "mark") {
return (
<svg
width={size}
height={size * (42 / 64)}
viewBox="0 0 64 42"
fill="none"
xmlns="http://www.w3.org/2000/svg"
class={`text-text ${props.class ?? ""}`}
{...others}
>
<path
fill-rule="evenodd"
clip-rule="evenodd"
d="M0 0H32V41.5955H0V0ZM24 8.5H8V33H24V8.5Z"
fill="currentColor"
/>
<path d="M40 0H64V8.5H48V33H64V41.5H40V0Z" fill="currentColor" />
</svg>
)
}
if (variant === "full") {
return (
<svg
width={size * (289 / 42)}
height={size}
viewBox="0 0 289 42"
fill="none"
xmlns="http://www.w3.org/2000/svg"
{...others}
>
<path d="M264.5 0H288.5V8.5H272.5V16.5H288.5V25H272.5V33H288.5V41.5H264.5V0Z" fill="currentColor" />
<path d="M248.5 0H224.5V41.5H248.5V33H232.5V8.5H248.5V0Z" fill="currentColor" />
<path d="M256.5 8.5H248.5V33H256.5V8.5Z" fill="currentColor" />
<path
fill-rule="evenodd"
clip-rule="evenodd"
d="M184.5 0H216.5V41.5H184.5V0ZM208.5 8.5H192.5V33H208.5V8.5Z"
fill="currentColor"
/>
<path d="M144.5 8.5H136.5V41.5H144.5V8.5Z" fill="currentColor" />
<path d="M136.5 0H112.5V41.5H120.5V8.5H136.5V0Z" fill="currentColor" />
<path d="M80.5 0H104.5V8.5H88.5V16.5H104.5V25H88.5V33H104.5V41.5H80.5V0Z" fill="currentColor" />
<path
fill-rule="evenodd"
clip-rule="evenodd"
d="M40.5 0H72.5V41.5H48.5V49.5H40.5V0ZM64.5 8.5H48.5V33H64.5V8.5Z"
fill="currentColor"
/>
<path
fill-rule="evenodd"
clip-rule="evenodd"
d="M0.5 0H32.5V41.5955H0.5V0ZM24.5 8.5H8.5V33H24.5V8.5Z"
fill="currentColor"
/>
<path d="M152.5 0H176.5V8.5H160.5V33H176.5V41.5H152.5V0Z" fill="currentColor" />
</svg>
)
}
return (
<svg
width={size * (289 / 42)}
height={size}
viewBox="0 0 289 50"
fill="none"
xmlns="http://www.w3.org/2000/svg"
{...others}
>
<path d="M8.5 16.5H24.5V33H8.5V16.5Z" fill="currentColor" fill-opacity="0.2" />
<path d="M48.5 16.5H64.5V33H48.5V16.5Z" fill="currentColor" fill-opacity="0.2" />
<path d="M120.5 16.5H136.5V33H120.5V16.5Z" fill="currentColor" fill-opacity="0.2" />
<path d="M160.5 16.5H176.5V33H160.5V16.5Z" fill="currentColor" fill-opacity="0.2" />
<path d="M192.5 16.5H208.5V33H192.5V16.5Z" fill="currentColor" fill-opacity="0.2" />
<path d="M232.5 16.5H248.5V33H232.5V16.5Z" fill="currentColor" fill-opacity="0.2" />
<path
d="M264.5 0H288.5V8.5H272.5V16.5H288.5V25H272.5V33H288.5V41.5H264.5V0Z"
fill="currentColor"
fill-opacity="0.95"
/>
<path d="M248.5 0H224.5V41.5H248.5V33H232.5V8.5H248.5V0Z" fill="currentColor" fill-opacity="0.95" />
<path d="M256.5 8.5H248.5V33H256.5V8.5Z" fill="currentColor" fill-opacity="0.95" />
<path
fill-rule="evenodd"
clip-rule="evenodd"
d="M184.5 0H216.5V41.5H184.5V0ZM208.5 8.5H192.5V33H208.5V8.5Z"
fill="currentColor"
fill-opacity="0.95"
/>
<path d="M144.5 8.5H136.5V41.5H144.5V8.5Z" fill="currentColor" fill-opacity="0.5" />
<path d="M136.5 0H112.5V41.5H120.5V8.5H136.5V0Z" fill="currentColor" fill-opacity="0.5" />
<path
d="M80.5 0H104.5V8.5H88.5V16.5H104.5V25H88.5V33H104.5V41.5H80.5V0Z"
fill="currentColor"
fill-opacity="0.5"
/>
<path
fill-rule="evenodd"
clip-rule="evenodd"
d="M40.5 0H72.5V41.5H48.5V49.5H40.5V0ZM64.5 8.5H48.5V33H64.5V8.5Z"
fill="currentColor"
fill-opacity="0.5"
/>
<path
fill-rule="evenodd"
clip-rule="evenodd"
d="M0.5 0H32.5V41.5955H0.5V0ZM24.5 8.5H8.5V33H24.5V8.5Z"
fill="currentColor"
fill-opacity="0.5"
/>
<path d="M152.5 0H176.5V8.5H160.5V33H176.5V41.5H152.5V0Z" fill="currentColor" fill-opacity="0.95" />
</svg>
)
}

View File

@@ -1,71 +0,0 @@
import { Tabs as KobalteTabs } from "@kobalte/core/tabs"
import { splitProps } from "solid-js"
import type { ComponentProps, ParentProps } from "solid-js"
export interface TabsProps extends ComponentProps<typeof KobalteTabs> {}
export interface TabsListProps extends ComponentProps<typeof KobalteTabs.List> {}
export interface TabsTriggerProps extends ComponentProps<typeof KobalteTabs.Trigger> {}
export interface TabsContentProps extends ComponentProps<typeof KobalteTabs.Content> {}
function TabsRoot(props: TabsProps) {
return <KobalteTabs {...props} />
}
function TabsList(props: TabsListProps) {
const [local, others] = splitProps(props, ["class"])
return (
<KobalteTabs.List
classList={{
"relative flex items-center bg-background overflow-x-auto no-scrollbar": true,
"divide-x divide-border-subtle/40": true,
"after:content-[''] after:block after:grow after:h-8": true,
"after:border-l empty:after:border-l-0! after:border-b after:border-border-subtle/40": true,
[local.class ?? ""]: !!local.class,
}}
{...others}
/>
)
}
function TabsTrigger(props: ParentProps<TabsTriggerProps>) {
const [local, others] = splitProps(props, ["class", "children"])
return (
<KobalteTabs.Trigger
classList={{
"relative px-3 h-8 flex items-center": true,
"text-sm font-medium text-text-muted/60 cursor-pointer": true,
"whitespace-nowrap shrink-0 border-b border-border-subtle/40": true,
"disabled:pointer-events-none disabled:opacity-50": true,
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring": true,
"data-[selected]:text-text data-[selected]:bg-background-panel": true,
"data-[selected]:!border-b-transparent": true,
[local.class ?? ""]: !!local.class,
}}
{...others}
>
{local.children}
</KobalteTabs.Trigger>
)
}
function TabsContent(props: ParentProps<TabsContentProps>) {
const [local, others] = splitProps(props, ["class", "children"])
return (
<KobalteTabs.Content
classList={{
"bg-background-panel overflow-y-auto h-full no-scrollbar": true,
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring": true,
[local.class ?? ""]: !!local.class,
}}
{...others}
>
{local.children}
</KobalteTabs.Content>
)
}
export const Tabs = Object.assign(TabsRoot, {
List: TabsList,
Trigger: TabsTrigger,
Content: TabsContent,
})

View File

@@ -1,56 +0,0 @@
import { Tooltip as KobalteTooltip } from "@kobalte/core/tooltip"
import { children, createEffect, createSignal, splitProps } from "solid-js"
import type { ComponentProps } from "solid-js"
export interface TooltipProps extends ComponentProps<typeof KobalteTooltip> {
value: string | (() => string)
class?: string
}
export function Tooltip(props: TooltipProps) {
const [open, setOpen] = createSignal(false)
const [local, others] = splitProps(props, ["class", "children"])
const c = children(() => local.children)
createEffect(() => {
const childElements = c()
if (childElements instanceof HTMLElement) {
childElements.addEventListener("focus", () => setOpen(true))
childElements.addEventListener("blur", () => setOpen(false))
} else if (Array.isArray(childElements)) {
for (const child of childElements) {
if (child instanceof HTMLElement) {
child.addEventListener("focus", () => setOpen(true))
child.addEventListener("blur", () => setOpen(false))
}
}
}
})
return (
<KobalteTooltip forceMount {...others} open={open()} onOpenChange={setOpen}>
<KobalteTooltip.Trigger as={"div"}>{c()}</KobalteTooltip.Trigger>
<KobalteTooltip.Portal>
<KobalteTooltip.Content
classList={{
"z-[1000] max-w-[320px] rounded-md bg-background-element px-2 py-1": true,
"text-xs font-medium text-text shadow-md pointer-events-none!": true,
"transition-all duration-150 ease-out": true,
"transform-gpu transform-origin-[var(--kb-tooltip-content-transform-origin)]": true,
"data-closed:opacity-0": true,
"data-expanded:opacity-100 data-expanded:translate-y-0 data-expanded:translate-x-0": true,
"data-closed:translate-y-1": props.placement === "top",
"data-closed:-translate-y-1": props.placement === "bottom",
"data-closed:translate-x-1": props.placement === "left",
"data-closed:-translate-x-1": props.placement === "right",
[local.class ?? ""]: !!local.class,
}}
>
{typeof others.value === "function" ? others.value() : others.value}
<KobalteTooltip.Arrow size={18} />
</KobalteTooltip.Content>
</KobalteTooltip.Portal>
</KobalteTooltip>
)
}

View File

@@ -1,14 +0,0 @@
export function getFilename(path: string) {
const parts = path.split("/")
return parts[parts.length - 1]
}
export function getDirectory(path: string) {
const parts = path.split("/")
return parts.slice(0, parts.length - 1).join("/")
}
export function getFileExtension(path: string) {
const parts = path.split(".")
return parts[parts.length - 1]
}

View File

@@ -1,13 +0,0 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"extends": "@tsconfig/bun/tsconfig.json",
"compilerOptions": {
"jsx": "preserve",
"jsxImportSource": "solid-js",
"types": ["vite/client"],
"lib": ["DOM", "DOM.Iterable"],
"paths": {
"@/*": ["./src/*"]
}
}
}

View File

@@ -23,6 +23,9 @@ app.config.timestamp_*.js
# Temp
gitignore
# Generated files
public/sitemap.xml
# System Files
.DS_Store
Thumbs.db

View File

@@ -1,21 +1,22 @@
{
"name": "@opencode/console-app",
"name": "@opencode-ai/console-app",
"type": "module",
"scripts": {
"typecheck": "tsc --noEmit",
"typecheck": "tsgo --noEmit",
"dev": "vinxi dev --host 0.0.0.0",
"dev:remote": "VITE_AUTH_URL=https://auth.dev.opencode.ai bun sst shell --stage=dev bun dev",
"build": "vinxi build && ../../opencode/script/schema.ts ./.output/public/config.json",
"build": "./script/generate-sitemap.ts && vinxi build && ../../opencode/script/schema.ts ./.output/public/config.json",
"start": "vinxi start",
"version": "0.13.8"
"version": "1.0.69"
},
"dependencies": {
"@ibm/plex": "6.4.1",
"@opencode-ai/console-core": "workspace:*",
"@opencode-ai/console-mail": "workspace:*",
"@openauthjs/openauth": "catalog:",
"@kobalte/core": "catalog:",
"@jsx-email/render": "1.1.1",
"@openauthjs/openauth": "0.0.0-20250322224806",
"@opencode/console-core": "workspace:*",
"@opencode/console-mail": "workspace:*",
"@opencode-ai/console-resource": "workspace:*",
"@solidjs/meta": "^0.29.4",
"@solidjs/router": "^0.15.0",
"@solidjs/start": "^1.1.0",
@@ -23,6 +24,10 @@
"vinxi": "^0.5.7",
"zod": "catalog:"
},
"devDependencies": {
"typescript": "catalog:",
"@typescript/native-preview": "catalog:"
},
"engines": {
"node": ">=22"
}

View File

@@ -1,5 +1,4 @@
<svg width="400" height="400" viewBox="0 0 400 400" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="400" height="400" fill="#0E0E0E"/>
<path d="M252 278H148V174H252V278Z" fill="#6A6565"/>
<path d="M252 122H148V278H252V122ZM304 330H96V70H304V330Z" fill="white"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M312 340H88V60H312V340ZM256 116H144V284H256V116Z" fill="white"/>
</svg>

Before

Width:  |  Height:  |  Size: 282 B

After

Width:  |  Height:  |  Size: 269 B

Binary file not shown.

View File

@@ -0,0 +1,103 @@
#!/usr/bin/env bun
import { readdir, writeFile } from "fs/promises"
import { join, dirname } from "path"
import { fileURLToPath } from "url"
import { config } from "../src/config.js"
const __dirname = dirname(fileURLToPath(import.meta.url))
const BASE_URL = config.baseUrl
const PUBLIC_DIR = join(__dirname, "../public")
const ROUTES_DIR = join(__dirname, "../src/routes")
const DOCS_DIR = join(__dirname, "../../../web/src/content/docs")
interface SitemapEntry {
url: string
priority: number
changefreq: string
}
async function getMainRoutes(): Promise<SitemapEntry[]> {
const routes: SitemapEntry[] = []
// Add main static routes
const staticRoutes = [
{ path: "/", priority: 1.0, changefreq: "daily" },
{ path: "/enterprise", priority: 0.8, changefreq: "weekly" },
{ path: "/brand", priority: 0.6, changefreq: "monthly" },
{ path: "/zen", priority: 0.8, changefreq: "weekly" },
]
for (const route of staticRoutes) {
routes.push({
url: `${BASE_URL}${route.path}`,
priority: route.priority,
changefreq: route.changefreq,
})
}
return routes
}
async function getDocsRoutes(): Promise<SitemapEntry[]> {
const routes: SitemapEntry[] = []
try {
const files = await readdir(DOCS_DIR)
for (const file of files) {
if (!file.endsWith(".mdx")) continue
const slug = file.replace(".mdx", "")
const path = slug === "index" ? "/docs/" : `/docs/${slug}`
routes.push({
url: `${BASE_URL}${path}`,
priority: slug === "index" ? 0.9 : 0.7,
changefreq: "weekly",
})
}
} catch (error) {
console.error("Error reading docs directory:", error)
}
return routes
}
function generateSitemapXML(entries: SitemapEntry[]): string {
const urls = entries
.map(
(entry) => ` <url>
<loc>${entry.url}</loc>
<changefreq>${entry.changefreq}</changefreq>
<priority>${entry.priority}</priority>
</url>`,
)
.join("\n")
return `<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
${urls}
</urlset>`
}
async function main() {
console.log("Generating sitemap...")
const mainRoutes = await getMainRoutes()
const docsRoutes = await getDocsRoutes()
const allRoutes = [...mainRoutes, ...docsRoutes]
console.log(`Found ${mainRoutes.length} main routes`)
console.log(`Found ${docsRoutes.length} docs routes`)
console.log(`Total: ${allRoutes.length} routes`)
const xml = generateSitemapXML(allRoutes)
const outputPath = join(PUBLIC_DIR, "sitemap.xml")
await writeFile(outputPath, xml, "utf-8")
console.log(`✓ Sitemap generated at ${outputPath}`)
}
main()

View File

@@ -12,7 +12,7 @@ export default function App() {
root={(props) => (
<MetaProvider>
<Title>opencode</Title>
<Meta name="description" content="opencode - The AI coding agent built for the terminal." />
<Meta name="description" content="OpenCode - The AI coding agent built for the terminal." />
<Suspense>{props.children}</Suspense>
</MetaProvider>
)}

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

View File

@@ -0,0 +1,16 @@
<svg width="240" height="300" viewBox="0 0 240 300" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_1401_86283)">
<mask id="mask0_1401_86283" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="0" y="0" width="240" height="300">
<path d="M240 0H0V300H240V0Z" fill="white"/>
</mask>
<g mask="url(#mask0_1401_86283)">
<path d="M180 240H60V120H180V240Z" fill="#4B4646"/>
<path d="M180 60H60V240H180V60ZM240 300H0V0H240V300Z" fill="#F1ECEC"/>
</g>
</g>
<defs>
<clipPath id="clip0_1401_86283">
<rect width="240" height="300" fill="white"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 593 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

View File

@@ -0,0 +1,16 @@
<svg width="240" height="300" viewBox="0 0 240 300" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_1401_86274)">
<mask id="mask0_1401_86274" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="0" y="0" width="240" height="300">
<path d="M240 0H0V300H240V0Z" fill="white"/>
</mask>
<g mask="url(#mask0_1401_86274)">
<path d="M180 240H60V120H180V240Z" fill="#CFCECD"/>
<path d="M180 60H60V240H180V60ZM240 300H0V0H240V300Z" fill="#211E1E"/>
</g>
</g>
<defs>
<clipPath id="clip0_1401_86274">
<rect width="240" height="300" fill="white"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 593 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

@@ -0,0 +1,30 @@
<svg width="641" height="115" viewBox="0 0 641 115" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_1401_86292)">
<mask id="mask0_1401_86292" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="0" y="0" width="641" height="115">
<path d="M640.714 0H0V115H640.714V0Z" fill="white"/>
</mask>
<g mask="url(#mask0_1401_86292)">
<path d="M49.2868 82.1433H16.4297V49.2861H49.2868V82.1433Z" fill="#4B4646"/>
<path d="M49.2857 32.8573H16.4286V82.143H49.2857V32.8573ZM65.7143 98.5716H0V16.4287H65.7143V98.5716Z" fill="#B7B1B1"/>
<path d="M131.427 82.1433H98.5703V49.2861H131.427V82.1433Z" fill="#4B4646"/>
<path d="M98.5692 82.143H131.426V32.8573H98.5692V82.143ZM147.855 98.5716H98.5692V115H82.1406V16.4287H147.855V98.5716Z" fill="#B7B1B1"/>
<path d="M229.997 65.7139V82.1424H180.711V65.7139H229.997Z" fill="#4B4646"/>
<path d="M230.003 65.7144H180.718V82.143H230.003V98.5716H164.289V16.4287H230.003V65.7144ZM180.718 49.2859H213.575V32.8573H180.718V49.2859Z" fill="#B7B1B1"/>
<path d="M295.717 98.5718H262.859V49.2861H295.717V98.5718Z" fill="#4B4646"/>
<path d="M295.715 32.8573H262.858V98.5716H246.43V16.4287H295.715V32.8573ZM312.144 98.5716H295.715V32.8573H312.144V98.5716Z" fill="#B7B1B1"/>
<path d="M394.286 82.1433H345V49.2861H394.286V82.1433Z" fill="#4B4646"/>
<path d="M394.285 32.8573H344.999V82.143H394.285V98.5716H328.57V16.4287H394.285V32.8573Z" fill="#F1ECEC"/>
<path d="M459.998 82.1433H427.141V49.2861H459.998V82.1433Z" fill="#4B4646"/>
<path d="M459.997 32.8573H427.14V82.143H459.997V32.8573ZM476.425 98.5716H410.711V16.4287H476.425V98.5716Z" fill="#F1ECEC"/>
<path d="M542.146 82.1433H509.289V49.2861H542.146V82.1433Z" fill="#4B4646"/>
<path d="M542.145 32.8571H509.288V82.1429H542.145V32.8571ZM558.574 98.5714H492.859V16.4286H542.145V0H558.574V98.5714Z" fill="#F1ECEC"/>
<path d="M640.715 65.7139V82.1424H591.43V65.7139H640.715Z" fill="#4B4646"/>
<path d="M591.429 32.8573V49.2859H624.286V32.8573H591.429ZM640.714 65.7144H591.429V82.143H640.714V98.5716H575V16.4287H640.714V65.7144Z" fill="#F1ECEC"/>
</g>
</g>
<defs>
<clipPath id="clip0_1401_86292">
<rect width="640.714" height="115" fill="white"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

View File

@@ -0,0 +1,30 @@
<svg width="640" height="115" viewBox="0 0 640 115" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_1401_86330)">
<mask id="mask0_1401_86330" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="0" y="0" width="640" height="115">
<path d="M640 0H0V115H640V0Z" fill="white"/>
</mask>
<g mask="url(#mask0_1401_86330)">
<path d="M49.2346 82.1433H16.4141V49.2861H49.2346V82.1433Z" fill="#CFCECD"/>
<path d="M49.2308 32.8573H16.4103V82.143H49.2308V32.8573ZM65.641 98.5716H0V16.4287H65.641V98.5716Z" fill="#656363"/>
<path d="M131.281 82.1433H98.4609V49.2861H131.281V82.1433Z" fill="#CFCECD"/>
<path d="M98.4649 82.143H131.285V32.8573H98.4649V82.143ZM147.696 98.5716H98.4649V115H82.0547V16.4287H147.696V98.5716Z" fill="#656363"/>
<path d="M229.746 65.7139V82.1424H180.516V65.7139H229.746Z" fill="#CFCECD"/>
<path d="M229.743 65.7144H180.512V82.143H229.743V98.5716H164.102V16.4287H229.743V65.7144ZM180.512 49.2859H213.332V32.8573H180.512V49.2859Z" fill="#656363"/>
<path d="M295.383 98.5718H262.562V49.2861H295.383V98.5718Z" fill="#CFCECD"/>
<path d="M295.387 32.8573H262.567V98.5716H246.156V16.4287H295.387V32.8573ZM311.797 98.5716H295.387V32.8573H311.797V98.5716Z" fill="#656363"/>
<path d="M393.848 82.1433H344.617V49.2861H393.848V82.1433Z" fill="#CFCECD"/>
<path d="M393.844 32.8573H344.613V82.143H393.844V98.5716H328.203V16.4287H393.844V32.8573Z" fill="#211E1E"/>
<path d="M459.485 82.1433H426.664V49.2861H459.485V82.1433Z" fill="#CFCECD"/>
<path d="M459.489 32.8573H426.668V82.143H459.489V32.8573ZM475.899 98.5716H410.258V16.4287H475.899V98.5716Z" fill="#211E1E"/>
<path d="M541.539 82.1433H508.719V49.2861H541.539V82.1433Z" fill="#CFCECD"/>
<path d="M541.535 32.8571H508.715V82.1428H541.535V32.8571ZM557.946 98.5714H492.305V16.4286H541.535V0H557.946V98.5714Z" fill="#211E1E"/>
<path d="M639.996 65.7139V82.1424H590.766V65.7139H639.996Z" fill="#CFCECD"/>
<path d="M590.77 32.8573V49.2859H623.59V32.8573H590.77ZM640 65.7144H590.77V82.143H640V98.5716H574.359V16.4287H640V65.7144Z" fill="#211E1E"/>
</g>
</g>
<defs>
<clipPath id="clip0_1401_86330">
<rect width="640" height="115" fill="white"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

@@ -0,0 +1,22 @@
<svg width="641" height="115" viewBox="0 0 641 115" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_1401_86315)">
<mask id="mask0_1401_86315" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="0" y="0" width="641" height="115">
<path d="M640.714 0H0V115H640.714V0Z" fill="white"/>
</mask>
<g mask="url(#mask0_1401_86315)">
<path d="M49.2857 32.8573H16.4286V82.143H49.2857V32.8573ZM65.7143 98.5716H0V16.4287H65.7143V98.5716Z" fill="white"/>
<path d="M98.5692 82.143H131.426V32.8573H98.5692V82.143ZM147.855 98.5716H98.5692V115H82.1406V16.4287H147.855V98.5716Z" fill="white"/>
<path d="M230.003 65.7144H180.718V82.143H230.003V98.5716H164.289V16.4287H230.003V65.7144ZM180.718 49.2859H213.575V32.8573H180.718V49.2859Z" fill="white"/>
<path d="M295.715 32.8573H262.858V98.5716H246.43V16.4287H295.715V32.8573ZM312.144 98.5716H295.715V32.8573H312.144V98.5716Z" fill="white"/>
<path d="M394.285 32.8573H344.999V82.143H394.285V98.5716H328.57V16.4287H394.285V32.8573Z" fill="white"/>
<path d="M459.997 32.8573H427.14V82.143H459.997V32.8573ZM476.425 98.5716H410.711V16.4287H476.425V98.5716Z" fill="white"/>
<path d="M542.145 32.8571H509.288V82.1429H542.145V32.8571ZM558.574 98.5714H492.859V16.4286H542.145V0H558.574V98.5714Z" fill="white"/>
<path d="M591.429 32.8573V49.2859H624.286V32.8573H591.429ZM640.714 65.7144H591.429V82.143H640.714V98.5716H575V16.4287H640.714V65.7144Z" fill="white"/>
</g>
</g>
<defs>
<clipPath id="clip0_1401_86315">
<rect width="640.714" height="115" fill="white"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

@@ -0,0 +1,22 @@
<svg width="640" height="115" viewBox="0 0 640 115" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_1401_86353)">
<mask id="mask0_1401_86353" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="0" y="0" width="640" height="115">
<path d="M640 0H0V115H640V0Z" fill="white"/>
</mask>
<g mask="url(#mask0_1401_86353)">
<path d="M49.2308 32.8573H16.4103V82.143H49.2308V32.8573ZM65.641 98.5716H0V16.4287H65.641V98.5716Z" fill="black"/>
<path d="M98.4649 82.143H131.285V32.8573H98.4649V82.143ZM147.696 98.5716H98.4649V115H82.0547V16.4287H147.696V98.5716Z" fill="black"/>
<path d="M229.743 65.7144H180.512V82.143H229.743V98.5716H164.102V16.4287H229.743V65.7144ZM180.512 49.2859H213.332V32.8573H180.512V49.2859Z" fill="black"/>
<path d="M295.387 32.8573H262.567V98.5716H246.156V16.4287H295.387V32.8573ZM311.797 98.5716H295.387V32.8573H311.797V98.5716Z" fill="black"/>
<path d="M393.844 32.8573H344.613V82.143H393.844V98.5716H328.203V16.4287H393.844V32.8573Z" fill="black"/>
<path d="M459.489 32.8573H426.668V82.143H459.489V32.8573ZM475.899 98.5716H410.258V16.4287H475.899V98.5716Z" fill="black"/>
<path d="M541.535 32.8571H508.715V82.1428H541.535V32.8571ZM557.946 98.5714H492.305V16.4286H541.535V0H557.946V98.5714Z" fill="black"/>
<path d="M590.77 32.8573V49.2859H623.59V32.8573H590.77ZM640 65.7144H590.77V82.143H640V98.5716H574.359V16.4287H640V65.7144Z" fill="black"/>
</g>
</g>
<defs>
<clipPath id="clip0_1401_86353">
<rect width="640" height="115" fill="white"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 302 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Some files were not shown because too many files have changed in this diff Show More