Compare commits

..
Author SHA1 Message Date
Dax Raad 51f22c468d sync
publish / version (push) Has been cancelled
publish / build-cli (push) Has been cancelled
publish / build-tauri (map[host:blacksmith-4vcpu-ubuntu-2404 target:x86_64-unknown-linux-gnu]) (push) Has been cancelled
publish / build-tauri (map[host:blacksmith-4vcpu-ubuntu-2404-arm target:aarch64-unknown-linux-gnu]) (push) Has been cancelled
publish / build-tauri (map[host:blacksmith-4vcpu-windows-2025 target:x86_64-pc-windows-msvc]) (push) Has been cancelled
publish / build-tauri (map[host:macos-latest target:aarch64-apple-darwin]) (push) Has been cancelled
publish / build-tauri (map[host:macos-latest target:x86_64-apple-darwin]) (push) Has been cancelled
publish / publish (push) Has been cancelled
2026-01-29 13:04:38 -05:00
Dax Raad 6b0336d475 sync 2026-01-29 13:03:28 -05:00
Dax Raad 5d5977cfef sync 2026-01-29 12:54:32 -05:00
Dax Raad 862597710f sync 2026-01-29 12:33:18 -05:00
Dax Raad d48913b656 sync 2026-01-29 12:28:48 -05:00
Dax Raad 409a670177 sync 2026-01-29 12:27:25 -05:00
opencode 213070da0e release: v0.0.0-ci-202601291718 2026-01-29 12:25:30 -05:00
Dax Raad 5a1412cf0b sync 2026-01-29 12:25:30 -05:00
Dax Raad f730ad508f sync 2026-01-29 12:25:30 -05:00
Dax Raad e3d22489aa sync 2026-01-29 12:25:30 -05:00
Dax Raad 3bc291386e sync 2026-01-29 12:25:30 -05:00
Dax Raad d479254a57 sync 2026-01-29 12:25:30 -05:00
Dax Raad 84bcb06698 sync 2026-01-29 12:25:30 -05:00
Dax Raad a430f0c689 sync 2026-01-29 12:25:30 -05:00
Dax Raad b74b444b45 sync 2026-01-29 12:25:30 -05:00
Dax Raad fe6abe8ade sync 2026-01-29 12:25:30 -05:00
Dax Raad 76c002faf4 sync 2026-01-29 12:25:30 -05:00
Dax Raad a2a828f423 sync 2026-01-29 12:25:30 -05:00
Dax Raad 7a4f63b22a sync 2026-01-29 12:25:30 -05:00
Dax Raad 88ed3f5605 sync 2026-01-29 12:25:30 -05:00
Dax Raad 6cf533b748 sync 2026-01-29 12:25:30 -05:00
Dax Raad b5c9e7d6ce sync 2026-01-29 12:25:30 -05:00
Dax Raad 8bc3d01c75 sync 2026-01-29 12:25:30 -05:00
Dax Raad 6f0b8c19dd sync 2026-01-29 12:25:30 -05:00
Dax Raad a3f27dd924 sync 2026-01-29 12:25:30 -05:00
Dax Raad 0cf04a0295 sync 2026-01-29 12:25:30 -05:00
Dax Raad a5fbb5dbec sync 2026-01-29 12:25:30 -05:00
Dax Raad dfbf5d38f9 sync 2026-01-29 12:25:30 -05:00
Dax Raad cbcbbe04ef sync 2026-01-29 12:25:30 -05:00
Dax Raad 8e3e208917 sync 2026-01-29 12:25:30 -05:00
Dax Raad be2b368507 sync 2026-01-29 12:25:30 -05:00
Dax Raad 128e812500 sync 2026-01-29 12:25:30 -05:00
Dax Raad 1a3f4723e1 sync 2026-01-29 12:25:30 -05:00
Dax Raad fd8177dad9 sync 2026-01-29 12:25:30 -05:00
Dax Raad 568a235445 sync 2026-01-29 12:25:30 -05:00
Dax Raad 9166c6e0f5 sync 2026-01-29 12:25:30 -05:00
Dax Raad e84a8d9b19 sync 2026-01-29 12:25:30 -05:00
Dax Raad 564d373dd2 sync 2026-01-29 12:25:30 -05:00
Dax Raad c62149129f sync 2026-01-29 12:25:30 -05:00
Dax Raad e56016fd21 sync 2026-01-29 12:25:30 -05:00
Dax Raad 221e3182ca sync 2026-01-29 12:25:30 -05:00
Dax Raad 06399f21b4 sync 2026-01-29 12:25:30 -05:00
Dax Raad 96212f15fc sync 2026-01-29 12:25:30 -05:00
Dax Raad 26142b0deb sync 2026-01-29 12:25:30 -05:00
Dax Raad 1d972d6bae sync 2026-01-29 12:25:30 -05:00
Aiden Cline aa92ef37fd tweak: add 'skill' to permissions config section so that ides will show it as autocomplete option (this is already a respected setting) 2026-01-29 10:55:39 -06:00
Goni ZahavyandAiden Cline d5c59a66c1 ci: added gh workflow that adds 'contributor' label to PRs/Issues (#11118)
Co-authored-by: Aiden Cline <63023139+rekram1-node@users.noreply.github.com>
2026-01-29 10:38:08 -06:00
Aiden Cline 301895c7f7 fix: ensure kimi k2.5 from fireworks ai and kimi for coding providers properly set temperature 2026-01-29 10:30:22 -06:00
Ravi Kumar 03ba49af4e fix(telemetry): restore userId and sessionId metadata in experimental_telemetry (#8195) 2026-01-29 10:14:28 -06:00
GitHub Action 008ad54cb5 ignore: update download stats 2026-01-29 2026-01-29 12:07:50 +00:00
Ryan Vogel 571751c313 fix: remove redundant Highlights heading from publish template (#11121) 2026-01-29 06:16:45 -05:00
Github Action 82717f6e8b chore: update nix node_modules hashes 2026-01-29 07:12:38 +00:00
GitHub Action c946f5f7eb chore: generate 2026-01-29 07:10:34 +00:00
Hegyi Áron FerencandBrendan Allan 2af326606c feat(desktop): Add desktop deep link (#10072)
Co-authored-by: Brendan Allan <git@brendonovich.dev>
2026-01-29 15:09:53 +08:00
opencode 7c0067d59d release: v1.1.42
Update Nix Hashes / update-node-modules-hashes (push) Has been cancelled
2026-01-29 05:59:07 +00:00
Aiden Cline 92eb982863 fix: undo change that used anthropic messages endpoint for anthropic models on copilot due to ratelimiting issues, go back to completions endpoint instead 2026-01-28 23:52:23 -06:00
Aiden Clineandaptdnfapt 33c5c100ff fix: frontmatter was adding newlines in some cases causing invalid model ids (#11095)
Co-authored-by: aptdnfapt <aptdnfapt@users.noreply.github.com>
2026-01-28 23:40:59 -06:00
Aiden Cline 0fabdccf11 fix: ensure that kimi doesnt have fake variants available 2026-01-28 23:40:44 -06:00
Sebastian Herrlinger 41ea4694db more timeout race guards 2026-01-29 00:17:39 -05:00
Ariane Emory e84d92da28 feat: Sequential numbering for forked session titles (Issue #10105) (#10321) 2026-01-28 23:08:35 -06:00
Sebastian Herrlinger 58ba486375 guard destroyed input field in timeout 2026-01-28 23:53:37 -05:00
Aiden Cline 121016af81 ci: adjust team 2026-01-28 22:28:48 -06:00
Benjamin Oldenburg f40bdd1ac3 feat(cli): include cache tokens in stats (#10582) 2026-01-28 22:03:44 -06:00
GitHub Action efc9303b27 chore: generate 2026-01-29 04:03:01 +00:00
Aiden Cline b938e1ea99 test: fix test 2026-01-28 22:02:14 -06:00
opencode 9cfdbbb1af release: v1.1.41
Update Nix Hashes / update-node-modules-hashes (push) Has been cancelled
2026-01-29 04:00:39 +00:00
Aiden Cline 29ea9fcf25 fix: ensure variants for copilot models work w/ maxTokens being set 2026-01-28 21:55:50 -06:00
ideallove 870c38a6aa fix: maxOutputTokens was accidentally hardcoded to undefined (#10995) 2026-01-28 21:28:15 -06:00
Saba TchikhinashviliandClaude Opus 4.5 b937fe9450 fix(provider): include providerID in SDK cache key (#11020)
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 21:26:26 -06:00
tan 427ef95f7d fix(opencode): allow media-src data: URL for small audio files (#11082) 2026-01-28 21:21:49 -06:00
GitHub Action d8fe12aafc chore: generate 2026-01-29 03:21:26 +00:00
Devin Griffin a7d7f5bb07 fix(app): make settings more responsive for mobile and small web/desktop (#10775) 2026-01-28 21:20:34 -06:00
Babou 8cdb82038a docs: update experimental environment variables in CLI docs (#11030) 2026-01-28 20:20:13 -06:00
Brendan Allan a9e757b5bb fix(app): types 2026-01-29 10:14:42 +08:00
Aiden Cline 4d2696e027 tweak: add ctx.abort to grep tool 2026-01-28 20:06:36 -06:00
Alex Yaroshuk 0c8de47f7d fix(app): file tabs - auto scroll on open & scroll via mouse wheel (#11070) 2026-01-28 19:45:12 -06:00
Julian Coy 7ad165fbdc fix(typescript errors): remove duplicate keys causing typescript failures (#11071) 2026-01-28 19:41:50 -06:00
Goni Zahavy e5b33f8a5e fix(opencode): add AbortSignal support to Ripgrep.files() and GlobTool (#10833) 2026-01-28 18:47:09 -06:00
Max Kong 90a7e3d64e fix(ui): improve zh duration display formatting (#10844) 2026-01-28 16:53:37 -06:00
Max Kong 33dc70b754 fix(opencode): normalize zh punctuation for Chinese UI (#10842) 2026-01-28 16:52:04 -06:00
GitHub Action 832bbba616 chore: generate 2026-01-28 22:51:20 +00:00
Max Kong 40d5d14304 fix(app): fill missing zh keys to avoid English fallback (#10841) 2026-01-28 16:50:50 -06:00
Alex Yaroshuk 36df0d823a fix(app): alignment and padding in dialogs (#10866) 2026-01-28 16:50:00 -06:00
zerone0x 9424f829eb fix(ui): allow KaTeX inline math to be followed by punctuation (#11033) 2026-01-28 16:44:35 -06:00
GitHub Action 7b561be159 chore: generate 2026-01-28 22:35:01 +00:00
Ryan Vogel c60464de07 fix(script): remove highlights template from release notes (#11052) 2026-01-28 17:34:14 -05:00
opencode 4e41ca74b9 release: v1.1.40
Update Nix Hashes / update-node-modules-hashes (push) Has been cancelled
2026-01-28 20:09:37 +00:00
Tommy D. Rossi 8c05eb22b1 fix(markdown): Add streaming prop to markdown element (#11025) 2026-01-28 12:55:57 -05:00
adamelmore f607353be6 fix(app): close review pane 2026-01-28 10:27:01 -06:00
GitHub Action af3c97f192 chore: generate 2026-01-28 16:12:32 +00:00
RenegadeEandyangtianzhe 26e14ce628 fix: add SubtaskPart with metadata reference (#10990)
Co-authored-by: yangtianzhe <yangtianzhe@corp.netease.com>
2026-01-28 11:11:43 -05:00
Sairaj 57ad1814e3 fix(desktop): enable ctrl+n and ctrl+p for popover navigation (#10777) 2026-01-28 08:12:27 -06:00
GitHub Action 4f60ea6108 chore: generate 2026-01-28 14:11:30 +00:00
Nattawee Phantawong 775d288027 feat(i18n): add th locale support (#10809) 2026-01-28 08:10:50 -06:00
GitHub Action bc4968abbb chore: generate 2026-01-28 13:28:52 +00:00
adamelmore acb92fcd34 chore: cleanup 2026-01-28 07:28:03 -06:00
adamelmore c9bbea4266 chore: cleanup 2026-01-28 07:28:03 -06:00
adamelmore 65e1186efe wip(app): global config 2026-01-28 07:28:03 -06:00
adamelmore 8faa2ffcf8 chore: cleanup 2026-01-28 07:28:02 -06:00
adamelmore bdfd8f8b0f feat(app): custom provider 2026-01-28 07:28:02 -06:00
adamelmore 2f35c40bb5 chore(app): global config changes 2026-01-28 07:28:02 -06:00
GitHub Action 6650aa6f35 ignore: update download stats 2026-01-28 2026-01-28 12:05:45 +00:00
Aiden Cline 8798a77a72 bump: plugins 2026-01-28 07:19:18 +00:00
opencode 6eb2bdd665 release: v1.1.39
Update Nix Hashes / update-node-modules-hashes (push) Has been cancelled
2026-01-28 07:19:17 +00:00
GitHub Action f97197bdb0 chore: generate 2026-01-28 07:05:16 +00:00
Aiden Cline 5a0b3ee673 fix: ensure copilot plugin properly sets headers for new messages api 2026-01-28 02:04:30 -05:00
opencode 3bb10773e6 release: v1.1.38
Update Nix Hashes / update-node-modules-hashes (push) Has been cancelled
2026-01-28 06:42:23 +00:00
Aiden Cline 558590712d fix: ensure parallel tool calls dont double load AGENTS.md 2026-01-28 01:38:10 -05:00
Dax Raad d76e1448f0 ci 2026-01-28 01:33:34 -05:00
Aiden Cline 026b3cc88d bump plugin version 2026-01-28 01:31:01 -05:00
Aiden Cline 28e5557bf4 ignore: adjust flag 2026-01-28 01:09:31 -05:00
GitHub Action 9a8da20a97 chore: generate 2026-01-28 06:05:21 +00:00
Goni Zahavy 63f5669eb5 fix(opencode): ensure unsub(PartUpdated) is always called in TaskTool (#9992) 2026-01-28 01:04:43 -05:00
Frank 427cc3e153 zen: kimi k2.5 2026-01-28 00:09:33 -05:00
Tito aedd760141 fix(cli): restore brand integrity of CLI wordmark (#10912) 2026-01-27 22:24:02 -05:00
GitHub Action 6da9fb8fb9 chore: generate 2026-01-28 03:10:48 +00:00
James Murdza b73e0240a5 docs: add Daytona OpenCode plugin to ecosystem (#10917) 2026-01-27 22:09:55 -05:00
GitHub Action 5f2a7c630b chore: generate 2026-01-28 03:06:58 +00:00
Tommy D. Rossi 7988f52231 feat(app): use opentui markdown component behind experimental flag (#10900) 2026-01-27 22:06:09 -05:00
opencode e3be4c9f23 release: v1.1.37
Update Nix Hashes / update-node-modules-hashes (push) Has been cancelled
2026-01-28 02:35:38 +00:00
adamelmore d9741866c5 fix(app): reintroduce review tab 2026-01-27 20:24:27 -06:00
898118bafb feat: support headless authentication for chatgpt/codex (#10890)
Co-authored-by: Aiden Cline <63023139+rekram1-node@users.noreply.github.com>
Co-authored-by: Aiden Cline <aidenpcline@gmail.com>
2026-01-27 19:05:52 -05:00
adamelmore b4a9e1b190 fix(app): auto-scroll 2026-01-27 17:48:58 -06:00
Alex Yaroshuk 15ffd3cba1 feat(app): add 'connect provider' button to the manage models dialog (#10887) 2026-01-27 17:26:15 -06:00
adamelmore df7f9ae3f4 fix(app): terminal corruption 2026-01-27 16:51:57 -06:00
adamelmore d17ba84ee1 fix(app): file tree not always loading 2026-01-27 16:13:11 -06:00
adamelmore 5c8580a187 test(app): fix outdated e2e test 2026-01-27 16:11:58 -06:00
adamelmore 13b2587e96 test(app): fix outdated e2e test 2026-01-27 15:59:01 -06:00
adamelmore 605e533558 fix(app): file tree not always loading 2026-01-27 15:59:01 -06:00
adamelmore 33d400c567 fix(app): spinner color 2026-01-27 15:59:01 -06:00
Aiden Cline b8e726521d fix(tui): handle 4-5 codes too in c to copy logic 2026-01-27 16:29:01 -05:00
Github Action 95632d893b chore: update nix node_modules hashes 2026-01-27 21:28:23 +00:00
adamelmore 1d5ee3e587 fix(app): not auto-navigating to last project 2026-01-27 15:25:07 -06:00
adamelmore e5b18674f9 feat(desktop): tauri locales 2026-01-27 15:25:07 -06:00
adamelmore 51edf68606 feat(desktop): i18n for tauri side 2026-01-27 15:25:07 -06:00
adamelmore acf0df1e98 chore: cleanup 2026-01-27 15:25:07 -06:00
adamelmore 842f17d6d9 perf(app): better memory management 2026-01-27 15:25:07 -06:00
adamelmore 1ebf63c70c fix(app): don't connect to localhost through vpn 2026-01-27 15:25:06 -06:00
adamelmore d7948c2376 fix(app): auto-scroll 2026-01-27 15:25:06 -06:00
adamelmore 892113ab39 chore(app): show 5 highlights 2026-01-27 15:25:06 -06:00
David Hill f2bf620206 fix(app): highlight selected change
Track clicked file in the Changes tree and apply selection styling to the matching review diff.
2026-01-27 20:22:05 +00:00
David Hill 00c7729658 fix(app): set filetree padding to 6px 2026-01-27 20:13:52 +00:00
David Hill 18d6c2191c fix(app): align filetree change styling 2026-01-27 20:13:52 +00:00
David Hill d15201d11d fix(app): delay nav tooltips 2026-01-27 20:13:52 +00:00
David Hill 1fffbc6fb3 fix(app): adjust titlebar left spacing 2026-01-27 20:13:52 +00:00
David Hill 2ca69ac953 fix(app): shorten nav tooltips 2026-01-27 20:13:52 +00:00
David Hill 8ee5376f9b feat(app): add filetree tooltips with diff labels 2026-01-27 20:13:52 +00:00
David Hill 82068955f7 feat(app): color filetree change dots by diff kind 2026-01-27 20:13:52 +00:00
Frank df8b23db9e Revert "Set temperature for kimi k2.5"
This reverts commit bb63d16fa8.
2026-01-27 14:48:08 -05:00
Frank 2649dcae7f Revert "ci: make tests passing a requirement pre-release"
This reverts commit 8c00818108.
2026-01-27 14:37:33 -05:00
Frank bb63d16fa8 Set temperature for kimi k2.5 2026-01-27 14:13:21 -05:00
Aiden Cline 32ce0f4b0d tweak: add recommended topP/temp for kimi k2.5 2026-01-27 12:43:30 -05:00
GitHub Action 6284565de2 chore: generate 2026-01-27 17:42:26 +00:00
adamelmore 7de42ca242 feat(app): improved layout 2026-01-27 11:40:39 -06:00
adamelmore e2c57735b4 fix(app): session diffs not always loading 2026-01-27 11:38:37 -06:00
adamelmore 07d84fe008 feat(app): show loaded agents.md files 2026-01-27 11:38:37 -06:00
adamelmore b9edd23608 test(app): new e2e smoke tests 2026-01-27 11:38:36 -06:00
adamelmore 06e3c4a4f2 chore(app): translations 2026-01-27 11:38:36 -06:00
adamelmore 2f5a238b51 feat(app): update settings in general settings 2026-01-27 11:38:35 -06:00
Frank 173faca3c6 zen: kimi k2.5 and minimax m2.1 2026-01-27 12:07:00 -05:00
Aiden Cline 8c00818108 ci: make tests passing a requirement pre-release 2026-01-27 11:31:02 -05:00
Aiden Cline f12f7e7718 tweak: adjust retry check to be more defensive 2026-01-27 11:31:02 -05:00
OpeOginni 0aa93379bd chore(docs): Better explanation on how to allow tools in external directories (#10862) 2026-01-27 11:00:10 -05:00
GitHub Action dbc8d7edca chore: generate 2026-01-27 15:59:54 +00:00
dpuyosaandAiden Cline d8e7e915e2 feat(opencode): Handle Venice cache creation tokens (#10735)
Co-authored-by: Aiden Cline <63023139+rekram1-node@users.noreply.github.com>
2026-01-27 10:59:12 -05:00
adamelmore 712d2b7d15 fix(app): swallow file search errors 2026-01-27 08:43:38 -06:00
adamelmore 00e79210e5 fix(app): tooltips causing getComputedStyle errors in model select 2026-01-27 08:43:38 -06:00
adamelmore 099ab929db chore(app): cleanup tailwind vs pure css 2026-01-27 08:43:37 -06:00
adamelmore eac2d4c699 fix(app): navigate to tabs when opening file 2026-01-27 08:43:37 -06:00
adamelmore 3297e5230e fix(app): open markdown links in external browser 2026-01-27 08:43:36 -06:00
adamelmore c3d8d2b27f Revert "fix(app): select model anchor"
This reverts commit 36babf5fc390fd9a892ad3742690740296d94a23.
2026-01-27 08:43:36 -06:00
adamelmore 19c7874493 fix(app): select model anchor 2026-01-27 08:43:36 -06:00
adamelmore 27bb82761b perf(app): shared terminal ghostty-web instance 2026-01-27 08:43:36 -06:00
adamelmore c7e2f1965d perf(app): cleanup connect provider timers 2026-01-27 08:43:35 -06:00
adamelmore 3e420bf8e1 perf(app): don't keep parts in memory 2026-01-27 08:43:35 -06:00
adamelmore ad624f65ee fix(app): don't show session skeleton after workspace reset 2026-01-27 08:43:34 -06:00
David Hill c68261fc06 fix(ui): add max-width 280px to tabs with text truncation 2026-01-27 14:04:10 +00:00
David Hill 2d0049f0d9 fix(app): use smaller close icon on tabs to match comment cards 2026-01-27 14:04:10 +00:00
David Hill 52387e7f33 fix(app): only show left border on plus button when sticky 2026-01-27 14:04:10 +00:00
David Hill ebfa2b57da fix(app): update review empty states to 14px and align select file empty state 2026-01-27 14:04:10 +00:00
David Hill 03b9317f49 fix(app): center filetree empty state with 32px top margin 2026-01-27 14:04:10 +00:00
David Hill 3862b1aeda fix(ui): set filetree tablist height to 48px with centered content 2026-01-27 14:04:10 +00:00
adamelmore b4e0cdbe8e docs(core): plugin tool context updates 2026-01-27 06:29:20 -06:00
adamelmore 095328faf4 fix(app): non-fatal error handling 2026-01-27 06:29:20 -06:00
adamelmore 743e83d9bf fix(app): agent fallback colors 2026-01-27 06:29:19 -06:00
adamelmore 1f9313847f feat(core): add worktree to plugin tool context 2026-01-27 06:29:19 -06:00
adamelmore 2180be2f3f chore: cleanup 2026-01-27 06:29:19 -06:00
adamelmore 58b9b54600 feat(app): forward and back buttons 2026-01-27 06:29:18 -06:00
adamelmore c0a5f85349 chore(app): missing tooltips 2026-01-27 06:29:18 -06:00
adamelmore b6565c606e fix(app): auto-scroll button sometimes sticks 2026-01-27 06:29:18 -06:00
GitHub Action ddffb34b99 ignore: update download stats 2026-01-27 2026-01-27 12:05:48 +00:00
Brendan Allan dd1624e30e desktop: deduplicate tauri configs 2026-01-27 17:48:43 +08:00
adamelmore 213c0e18ab fix(app): only show files in select dialog when clicking + tab 2026-01-26 20:07:50 -06:00
adamelmore a8c18dba82 fix(core): expose Instance.directory to custom tools 2026-01-26 20:07:47 -06:00
Aiden Cline 6cf2c3e3db fix: use Instance.directory instead of process.cwd() in read tool 2026-01-26 20:57:50 -05:00
Ryan Vogel b59aec6f04 feat: add /learn command to extract session learnings to scoped AGENTS.md files (#10717) 2026-01-26 20:50:44 -05:00
Chris Yang d9e8b2b65d fix(desktop): disable magnification gestures on macOS (#10605) 2026-01-26 18:50:51 -06:00
Rahul A Mistry 7655f51e10 fix(app): add connect provier in model selector (#10706) 2026-01-26 18:46:04 -06:00
GitHub Action e7c6267323 chore: generate 2026-01-27 00:45:43 +00:00
Fabio Martino 64a3661a32 docs: add Italian README (#10732) 2026-01-26 18:45:05 -06:00
Ryan Vogel bf463aee04 feat(release): add highlights template to draft releases (#10745) 2026-01-26 19:37:54 -05:00
adamelmore b24fd90fe8 test(app): file tree spec 2026-01-26 17:42:23 -06:00
adamelmore 6897bb7d02 chore: cleanup 2026-01-26 17:02:56 -06:00
adamelmore 8371ba5aec chore: cleanup 2026-01-26 17:01:04 -06:00
adamelmore 36577479c5 fix(app): enable file watcher 2026-01-26 16:57:44 -06:00
adamelmore bb178e9352 chore: cleanup 2026-01-26 16:57:43 -06:00
GitHub Action 4075f9e1ab chore: generate 2026-01-26 22:49:23 +00:00
adamelmore 021d9d105e fix(app): reactive file tree 2026-01-26 16:46:09 -06:00
adamelmore b07d7cdb71 fix(app): file tree performance 2026-01-26 16:41:18 -06:00
adamelmore 77f11dfabe chore: don't flip github draft release automatically 2026-01-26 16:30:19 -06:00
Aiden Cline 45b09c1465 tweak: when using messages api for copilot, attach anthropic beta headers 2026-01-26 17:17:54 -05:00
adamelmore ccc7aa49c3 wip: highlights 2026-01-26 15:36:59 -06:00
adamelmore 53ac394c68 wip: highlights 2026-01-26 15:36:59 -06:00
adamelmore 8b6484ac1a wip: highlights 2026-01-26 15:36:56 -06:00
adamelmore c1e840b9b2 chore: cleanup 2026-01-26 15:35:09 -06:00
David Hill a77df3c174 wip: new release modal
- highlight key updates or new features
- needs some transition love
- all copy including text and video placeholder
2026-01-26 15:35:09 -06:00
David Hill 9d1cf98192 fix: search clear icon 2026-01-26 15:35:09 -06:00
adamelmore 7b3d5f1d68 chore: cleanup 2026-01-26 15:30:01 -06:00
GitHub Action b21f82f5b0 chore: generate 2026-01-26 21:24:09 +00:00
adamelmore d82e94c209 fix(app): zen disconnect not working 2026-01-26 15:23:25 -06:00
adamelmore cbe8f265b9 fix(app): disconnect zen provider 2026-01-26 15:23:24 -06:00
Aiden Cline 8b5dde5536 tweak: retry logic to catch certain provider problems 2026-01-26 16:12:41 -05:00
Aiden Cline 6a62b44593 ci: add dry-run option to stale PR closer workflow
Allows testing stale PR closure without actually closing PRs
2026-01-26 15:42:50 -05:00
Aiden Cline c700b928e4 ci: add stale pr job 2026-01-26 15:38:40 -05:00
adamelmore ae815cca3a test(app): fix e2e test 2026-01-26 14:32:49 -06:00
David Hill 5a16d99b60 fix(app): disable tooltips in filetree tabs 2026-01-26 19:53:05 +00:00
David Hill 3f9b59c798 fix(app): move file tree toggle to right 2026-01-26 19:50:05 +00:00
David Hill c6febd8ddd fix(app): fade filetree guide lines on hover 2026-01-26 19:47:58 +00:00
David Hill 010ed55590 fix(app): dim non-deep filetree guide lines 2026-01-26 19:47:58 +00:00
David Hill 2be4598011 fix(app): reduce filetree folder indent 2026-01-26 19:47:58 +00:00
David Hill 99cd7f3468 fix(app): refine filetree row spacing and indent 2026-01-26 19:47:58 +00:00
David Hill fca0825b71 fix(app): use medium font for filetree items 2026-01-26 19:47:58 +00:00
David Hill 9babdb80cf fix(app): use chevron icons for filetree folders 2026-01-26 19:47:58 +00:00
David Hill f4392e023a fix(app): tighten filetree row spacing 2026-01-26 19:47:58 +00:00
David Hill 0e08c6c9fd fix(app): adjust filetree panel padding 2026-01-26 19:47:58 +00:00
David Hill 0dcb850a7a fix(ui): scope filetree pill tabs styling 2026-01-26 19:47:58 +00:00
David Hill d9a61cd94c feat(app): add Vercel AI Gateway provider description 2026-01-26 19:47:58 +00:00
David Hill 0f4a10f4a3 feat(app): add provider descriptions to settings 2026-01-26 19:47:58 +00:00
David Hill c551f7e47b fix(ui): reduce dialog transition in time to 150ms 2026-01-26 19:47:58 +00:00
David Hill 7962ff38b0 feat(app): add transition to command palette 2026-01-26 19:47:58 +00:00
David Hill 3ac11df66a feat(app): add transition to select provider dialog 2026-01-26 19:47:57 +00:00
David Hill 7caf59b433 fix(ui): prevent double-close and fix dialog replacement 2026-01-26 19:47:57 +00:00
David Hill 92229b44f8 feat(ui): add optional transition animations to dialog 2026-01-26 19:47:57 +00:00
David Hill 0a572afd46 fix(app): style view all button with interactive color and margin 2026-01-26 19:47:57 +00:00
David Hill ecd04a118a feat(ui): add models icon and use in settings 2026-01-26 19:47:57 +00:00
David Hill 6f3d413472 feat(ui): add providers icon and use in settings 2026-01-26 19:47:57 +00:00
David Hill 7c96d704d3 fix(app): use default cursor for env provider text 2026-01-26 19:47:57 +00:00
David Hill 9346c1ae3f fix(app): add hover text for env-connected providers 2026-01-26 19:47:57 +00:00
David Hill e0e97e9d93 fix(app): set provider row height to 56px 2026-01-26 19:47:57 +00:00
David Hill 810bc012b6 fix(ui): update button styles and disconnect button size 2026-01-26 19:47:57 +00:00
GitHub Action 36b832880d chore: generate 2026-01-26 19:37:41 +00:00
adamelmore d4e3acf17e fix(app): session sync issue 2026-01-26 13:36:36 -06:00
adamelmore 04337f6202 chore: cleanup 2026-01-26 13:03:34 -06:00
adamelmore 97aec21cb3 chore(app): missing i18n strings 2026-01-26 13:03:34 -06:00
adamelmore 319ad2a391 fix(app): session load cap 2026-01-26 12:58:51 -06:00
adamelmore de3b654dcd chore: refactor changelog 2026-01-26 12:51:35 -06:00
adamelmore 8b17ac656c test(app): e2e test for sidebar nav 2026-01-26 12:51:35 -06:00
GitHub Action 18bfc740c8 chore: generate 2026-01-26 18:50:58 +00:00
Tim 837037cd04 fix: ensure openai 404 errors are retried (#10590) 2026-01-26 13:50:04 -05:00
adamelmore b0f865eae5 chore: debug changelog 2026-01-26 12:21:27 -06:00
Aiden Cline ac53a372b0 feat: use anthropic compat messages api for anthropic models through copilot 2026-01-26 13:18:08 -05:00
Aiden Cline 7795cae0b5 ignore: tweak ai deps 2026-01-26 13:18:08 -05:00
adamelmore 4c9d879624 Revert "fix(app): restore external link opening in system browser (#10697)"
This reverts commit 984518b1c0.
2026-01-26 12:09:02 -06:00
adamelmore 3fdd08d66e chore: fix changelog page 2026-01-26 11:58:02 -06:00
252 changed files with 9896 additions and 3059 deletions
+83
View File
@@ -0,0 +1,83 @@
name: Close stale PRs
on:
workflow_dispatch:
inputs:
dryRun:
description: "Log actions without closing PRs"
type: boolean
default: false
schedule:
- cron: "0 6 * * *"
permissions:
contents: read
issues: write
pull-requests: write
jobs:
close-stale-prs:
runs-on: ubuntu-latest
steps:
- name: Close inactive PRs
uses: actions/github-script@v8
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const DAYS_INACTIVE = 60
const cutoff = new Date(Date.now() - DAYS_INACTIVE * 24 * 60 * 60 * 1000)
const { owner, repo } = context.repo
const dryRun = context.payload.inputs?.dryRun === "true"
const stalePrs = []
core.info(`Dry run mode: ${dryRun}`)
const prs = await github.paginate(github.rest.pulls.list, {
owner,
repo,
state: "open",
per_page: 100,
sort: "updated",
direction: "asc",
})
for (const pr of prs) {
const lastUpdated = new Date(pr.updated_at)
if (lastUpdated > cutoff) {
core.info(`PR ${pr.number} is fresh`)
continue
}
stalePrs.push(pr)
}
if (!stalePrs.length) {
core.info("No stale pull requests found.")
return
}
for (const pr of stalePrs) {
const issue_number = pr.number
const closeComment = `Closing this pull request because it has had no updates for more than ${DAYS_INACTIVE} days. If you plan to continue working on it, feel free to reopen or open a new PR.`
if (dryRun) {
core.info(`[dry-run] Would close PR #${issue_number} from ${pr.user.login}`)
continue
}
await github.rest.issues.createComment({
owner,
repo,
issue_number,
body: closeComment,
})
await github.rest.pulls.update({
owner,
repo,
pull_number: issue_number,
state: "closed",
})
core.info(`Closed PR #${issue_number} from ${pr.user.login}`)
}
+33
View File
@@ -0,0 +1,33 @@
name: Add Contributors Label
on:
# issues:
# types: [opened]
pull_request_target:
types: [opened]
jobs:
add-contributor-label:
runs-on: ubuntu-latest
permissions:
pull-requests: write
issues: write
steps:
- name: Add Contributor Label
uses: actions/github-script@v8
with:
script: |
const isPR = !!context.payload.pull_request;
const issueNumber = isPR ? context.payload.pull_request.number : context.payload.issue.number;
const authorAssociation = isPR ? context.payload.pull_request.author_association : context.payload.issue.author_association;
if (authorAssociation === 'CONTRIBUTOR') {
await github.rest.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: issueNumber,
labels: ['contributor']
});
}
+84 -67
View File
@@ -4,6 +4,7 @@ run-name: "${{ format('release {0}', inputs.bump) }}"
on: on:
push: push:
branches: branches:
- ci
- dev - dev
- snapshot-* - snapshot-*
workflow_dispatch: workflow_dispatch:
@@ -29,56 +30,46 @@ permissions:
packages: write packages: write
jobs: jobs:
publish: version:
runs-on: blacksmith-4vcpu-ubuntu-2404 runs-on: blacksmith-4vcpu-ubuntu-2404
if: github.repository == 'anomalyco/opencode' if: github.repository == 'anomalyco/opencode'
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
with: with:
fetch-depth: 0 fetch-depth: 1
- uses: ./.github/actions/setup-bun
- id: version
run: |
./script/version.ts
env:
GH_TOKEN: ${{ github.token }}
OPENCODE_BUMP: ${{ inputs.bump }}
OPENCODE_VERSION: ${{ inputs.version }}
outputs:
version: ${{ steps.version.outputs.version }}
release: ${{ steps.version.outputs.release }}
tag: ${{ steps.version.outputs.tag }}
- run: git fetch --force --tags build-cli:
needs: version
runs-on: blacksmith-4vcpu-ubuntu-2404
if: github.repository == 'anomalyco/opencode'
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1
fetch-tags: true
- uses: ./.github/actions/setup-bun - uses: ./.github/actions/setup-bun
- name: Install OpenCode - name: Build
if: inputs.bump || inputs.version id: build
run: bun i -g opencode-ai@1.0.169
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- uses: actions/setup-node@v4
with:
node-version: "24"
registry-url: "https://registry.npmjs.org"
- name: Setup Git Identity
run: | run: |
git config --global user.email "opencode@sst.dev" ./packages/opencode/script/build.ts
git config --global user.name "opencode"
git remote set-url origin https://x-access-token:${{ secrets.SST_GITHUB_TOKEN }}@github.com/${{ github.repository }}
- name: Publish
id: publish
run: ./script/publish-start.ts
env: env:
OPENCODE_BUMP: ${{ inputs.bump }} OPENCODE_VERSION: ${{ needs.version.outputs.version }}
OPENCODE_VERSION: ${{ inputs.version }} OPENCODE_RELEASE: ${{ needs.version.outputs.release }}
OPENCODE_API_KEY: ${{ secrets.OPENCODE_API_KEY }} GH_TOKEN: ${{ github.token }}
AUR_KEY: ${{ secrets.AUR_KEY }}
GITHUB_TOKEN: ${{ secrets.SST_GITHUB_TOKEN }}
NPM_CONFIG_PROVENANCE: false
- uses: actions/upload-artifact@v4 - uses: actions/upload-artifact@v4
with: with:
@@ -86,12 +77,12 @@ jobs:
path: packages/opencode/dist path: packages/opencode/dist
outputs: outputs:
release: ${{ steps.publish.outputs.release }} version: ${{ needs.version.outputs.version }}
tag: ${{ steps.publish.outputs.tag }}
version: ${{ steps.publish.outputs.version }}
publish-tauri: build-tauri:
needs: publish needs:
- build-cli
- version
continue-on-error: false continue-on-error: false
strategy: strategy:
fail-fast: false fail-fast: false
@@ -111,8 +102,8 @@ jobs:
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
with: with:
fetch-depth: 0 fetch-depth: 1
ref: ${{ needs.publish.outputs.tag }} fetch-tags: true
- uses: apple-actions/import-codesign-certs@v2 - uses: apple-actions/import-codesign-certs@v2
if: ${{ runner.os == 'macOS' }} if: ${{ runner.os == 'macOS' }}
@@ -134,8 +125,6 @@ jobs:
run: | run: |
echo "${{ secrets.APPLE_API_KEY_PATH }}" > $RUNNER_TEMP/apple-api-key.p8 echo "${{ secrets.APPLE_API_KEY_PATH }}" > $RUNNER_TEMP/apple-api-key.p8
- run: git fetch --force --tags
- uses: ./.github/actions/setup-bun - uses: ./.github/actions/setup-bun
- name: install dependencies (ubuntu only) - name: install dependencies (ubuntu only)
@@ -160,10 +149,7 @@ jobs:
bun ./scripts/prepare.ts bun ./scripts/prepare.ts
env: env:
OPENCODE_VERSION: ${{ needs.publish.outputs.version }} OPENCODE_VERSION: ${{ needs.publish.outputs.version }}
NPM_CONFIG_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.SST_GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.SST_GITHUB_TOKEN }}
AUR_KEY: ${{ secrets.AUR_KEY }}
OPENCODE_API_KEY: ${{ secrets.OPENCODE_API_KEY }}
RUST_TARGET: ${{ matrix.settings.target }} RUST_TARGET: ${{ matrix.settings.target }}
GH_TOKEN: ${{ github.token }} GH_TOKEN: ${{ github.token }}
GITHUB_RUN_ID: ${{ github.run_id }} GITHUB_RUN_ID: ${{ github.run_id }}
@@ -177,22 +163,18 @@ jobs:
cargo tauri --version cargo tauri --version
- name: Build and upload artifacts - name: Build and upload artifacts
uses: Wandalen/wretry.action@v3 uses: tauri-apps/tauri-action@390cbe447412ced1303d35abe75287949e43437a
timeout-minutes: 60 timeout-minutes: 60
with: with:
attempt_limit: 3
attempt_delay: 10000
action: tauri-apps/tauri-action@390cbe447412ced1303d35abe75287949e43437a
with: |
projectPath: packages/desktop projectPath: packages/desktop
uploadWorkflowArtifacts: true uploadWorkflowArtifacts: true
tauriScript: ${{ (contains(matrix.settings.host, 'ubuntu') && 'cargo tauri') || '' }} tauriScript: ${{ (contains(matrix.settings.host, 'ubuntu') && 'cargo tauri') || '' }}
args: --target ${{ matrix.settings.target }} --config ./src-tauri/tauri.prod.conf.json --verbose args: --target ${{ matrix.settings.target }} --config ./src-tauri/tauri.prod.conf.json --verbose
updaterJsonPreferNsis: true updaterJsonPreferNsis: true
releaseId: ${{ needs.publish.outputs.release }} releaseId: ${{ needs.version.outputs.release }}
tagName: ${{ needs.publish.outputs.tag }} tagName: ${{ needs.version.outputs.tag }}
releaseAssetNamePattern: opencode-desktop-[platform]-[arch][ext]
releaseDraft: true releaseDraft: true
releaseAssetNamePattern: opencode-desktop-[platform]-[arch][ext]
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAURI_BUNDLER_NEW_APPIMAGE_FORMAT: true TAURI_BUNDLER_NEW_APPIMAGE_FORMAT: true
@@ -205,20 +187,52 @@ jobs:
APPLE_API_KEY: ${{ secrets.APPLE_API_KEY }} APPLE_API_KEY: ${{ secrets.APPLE_API_KEY }}
APPLE_API_KEY_PATH: ${{ runner.temp }}/apple-api-key.p8 APPLE_API_KEY_PATH: ${{ runner.temp }}/apple-api-key.p8
publish-release: publish:
needs: needs:
- publish - version
- publish-tauri - build-cli
if: needs.publish.outputs.tag - build-tauri
runs-on: blacksmith-4vcpu-ubuntu-2404 runs-on: blacksmith-4vcpu-ubuntu-2404
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
with: with:
fetch-depth: 0 fetch-depth: 1
ref: ${{ needs.publish.outputs.tag }}
- name: Install OpenCode
if: inputs.bump || inputs.version
run: bun i -g opencode-ai
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- uses: actions/setup-node@v4
with:
node-version: "24"
registry-url: "https://registry.npmjs.org"
- name: Setup Git Identity
run: |
git config --global user.email "opencode@sst.dev"
git config --global user.name "opencode"
git remote set-url origin https://x-access-token:${{ secrets.SST_GITHUB_TOKEN }}@github.com/${{ github.repository }}
- uses: ./.github/actions/setup-bun - uses: ./.github/actions/setup-bun
- uses: actions/download-artifact@v4
with:
name: opencode-cli
path: packages/opencode/dist
- name: Setup SSH for AUR - name: Setup SSH for AUR
run: | run: |
sudo apt-get update sudo apt-get update
@@ -230,8 +244,11 @@ jobs:
git config --global user.name "opencode" git config --global user.name "opencode"
ssh-keyscan -H aur.archlinux.org >> ~/.ssh/known_hosts || true ssh-keyscan -H aur.archlinux.org >> ~/.ssh/known_hosts || true
- run: ./script/publish-complete.ts - run: ./script/publish.ts
env: env:
OPENCODE_VERSION: ${{ needs.publish.outputs.version }} OPENCODE_VERSION: ${{ needs.version.outputs.version }}
OPENCODE_RELEASE: ${{ needs.version.outputs.release }}
AUR_KEY: ${{ secrets.AUR_KEY }} AUR_KEY: ${{ secrets.AUR_KEY }}
GITHUB_TOKEN: ${{ secrets.SST_GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.SST_GITHUB_TOKEN }}
OPENCODE_API_KEY: ${{ secrets.OPENCODE_API_KEY }}
NPM_CONFIG_PROVENANCE: false
+1 -1
View File
@@ -7,7 +7,7 @@ Please read @package.json and @packages/opencode/package.json.
Your job is to look into AI SDK dependencies, figure out if they have versions that can be upgraded (minor or patch versions ONLY no major ignore major changes). Your job is to look into AI SDK dependencies, figure out if they have versions that can be upgraded (minor or patch versions ONLY no major ignore major changes).
I want a report of every dependency and the version that can be upgraded to. I want a report of every dependency and the version that can be upgraded to.
What would be even better is if you can give me links to the changelog for each dependency, or at least some reference info so I can see what bugs were fixed or new features were added. What would be even better is if you can give me brief summary of the changes for each dep and a link to the changelog for each dependency, or at least some reference info so I can see what bugs were fixed or new features were added.
Consider using subagents for each dep to save your context window. Consider using subagents for each dep to save your context window.
+42
View File
@@ -0,0 +1,42 @@
---
description: Extract non-obvious learnings from session to AGENTS.md files to build codebase understanding
---
Analyze this session and extract non-obvious learnings to add to AGENTS.md files.
AGENTS.md files can exist at any directory level, not just the project root. When an agent reads a file, any AGENTS.md in parent directories are automatically loaded into the context of the tool read. Place learnings as close to the relevant code as possible:
- Project-wide learnings → root AGENTS.md
- Package/module-specific → packages/foo/AGENTS.md
- Feature-specific → src/auth/AGENTS.md
What counts as a learning (non-obvious discoveries only):
- Hidden relationships between files or modules
- Execution paths that differ from how code appears
- Non-obvious configuration, env vars, or flags
- Debugging breakthroughs when error messages were misleading
- API/tool quirks and workarounds
- Build/test commands not in README
- Architectural decisions and constraints
- Files that must change together
What NOT to include:
- Obvious facts from documentation
- Standard language/framework behavior
- Things already in an AGENTS.md
- Verbose explanations
- Session-specific details
Process:
1. Review session for discoveries, errors that took multiple attempts, unexpected connections
2. Determine scope - what directory does each learning apply to?
3. Read existing AGENTS.md files at relevant levels
4. Create or update AGENTS.md at the appropriate level
5. Keep entries to 1-3 lines per insight
After updating, summarize which AGENTS.md files were created/updated and how many learnings per file.
$ARGUMENTS
+1
View File
@@ -22,6 +22,7 @@
<a href="README.de.md">Deutsch</a> | <a href="README.de.md">Deutsch</a> |
<a href="README.es.md">Español</a> | <a href="README.es.md">Español</a> |
<a href="README.fr.md">Français</a> | <a href="README.fr.md">Français</a> |
<a href="README.it.md">Italiano</a> |
<a href="README.da.md">Dansk</a> | <a href="README.da.md">Dansk</a> |
<a href="README.ja.md">日本語</a> | <a href="README.ja.md">日本語</a> |
<a href="README.pl.md">Polski</a> | <a href="README.pl.md">Polski</a> |
+1
View File
@@ -22,6 +22,7 @@
<a href="README.de.md">Deutsch</a> | <a href="README.de.md">Deutsch</a> |
<a href="README.es.md">Español</a> | <a href="README.es.md">Español</a> |
<a href="README.fr.md">Français</a> | <a href="README.fr.md">Français</a> |
<a href="README.it.md">Italiano</a> |
<a href="README.da.md">Dansk</a> | <a href="README.da.md">Dansk</a> |
<a href="README.ja.md">日本語</a> | <a href="README.ja.md">日本語</a> |
<a href="README.pl.md">Polski</a> | <a href="README.pl.md">Polski</a> |
+1
View File
@@ -22,6 +22,7 @@
<a href="README.de.md">Deutsch</a> | <a href="README.de.md">Deutsch</a> |
<a href="README.es.md">Español</a> | <a href="README.es.md">Español</a> |
<a href="README.fr.md">Français</a> | <a href="README.fr.md">Français</a> |
<a href="README.it.md">Italiano</a> |
<a href="README.da.md">Dansk</a> | <a href="README.da.md">Dansk</a> |
<a href="README.ja.md">日本語</a> | <a href="README.ja.md">日本語</a> |
<a href="README.pl.md">Polski</a> | <a href="README.pl.md">Polski</a> |
+1
View File
@@ -22,6 +22,7 @@
<a href="README.de.md">Deutsch</a> | <a href="README.de.md">Deutsch</a> |
<a href="README.es.md">Español</a> | <a href="README.es.md">Español</a> |
<a href="README.fr.md">Français</a> | <a href="README.fr.md">Français</a> |
<a href="README.it.md">Italiano</a> |
<a href="README.da.md">Dansk</a> | <a href="README.da.md">Dansk</a> |
<a href="README.ja.md">日本語</a> | <a href="README.ja.md">日本語</a> |
<a href="README.pl.md">Polski</a> | <a href="README.pl.md">Polski</a> |
+1
View File
@@ -22,6 +22,7 @@
<a href="README.de.md">Deutsch</a> | <a href="README.de.md">Deutsch</a> |
<a href="README.es.md">Español</a> | <a href="README.es.md">Español</a> |
<a href="README.fr.md">Français</a> | <a href="README.fr.md">Français</a> |
<a href="README.it.md">Italiano</a> |
<a href="README.da.md">Dansk</a> | <a href="README.da.md">Dansk</a> |
<a href="README.ja.md">日本語</a> | <a href="README.ja.md">日本語</a> |
<a href="README.pl.md">Polski</a> | <a href="README.pl.md">Polski</a> |
+1
View File
@@ -22,6 +22,7 @@
<a href="README.de.md">Deutsch</a> | <a href="README.de.md">Deutsch</a> |
<a href="README.es.md">Español</a> | <a href="README.es.md">Español</a> |
<a href="README.fr.md">Français</a> | <a href="README.fr.md">Français</a> |
<a href="README.it.md">Italiano</a> |
<a href="README.da.md">Dansk</a> | <a href="README.da.md">Dansk</a> |
<a href="README.ja.md">日本語</a> | <a href="README.ja.md">日本語</a> |
<a href="README.pl.md">Polski</a> | <a href="README.pl.md">Polski</a> |
+133
View File
@@ -0,0 +1,133 @@
<p align="center">
<a href="https://opencode.ai">
<picture>
<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="Logo OpenCode">
</picture>
</a>
</p>
<p align="center">Lagente di coding AI open source.</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/anomalyco/opencode/actions/workflows/publish.yml"><img alt="Build status" src="https://img.shields.io/github/actions/workflow/status/anomalyco/opencode/publish.yml?style=flat-square&branch=dev" /></a>
</p>
<p align="center">
<a href="README.md">English</a> |
<a href="README.zh.md">简体中文</a> |
<a href="README.zht.md">繁體中文</a> |
<a href="README.ko.md">한국어</a> |
<a href="README.de.md">Deutsch</a> |
<a href="README.es.md">Español</a> |
<a href="README.fr.md">Français</a> |
<a href="README.it.md">Italiano</a> |
<a href="README.da.md">Dansk</a> |
<a href="README.ja.md">日本語</a> |
<a href="README.pl.md">Polski</a> |
<a href="README.ru.md">Русский</a> |
<a href="README.ar.md">العربية</a> |
<a href="README.no.md">Norsk</a> |
<a href="README.br.md">Português (Brasil)</a>
</p>
[![OpenCode Terminal UI](packages/web/src/assets/lander/screenshot.png)](https://opencode.ai)
---
### Installazione
```bash
# YOLO
curl -fsSL https://opencode.ai/install | bash
# Package manager
npm i -g opencode-ai@latest # oppure bun/pnpm/yarn
scoop install opencode # Windows
choco install opencode # Windows
brew install anomalyco/tap/opencode # macOS e Linux (consigliato, sempre aggiornato)
brew install opencode # macOS e Linux (formula brew ufficiale, aggiornata meno spesso)
paru -S opencode-bin # Arch Linux
mise use -g opencode # Qualsiasi OS
nix run nixpkgs#opencode # oppure github:anomalyco/opencode per lultima branch di sviluppo
```
> [!TIP]
> Rimuovi le versioni precedenti alla 0.1.x prima di installare.
### App Desktop (BETA)
OpenCode è disponibile anche come applicazione desktop. Puoi scaricarla direttamente dalla [pagina delle release](https://github.com/anomalyco/opencode/releases) oppure da [opencode.ai/download](https://opencode.ai/download).
| Piattaforma | Download |
| --------------------- | ------------------------------------- |
| macOS (Apple Silicon) | `opencode-desktop-darwin-aarch64.dmg` |
| macOS (Intel) | `opencode-desktop-darwin-x64.dmg` |
| Windows | `opencode-desktop-windows-x64.exe` |
| Linux | `.deb`, `.rpm`, oppure AppImage |
```bash
# macOS (Homebrew)
brew install --cask opencode-desktop
# Windows (Scoop)
scoop bucket add extras; scoop install extras/opencode-desktop
```
#### Directory di installazione
Lo script di installazione rispetta il seguente ordine di priorità per il percorso di installazione:
1. `$OPENCODE_INSTALL_DIR` Directory di installazione personalizzata
2. `$XDG_BIN_DIR` Percorso conforme alla XDG Base Directory Specification
3. `$HOME/bin` Directory binaria standard dellutente (se esiste o può essere creata)
4. `$HOME/.opencode/bin` Fallback predefinito
```bash
# Esempi
OPENCODE_INSTALL_DIR=/usr/local/bin curl -fsSL https://opencode.ai/install | bash
XDG_BIN_DIR=$HOME/.local/bin curl -fsSL https://opencode.ai/install | bash
```
### Agenti
OpenCode include due agenti integrati tra cui puoi passare usando il tasto `Tab`.
- **build** Predefinito, agente con accesso completo per il lavoro di sviluppo
- **plan** Agente in sola lettura per analisi ed esplorazione del codice
- Nega le modifiche ai file per impostazione predefinita
- Chiede il permesso prima di eseguire comandi bash
- Ideale per esplorare codebase sconosciute o pianificare modifiche
È inoltre incluso un sotto-agente **general** per ricerche complesse e attività multi-step.
Viene utilizzato internamente e può essere invocato usando `@general` nei messaggi.
Scopri di più sugli [agenti](https://opencode.ai/docs/agents).
### Documentazione
Per maggiori informazioni su come configurare OpenCode, [**consulta la nostra documentazione**](https://opencode.ai/docs).
### Contribuire
Se sei interessato a contribuire a OpenCode, leggi la nostra [guida alla contribuzione](./CONTRIBUTING.md) prima di inviare una pull request.
### Costruire su OpenCode
Se stai lavorando a un progetto correlato a OpenCode e che utilizza “opencode” come parte del nome (ad esempio “opencode-dashboard” o “opencode-mobile”), aggiungi una nota nel tuo README per chiarire che non è sviluppato dal team OpenCode e che non è affiliato in alcun modo con noi.
### FAQ
#### In cosa è diverso da Claude Code?
È molto simile a Claude Code in termini di funzionalità. Ecco le principali differenze:
- 100% open source
- Non è legato a nessun provider. Anche se consigliamo i modelli forniti tramite [OpenCode Zen](https://opencode.ai/zen), OpenCode può essere utilizzato con Claude, OpenAI, Google o persino modelli locali. Con levoluzione dei modelli, le differenze tra di essi si ridurranno e i prezzi scenderanno, quindi essere indipendenti dal provider è importante.
- Supporto LSP pronto alluso
- Forte attenzione alla TUI. OpenCode è sviluppato da utenti neovim e dai creatori di [terminal.shop](https://terminal.shop); spingeremo al limite ciò che è possibile fare nel terminale.
- Architettura client/server. Questo, ad esempio, permette a OpenCode di girare sul tuo computer mentre lo controlli da remoto tramite unapp mobile. La frontend TUI è quindi solo uno dei possibili client.
---
**Unisciti alla nostra community** [Discord](https://discord.gg/opencode) | [X.com](https://x.com/opencode)
+1
View File
@@ -22,6 +22,7 @@
<a href="README.de.md">Deutsch</a> | <a href="README.de.md">Deutsch</a> |
<a href="README.es.md">Español</a> | <a href="README.es.md">Español</a> |
<a href="README.fr.md">Français</a> | <a href="README.fr.md">Français</a> |
<a href="README.it.md">Italiano</a> |
<a href="README.da.md">Dansk</a> | <a href="README.da.md">Dansk</a> |
<a href="README.ja.md">日本語</a> | <a href="README.ja.md">日本語</a> |
<a href="README.pl.md">Polski</a> | <a href="README.pl.md">Polski</a> |
+1
View File
@@ -22,6 +22,7 @@
<a href="README.de.md">Deutsch</a> | <a href="README.de.md">Deutsch</a> |
<a href="README.es.md">Español</a> | <a href="README.es.md">Español</a> |
<a href="README.fr.md">Français</a> | <a href="README.fr.md">Français</a> |
<a href="README.it.md">Italiano</a> |
<a href="README.da.md">Dansk</a> | <a href="README.da.md">Dansk</a> |
<a href="README.ja.md">日本語</a> | <a href="README.ja.md">日本語</a> |
<a href="README.pl.md">Polski</a> | <a href="README.pl.md">Polski</a> |
+3 -1
View File
@@ -22,13 +22,15 @@
<a href="README.de.md">Deutsch</a> | <a href="README.de.md">Deutsch</a> |
<a href="README.es.md">Español</a> | <a href="README.es.md">Español</a> |
<a href="README.fr.md">Français</a> | <a href="README.fr.md">Français</a> |
<a href="README.it.md">Italiano</a> |
<a href="README.da.md">Dansk</a> | <a href="README.da.md">Dansk</a> |
<a href="README.ja.md">日本語</a> | <a href="README.ja.md">日本語</a> |
<a href="README.pl.md">Polski</a> | <a href="README.pl.md">Polski</a> |
<a href="README.ru.md">Русский</a> | <a href="README.ru.md">Русский</a> |
<a href="README.ar.md">العربية</a> | <a href="README.ar.md">العربية</a> |
<a href="README.no.md">Norsk</a> | <a href="README.no.md">Norsk</a> |
<a href="README.br.md">Português (Brasil)</a> <a href="README.br.md">Português (Brasil)</a> |
<a href="README.th.md">ไทย</a>
</p> </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)
+1
View File
@@ -22,6 +22,7 @@
<a href="README.de.md">Deutsch</a> | <a href="README.de.md">Deutsch</a> |
<a href="README.es.md">Español</a> | <a href="README.es.md">Español</a> |
<a href="README.fr.md">Français</a> | <a href="README.fr.md">Français</a> |
<a href="README.it.md">Italiano</a> |
<a href="README.da.md">Dansk</a> | <a href="README.da.md">Dansk</a> |
<a href="README.ja.md">日本語</a> | <a href="README.ja.md">日本語</a> |
<a href="README.pl.md">Polski</a> | <a href="README.pl.md">Polski</a> |
+1
View File
@@ -22,6 +22,7 @@
<a href="README.de.md">Deutsch</a> | <a href="README.de.md">Deutsch</a> |
<a href="README.es.md">Español</a> | <a href="README.es.md">Español</a> |
<a href="README.fr.md">Français</a> | <a href="README.fr.md">Français</a> |
<a href="README.it.md">Italiano</a> |
<a href="README.da.md">Dansk</a> | <a href="README.da.md">Dansk</a> |
<a href="README.ja.md">日本語</a> | <a href="README.ja.md">日本語</a> |
<a href="README.pl.md">Polski</a> | <a href="README.pl.md">Polski</a> |
+1
View File
@@ -22,6 +22,7 @@
<a href="README.de.md">Deutsch</a> | <a href="README.de.md">Deutsch</a> |
<a href="README.es.md">Español</a> | <a href="README.es.md">Español</a> |
<a href="README.fr.md">Français</a> | <a href="README.fr.md">Français</a> |
<a href="README.it.md">Italiano</a> |
<a href="README.da.md">Dansk</a> | <a href="README.da.md">Dansk</a> |
<a href="README.ja.md">日本語</a> | <a href="README.ja.md">日本語</a> |
<a href="README.pl.md">Polski</a> | <a href="README.pl.md">Polski</a> |
+134
View File
@@ -0,0 +1,134 @@
<p align="center">
<a href="https://opencode.ai">
<picture>
<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 แบบโอเพนซอร์ส</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/anomalyco/opencode/actions/workflows/publish.yml"><img alt="สถานะการสร้าง" src="https://img.shields.io/github/actions/workflow/status/anomalyco/opencode/publish.yml?style=flat-square&branch=dev" /></a>
</p>
<p align="center">
<a href="README.md">English</a> |
<a href="README.zh.md">简体中文</a> |
<a href="README.zht.md">繁體中文</a> |
<a href="README.ko.md">한국어</a> |
<a href="README.de.md">Deutsch</a> |
<a href="README.es.md">Español</a> |
<a href="README.fr.md">Français</a> |
<a href="README.it.md">Italiano</a> |
<a href="README.da.md">Dansk</a> |
<a href="README.ja.md">日本語</a> |
<a href="README.pl.md">Polski</a> |
<a href="README.ru.md">Русский</a> |
<a href="README.ar.md">العربية</a> |
<a href="README.no.md">Norsk</a> |
<a href="README.br.md">Português (Brasil)</a> |
<a href="README.th.md">ไทย</a>
</p>
[![OpenCode Terminal UI](packages/web/src/assets/lander/screenshot.png)](https://opencode.ai)
---
### การติดตั้ง
```bash
# YOLO
curl -fsSL https://opencode.ai/install | bash
# ตัวจัดการแพ็กเกจ
npm i -g opencode-ai@latest # หรือ bun/pnpm/yarn
scoop install opencode # Windows
choco install opencode # Windows
brew install anomalyco/tap/opencode # macOS และ Linux (แนะนำ อัปเดตเสมอ)
brew install opencode # macOS และ Linux (brew formula อย่างเป็นทางการ อัปเดตน้อยกว่า)
paru -S opencode-bin # Arch Linux
mise use -g opencode # ระบบปฏิบัติการใดก็ได้
nix run nixpkgs#opencode # หรือ github:anomalyco/opencode สำหรับสาขาพัฒนาล่าสุด
```
> [!TIP]
> ลบเวอร์ชันที่เก่ากว่า 0.1.x ก่อนติดตั้ง
### แอปพลิเคชันเดสก์ท็อป (เบต้า)
OpenCode มีให้ใช้งานเป็นแอปพลิเคชันเดสก์ท็อป ดาวน์โหลดโดยตรงจาก [หน้ารุ่น](https://github.com/anomalyco/opencode/releases) หรือ [opencode.ai/download](https://opencode.ai/download)
| แพลตฟอร์ม | ดาวน์โหลด |
| --------------------- | ------------------------------------- |
| macOS (Apple Silicon) | `opencode-desktop-darwin-aarch64.dmg` |
| macOS (Intel) | `opencode-desktop-darwin-x64.dmg` |
| Windows | `opencode-desktop-windows-x64.exe` |
| Linux | `.deb`, `.rpm`, หรือ AppImage |
```bash
# macOS (Homebrew)
brew install --cask opencode-desktop
# Windows (Scoop)
scoop bucket add extras; scoop install extras/opencode-desktop
```
#### ไดเรกทอรีการติดตั้ง
สคริปต์การติดตั้งจะใช้ลำดับความสำคัญตามเส้นทางการติดตั้ง:
1. `$OPENCODE_INSTALL_DIR` - ไดเรกทอรีการติดตั้งที่กำหนดเอง
2. `$XDG_BIN_DIR` - เส้นทางที่สอดคล้องกับ XDG Base Directory Specification
3. `$HOME/bin` - ไดเรกทอรีไบนารีผู้ใช้มาตรฐาน (หากมีอยู่หรือสามารถสร้างได้)
4. `$HOME/.opencode/bin` - ค่าสำรองเริ่มต้น
```bash
# ตัวอย่าง
OPENCODE_INSTALL_DIR=/usr/local/bin curl -fsSL https://opencode.ai/install | bash
XDG_BIN_DIR=$HOME/.local/bin curl -fsSL https://opencode.ai/install | bash
```
### เอเจนต์
OpenCode รวมเอเจนต์ในตัวสองตัวที่คุณสามารถสลับได้ด้วยปุ่ม `Tab`
- **build** - เอเจนต์เริ่มต้น มีสิทธิ์เข้าถึงแบบเต็มสำหรับงานพัฒนา
- **plan** - เอเจนต์อ่านอย่างเดียวสำหรับการวิเคราะห์และการสำรวจโค้ด
- ปฏิเสธการแก้ไขไฟล์โดยค่าเริ่มต้น
- ขอสิทธิ์ก่อนเรียกใช้คำสั่ง bash
- เหมาะสำหรับสำรวจโค้ดเบสที่ไม่คุ้นเคยหรือวางแผนการเปลี่ยนแปลง
นอกจากนี้ยังมีเอเจนต์ย่อย **general** สำหรับการค้นหาที่ซับซ้อนและงานหลายขั้นตอน
ใช้ภายในและสามารถเรียกใช้ได้โดยใช้ `@general` ในข้อความ
เรียนรู้เพิ่มเติมเกี่ยวกับ [เอเจนต์](https://opencode.ai/docs/agents)
### เอกสารประกอบ
สำหรับข้อมูลเพิ่มเติมเกี่ยวกับวิธีกำหนดค่า OpenCode [**ไปที่เอกสารของเรา**](https://opencode.ai/docs)
### การมีส่วนร่วม
หากคุณสนใจที่จะมีส่วนร่วมใน OpenCode โปรดอ่าน [เอกสารการมีส่วนร่วม](./CONTRIBUTING.md) ก่อนส่ง Pull Request
### การสร้างบน OpenCode
หากคุณทำงานในโปรเจกต์ที่เกี่ยวข้องกับ OpenCode และใช้ "opencode" เป็นส่วนหนึ่งของชื่อ เช่น "opencode-dashboard" หรือ "opencode-mobile" โปรดเพิ่มหมายเหตุใน README ของคุณเพื่อชี้แจงว่าไม่ได้สร้างโดยทีม OpenCode และไม่ได้เกี่ยวข้องกับเราในทางใด
### คำถามที่พบบ่อย
#### ต่างจาก Claude Code อย่างไร?
คล้ายกับ Claude Code มากในแง่ความสามารถ นี่คือความแตกต่างหลัก:
- โอเพนซอร์ส 100%
- ไม่ผูกมัดกับผู้ให้บริการใดๆ แม้ว่าเราจะแนะนำโมเดลที่เราจัดหาให้ผ่าน [OpenCode Zen](https://opencode.ai/zen) OpenCode สามารถใช้กับ Claude, OpenAI, Google หรือแม้กระทั่งโมเดลในเครื่องได้ เมื่อโมเดลพัฒนาช่องว่างระหว่างพวกมันจะปิดลงและราคาจะลดลง ดังนั้นการไม่ผูกมัดกับผู้ให้บริการจึงสำคัญ
- รองรับ LSP ใช้งานได้ทันทีหลังการติดตั้งโดยไม่ต้องปรับแต่งหรือเปลี่ยนแปลงฟังก์ชันการทำงานใด ๆ
- เน้นที่ TUI OpenCode สร้างโดยผู้ใช้ neovim และผู้สร้าง [terminal.shop](https://terminal.shop) เราจะผลักดันขีดจำกัดของสิ่งที่เป็นไปได้ในเทอร์มินัล
- สถาปัตยกรรมไคลเอนต์/เซิร์ฟเวอร์ ตัวอย่างเช่น อาจอนุญาตให้ OpenCode ทำงานบนคอมพิวเตอร์ของคุณ ในขณะที่คุณสามารถขับเคลื่อนจากระยะไกลผ่านแอปมือถือ หมายความว่า TUI frontend เป็นหนึ่งในไคลเอนต์ที่เป็นไปได้เท่านั้น
---
**ร่วมชุมชนของเรา** [Discord](https://discord.gg/opencode) | [X.com](https://x.com/opencode)
+1
View File
@@ -22,6 +22,7 @@
<a href="README.de.md">Deutsch</a> | <a href="README.de.md">Deutsch</a> |
<a href="README.es.md">Español</a> | <a href="README.es.md">Español</a> |
<a href="README.fr.md">Français</a> | <a href="README.fr.md">Français</a> |
<a href="README.it.md">Italiano</a> |
<a href="README.da.md">Dansk</a> | <a href="README.da.md">Dansk</a> |
<a href="README.ja.md">日本語</a> | <a href="README.ja.md">日本語</a> |
<a href="README.pl.md">Polski</a> | <a href="README.pl.md">Polski</a> |
+1
View File
@@ -22,6 +22,7 @@
<a href="README.de.md">Deutsch</a> | <a href="README.de.md">Deutsch</a> |
<a href="README.es.md">Español</a> | <a href="README.es.md">Español</a> |
<a href="README.fr.md">Français</a> | <a href="README.fr.md">Français</a> |
<a href="README.it.md">Italiano</a> |
<a href="README.da.md">Dansk</a> | <a href="README.da.md">Dansk</a> |
<a href="README.ja.md">日本語</a> | <a href="README.ja.md">日本語</a> |
<a href="README.pl.md">Polski</a> | <a href="README.pl.md">Polski</a> |
+4 -1
View File
@@ -1,7 +1,7 @@
# Download Stats # Download Stats
| Date | GitHub Downloads | npm Downloads | Total | | Date | GitHub Downloads | npm Downloads | Total |
| ---------- | -------------------- | -------------------- | -------------------- | | ---------- | -------------------- | -------------------- | --------------------- |
| 2025-06-29 | 18,789 (+0) | 39,420 (+0) | 58,209 (+0) | | 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-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-01 | 22,108 (+1,981) | 43,745 (+2,686) | 65,853 (+4,667) |
@@ -212,3 +212,6 @@
| 2026-01-24 | 6,371,019 (+274,783) | 2,156,870 (+60,635) | 8,527,889 (+335,418) | | 2026-01-24 | 6,371,019 (+274,783) | 2,156,870 (+60,635) | 8,527,889 (+335,418) |
| 2026-01-25 | 6,639,082 (+268,063) | 2,187,853 (+30,983) | 8,826,935 (+299,046) | | 2026-01-25 | 6,639,082 (+268,063) | 2,187,853 (+30,983) | 8,826,935 (+299,046) |
| 2026-01-26 | 6,941,620 (+302,538) | 2,232,115 (+44,262) | 9,173,735 (+346,800) | | 2026-01-26 | 6,941,620 (+302,538) | 2,232,115 (+44,262) | 9,173,735 (+346,800) |
| 2026-01-27 | 7,208,093 (+266,473) | 2,280,762 (+48,647) | 9,488,855 (+315,120) |
| 2026-01-28 | 7,489,370 (+281,277) | 2,314,849 (+34,087) | 9,804,219 (+315,364) |
| 2026-01-29 | 7,815,471 (+326,101) | 2,374,982 (+60,133) | 10,190,453 (+386,234) |
+19 -15
View File
@@ -23,7 +23,7 @@
}, },
"packages/app": { "packages/app": {
"name": "@opencode-ai/app", "name": "@opencode-ai/app",
"version": "1.1.36", "version": "0.0.0-ci-202601291718",
"dependencies": { "dependencies": {
"@kobalte/core": "catalog:", "@kobalte/core": "catalog:",
"@opencode-ai/sdk": "workspace:*", "@opencode-ai/sdk": "workspace:*",
@@ -73,7 +73,7 @@
}, },
"packages/console/app": { "packages/console/app": {
"name": "@opencode-ai/console-app", "name": "@opencode-ai/console-app",
"version": "1.1.36", "version": "0.0.0-ci-202601291718",
"dependencies": { "dependencies": {
"@cloudflare/vite-plugin": "1.15.2", "@cloudflare/vite-plugin": "1.15.2",
"@ibm/plex": "6.4.1", "@ibm/plex": "6.4.1",
@@ -107,7 +107,7 @@
}, },
"packages/console/core": { "packages/console/core": {
"name": "@opencode-ai/console-core", "name": "@opencode-ai/console-core",
"version": "1.1.36", "version": "0.0.0-ci-202601291718",
"dependencies": { "dependencies": {
"@aws-sdk/client-sts": "3.782.0", "@aws-sdk/client-sts": "3.782.0",
"@jsx-email/render": "1.1.1", "@jsx-email/render": "1.1.1",
@@ -134,7 +134,7 @@
}, },
"packages/console/function": { "packages/console/function": {
"name": "@opencode-ai/console-function", "name": "@opencode-ai/console-function",
"version": "1.1.36", "version": "0.0.0-ci-202601291718",
"dependencies": { "dependencies": {
"@ai-sdk/anthropic": "2.0.0", "@ai-sdk/anthropic": "2.0.0",
"@ai-sdk/openai": "2.0.2", "@ai-sdk/openai": "2.0.2",
@@ -158,7 +158,7 @@
}, },
"packages/console/mail": { "packages/console/mail": {
"name": "@opencode-ai/console-mail", "name": "@opencode-ai/console-mail",
"version": "1.1.36", "version": "0.0.0-ci-202601291718",
"dependencies": { "dependencies": {
"@jsx-email/all": "2.2.3", "@jsx-email/all": "2.2.3",
"@jsx-email/cli": "1.4.3", "@jsx-email/cli": "1.4.3",
@@ -182,12 +182,14 @@
}, },
"packages/desktop": { "packages/desktop": {
"name": "@opencode-ai/desktop", "name": "@opencode-ai/desktop",
"version": "1.1.36", "version": "0.0.0-ci-202601291718",
"dependencies": { "dependencies": {
"@opencode-ai/app": "workspace:*", "@opencode-ai/app": "workspace:*",
"@opencode-ai/ui": "workspace:*", "@opencode-ai/ui": "workspace:*",
"@solid-primitives/i18n": "2.2.1",
"@solid-primitives/storage": "catalog:", "@solid-primitives/storage": "catalog:",
"@tauri-apps/api": "^2", "@tauri-apps/api": "^2",
"@tauri-apps/plugin-deep-link": "~2",
"@tauri-apps/plugin-dialog": "~2", "@tauri-apps/plugin-dialog": "~2",
"@tauri-apps/plugin-http": "~2", "@tauri-apps/plugin-http": "~2",
"@tauri-apps/plugin-notification": "~2", "@tauri-apps/plugin-notification": "~2",
@@ -211,7 +213,7 @@
}, },
"packages/enterprise": { "packages/enterprise": {
"name": "@opencode-ai/enterprise", "name": "@opencode-ai/enterprise",
"version": "1.1.36", "version": "0.0.0-ci-202601291718",
"dependencies": { "dependencies": {
"@opencode-ai/ui": "workspace:*", "@opencode-ai/ui": "workspace:*",
"@opencode-ai/util": "workspace:*", "@opencode-ai/util": "workspace:*",
@@ -240,7 +242,7 @@
}, },
"packages/function": { "packages/function": {
"name": "@opencode-ai/function", "name": "@opencode-ai/function",
"version": "1.1.36", "version": "0.0.0-ci-202601291718",
"dependencies": { "dependencies": {
"@octokit/auth-app": "8.0.1", "@octokit/auth-app": "8.0.1",
"@octokit/rest": "catalog:", "@octokit/rest": "catalog:",
@@ -256,7 +258,7 @@
}, },
"packages/opencode": { "packages/opencode": {
"name": "opencode", "name": "opencode",
"version": "1.1.36", "version": "0.0.0-ci-202601291718",
"bin": { "bin": {
"opencode": "./bin/opencode", "opencode": "./bin/opencode",
}, },
@@ -360,7 +362,7 @@
}, },
"packages/plugin": { "packages/plugin": {
"name": "@opencode-ai/plugin", "name": "@opencode-ai/plugin",
"version": "1.1.36", "version": "0.0.0-ci-202601291718",
"dependencies": { "dependencies": {
"@opencode-ai/sdk": "workspace:*", "@opencode-ai/sdk": "workspace:*",
"zod": "catalog:", "zod": "catalog:",
@@ -380,7 +382,7 @@
}, },
"packages/sdk/js": { "packages/sdk/js": {
"name": "@opencode-ai/sdk", "name": "@opencode-ai/sdk",
"version": "1.1.36", "version": "0.0.0-ci-202601291718",
"devDependencies": { "devDependencies": {
"@hey-api/openapi-ts": "0.90.10", "@hey-api/openapi-ts": "0.90.10",
"@tsconfig/node22": "catalog:", "@tsconfig/node22": "catalog:",
@@ -391,7 +393,7 @@
}, },
"packages/slack": { "packages/slack": {
"name": "@opencode-ai/slack", "name": "@opencode-ai/slack",
"version": "1.1.36", "version": "0.0.0-ci-202601291718",
"dependencies": { "dependencies": {
"@opencode-ai/sdk": "workspace:*", "@opencode-ai/sdk": "workspace:*",
"@slack/bolt": "^3.17.1", "@slack/bolt": "^3.17.1",
@@ -404,7 +406,7 @@
}, },
"packages/ui": { "packages/ui": {
"name": "@opencode-ai/ui", "name": "@opencode-ai/ui",
"version": "1.1.36", "version": "0.0.0-ci-202601291718",
"dependencies": { "dependencies": {
"@kobalte/core": "catalog:", "@kobalte/core": "catalog:",
"@opencode-ai/sdk": "workspace:*", "@opencode-ai/sdk": "workspace:*",
@@ -446,7 +448,7 @@
}, },
"packages/util": { "packages/util": {
"name": "@opencode-ai/util", "name": "@opencode-ai/util",
"version": "1.1.36", "version": "0.0.0-ci-202601291718",
"dependencies": { "dependencies": {
"zod": "catalog:", "zod": "catalog:",
}, },
@@ -457,7 +459,7 @@
}, },
"packages/web": { "packages/web": {
"name": "@opencode-ai/web", "name": "@opencode-ai/web",
"version": "1.1.36", "version": "0.0.0-ci-202601291718",
"dependencies": { "dependencies": {
"@astrojs/cloudflare": "12.6.3", "@astrojs/cloudflare": "12.6.3",
"@astrojs/markdown-remark": "6.3.1", "@astrojs/markdown-remark": "6.3.1",
@@ -1747,6 +1749,8 @@
"@tauri-apps/cli-win32-x64-msvc": ["@tauri-apps/cli-win32-x64-msvc@2.9.4", "", { "os": "win32", "cpu": "x64" }, "sha512-EdYd4c9wGvtPB95kqtEyY+bUR+k4kRw3IA30mAQ1jPH6z57AftT8q84qwv0RDp6kkEqOBKxeInKfqi4BESYuqg=="], "@tauri-apps/cli-win32-x64-msvc": ["@tauri-apps/cli-win32-x64-msvc@2.9.4", "", { "os": "win32", "cpu": "x64" }, "sha512-EdYd4c9wGvtPB95kqtEyY+bUR+k4kRw3IA30mAQ1jPH6z57AftT8q84qwv0RDp6kkEqOBKxeInKfqi4BESYuqg=="],
"@tauri-apps/plugin-deep-link": ["@tauri-apps/plugin-deep-link@2.4.6", "", { "dependencies": { "@tauri-apps/api": "^2.8.0" } }, "sha512-UUOSt0U5juK20uhO2MoHZX/IPblkrhUh+VPtIeu3RwtzI0R9Em3Auzfg/PwcZ9Pv8mLne3cQ4p9CFXD6WxqCZA=="],
"@tauri-apps/plugin-dialog": ["@tauri-apps/plugin-dialog@2.4.2", "", { "dependencies": { "@tauri-apps/api": "^2.8.0" } }, "sha512-lNIn5CZuw8WZOn8zHzmFmDSzg5zfohWoa3mdULP0YFh/VogVdMVWZPcWSHlydsiJhRQYaTNSYKN7RmZKE2lCYQ=="], "@tauri-apps/plugin-dialog": ["@tauri-apps/plugin-dialog@2.4.2", "", { "dependencies": { "@tauri-apps/api": "^2.8.0" } }, "sha512-lNIn5CZuw8WZOn8zHzmFmDSzg5zfohWoa3mdULP0YFh/VogVdMVWZPcWSHlydsiJhRQYaTNSYKN7RmZKE2lCYQ=="],
"@tauri-apps/plugin-http": ["@tauri-apps/plugin-http@2.5.4", "", { "dependencies": { "@tauri-apps/api": "^2.8.0" } }, "sha512-/i4U/9za3mrytTgfRn5RHneKubZE/dwRmshYwyMvNRlkWjvu1m4Ma72kcbVJMZFGXpkbl+qLyWMGrihtWB76Zg=="], "@tauri-apps/plugin-http": ["@tauri-apps/plugin-http@2.5.4", "", { "dependencies": { "@tauri-apps/api": "^2.8.0" } }, "sha512-/i4U/9za3mrytTgfRn5RHneKubZE/dwRmshYwyMvNRlkWjvu1m4Ma72kcbVJMZFGXpkbl+qLyWMGrihtWB76Zg=="],
+4 -4
View File
@@ -1,8 +1,8 @@
{ {
"nodeModules": { "nodeModules": {
"x86_64-linux": "sha256-AkI3guNjnE+bLZQVfzm0z14UENOECv2QBqMo5Lzkvt8=", "x86_64-linux": "sha256-yAtZlh6YR78RwPt0LK/7Pk0qUm0/97+s6ghhZzuoE/0=",
"aarch64-linux": "sha256-dBfdyVTqW+fBZKCxC9Ld+1m3cP+nIbS6UDo0tUfPOSk=", "aarch64-linux": "sha256-6j81rdjQ7Wps9bvfw+mmdwW5p01qUOwX40UZltCTe3Y=",
"aarch64-darwin": "sha256-tOw31AMnHkW2cEDi+iqT3P93lU3SiMve26TEIqPz97k=", "aarch64-darwin": "sha256-pDM8M/QMWR6Go5pz3XXsJqcJDHAlHrx2Faijjkzcngo=",
"x86_64-darwin": "sha256-wL/DmdZmxCmh+r4dsS1XGXuj8VPwR4pUqy5VIA76jl0=" "x86_64-darwin": "sha256-eOAPtMd1n5xYupBOevCLhY1eFy3wzGqFk/EsZocl9Y8="
} }
} }
+37
View File
@@ -0,0 +1,37 @@
import { test, expect } from "./fixtures"
test("file tree can expand folders and open a file", async ({ page, gotoSession }) => {
await gotoSession()
const toggle = page.getByRole("button", { name: "Toggle file tree" })
const treeTabs = page.locator('[data-component="tabs"][data-variant="pill"][data-scope="filetree"]')
if ((await toggle.getAttribute("aria-expanded")) !== "true") await toggle.click()
await expect(treeTabs).toBeVisible()
await treeTabs.locator('[data-slot="tabs-trigger"]').nth(1).click()
const node = (name: string) => treeTabs.getByRole("button", { name, exact: true })
await expect(node("packages")).toBeVisible()
await node("packages").click()
await expect(node("app")).toBeVisible()
await node("app").click()
await expect(node("src")).toBeVisible()
await node("src").click()
await expect(node("components")).toBeVisible()
await node("components").click()
await expect(node("file-tree.tsx")).toBeVisible()
await node("file-tree.tsx").click()
const tab = page.getByRole("tab", { name: "file-tree.tsx" })
await expect(tab).toBeVisible()
await tab.click()
const code = page.locator('[data-component="code"]').first()
await expect(code.getByText("export default function FileTree")).toBeVisible()
})
+50 -1
View File
@@ -1,5 +1,5 @@
import { test as base, expect } from "@playwright/test" import { test as base, expect } from "@playwright/test"
import { createSdk, dirSlug, getWorktree, promptSelector, sessionPath } from "./utils" import { createSdk, dirSlug, getWorktree, promptSelector, serverUrl, sessionPath } from "./utils"
type TestFixtures = { type TestFixtures = {
sdk: ReturnType<typeof createSdk> sdk: ReturnType<typeof createSdk>
@@ -29,6 +29,55 @@ export const test = base.extend<TestFixtures, WorkerFixtures>({
await use(createSdk(directory)) await use(createSdk(directory))
}, },
gotoSession: async ({ page, directory }, use) => { gotoSession: async ({ page, directory }, use) => {
await page.addInitScript(
(input: { directory: string; serverUrl: string }) => {
const key = "opencode.global.dat:server"
const raw = localStorage.getItem(key)
const parsed = (() => {
if (!raw) return undefined
try {
return JSON.parse(raw) as unknown
} catch {
return undefined
}
})()
const store = parsed && typeof parsed === "object" ? (parsed as Record<string, unknown>) : {}
const list = Array.isArray(store.list) ? store.list : []
const lastProject = store.lastProject && typeof store.lastProject === "object" ? store.lastProject : {}
const projects = store.projects && typeof store.projects === "object" ? store.projects : {}
const nextProjects = { ...(projects as Record<string, unknown>) }
const add = (origin: string) => {
const current = nextProjects[origin]
const items = Array.isArray(current) ? current : []
const existing = items.filter(
(p): p is { worktree: string; expanded?: boolean } =>
!!p &&
typeof p === "object" &&
"worktree" in p &&
typeof (p as { worktree?: unknown }).worktree === "string",
)
if (existing.some((p) => p.worktree === input.directory)) return
nextProjects[origin] = [{ worktree: input.directory, expanded: true }, ...existing]
}
add("local")
add(input.serverUrl)
localStorage.setItem(
key,
JSON.stringify({
list,
projects: nextProjects,
lastProject,
}),
)
},
{ directory, serverUrl },
)
const gotoSession = async (sessionID?: string) => { const gotoSession = async (sessionID?: string) => {
await page.goto(sessionPath(directory, sessionID)) await page.goto(sessionPath(directory, sessionID))
await expect(page.locator(promptSelector)).toBeVisible() await expect(page.locator(promptSelector)).toBeVisible()
@@ -0,0 +1,86 @@
import { test, expect } from "./fixtures"
import { modKey, promptSelector } from "./utils"
test("hiding a model removes it from the model picker", async ({ page, gotoSession }) => {
await gotoSession()
await page.locator(promptSelector).click()
await page.keyboard.type("/model")
const command = page.locator('[data-slash-id="model.choose"]')
await expect(command).toBeVisible()
await command.hover()
await page.keyboard.press("Enter")
const picker = page.getByRole("dialog")
await expect(picker).toBeVisible()
const target = picker.locator('[data-slot="list-item"]').first()
await expect(target).toBeVisible()
const key = await target.getAttribute("data-key")
if (!key) throw new Error("Failed to resolve model key from list item")
const name = (await target.locator("span").first().innerText()).trim()
if (!name) throw new Error("Failed to resolve model name from list item")
await page.keyboard.press("Escape")
await expect(picker).toHaveCount(0)
const settings = page.getByRole("dialog")
await page.keyboard.press(`${modKey}+Comma`).catch(() => undefined)
const opened = await settings
.waitFor({ state: "visible", timeout: 3000 })
.then(() => true)
.catch(() => false)
if (!opened) {
await page.getByRole("button", { name: "Settings" }).first().click()
await expect(settings).toBeVisible()
}
await settings.getByRole("tab", { name: "Models" }).click()
const search = settings.getByPlaceholder("Search models")
await expect(search).toBeVisible()
await search.fill(name)
const toggle = settings.locator('[data-component="switch"]').filter({ hasText: name }).first()
const input = toggle.locator('[data-slot="switch-input"]')
await expect(toggle).toBeVisible()
await expect(input).toHaveAttribute("aria-checked", "true")
await toggle.locator('[data-slot="switch-control"]').click()
await expect(input).toHaveAttribute("aria-checked", "false")
await page.keyboard.press("Escape")
const closed = await settings
.waitFor({ state: "detached", timeout: 1500 })
.then(() => true)
.catch(() => false)
if (!closed) {
await page.keyboard.press("Escape")
const closedSecond = await settings
.waitFor({ state: "detached", timeout: 1500 })
.then(() => true)
.catch(() => false)
if (!closedSecond) {
await page.locator('[data-component="dialog-overlay"]').click({ position: { x: 5, y: 5 } })
await expect(settings).toHaveCount(0)
}
}
await page.locator(promptSelector).click()
await page.keyboard.type("/model")
await expect(command).toBeVisible()
await command.hover()
await page.keyboard.press("Enter")
const pickerAgain = page.getByRole("dialog")
await expect(pickerAgain).toBeVisible()
await expect(pickerAgain.locator('[data-slot="list-item"]').first()).toBeVisible()
await expect(pickerAgain.locator(`[data-slot="list-item"][data-key="${key}"]`)).toHaveCount(0)
await page.keyboard.press("Escape")
await expect(pickerAgain).toHaveCount(0)
})
+67
View File
@@ -0,0 +1,67 @@
import { test, expect } from "./fixtures"
import { serverName, serverUrl } from "./utils"
const DEFAULT_SERVER_URL_KEY = "opencode.settings.dat:defaultServerUrl"
test("can set a default server on web", async ({ page, gotoSession }) => {
await page.addInitScript((key: string) => {
try {
localStorage.removeItem(key)
} catch {
return
}
}, DEFAULT_SERVER_URL_KEY)
await gotoSession()
const status = page.getByRole("button", { name: "Status" })
await expect(status).toBeVisible()
const popover = page.locator('[data-component="popover-content"]').filter({ hasText: "Manage servers" })
const ensurePopoverOpen = async () => {
if (await popover.isVisible()) return
await status.click()
await expect(popover).toBeVisible()
}
await ensurePopoverOpen()
await popover.getByRole("button", { name: "Manage servers" }).click()
const dialog = page.getByRole("dialog")
await expect(dialog).toBeVisible()
const row = dialog.locator('[data-slot="list-item"]').filter({ hasText: serverName }).first()
await expect(row).toBeVisible()
const menu = row.locator('[data-component="icon-button"]').last()
await menu.click()
await page.getByRole("menuitem", { name: "Set as default" }).click()
await expect.poll(() => page.evaluate((key) => localStorage.getItem(key), DEFAULT_SERVER_URL_KEY)).toBe(serverUrl)
await expect(row.getByText("Default", { exact: true })).toBeVisible()
await page.keyboard.press("Escape")
const closed = await dialog
.waitFor({ state: "detached", timeout: 1500 })
.then(() => true)
.catch(() => false)
if (!closed) {
await page.keyboard.press("Escape")
const closedSecond = await dialog
.waitFor({ state: "detached", timeout: 1500 })
.then(() => true)
.catch(() => false)
if (!closedSecond) {
await page.locator('[data-component="dialog-overlay"]').click({ position: { x: 5, y: 5 } })
await expect(dialog).toHaveCount(0)
}
}
await ensurePopoverOpen()
const serverRow = popover.locator("button").filter({ hasText: serverName }).first()
await expect(serverRow).toBeVisible()
await expect(serverRow.getByText("Default", { exact: true })).toBeVisible()
})
@@ -0,0 +1,56 @@
import { test, expect } from "./fixtures"
import { modKey, promptSelector } from "./utils"
test("smoke providers settings opens provider selector", async ({ page, gotoSession }) => {
await gotoSession()
const dialog = page.getByRole("dialog")
await page.keyboard.press(`${modKey}+Comma`).catch(() => undefined)
const opened = await dialog
.waitFor({ state: "visible", timeout: 3000 })
.then(() => true)
.catch(() => false)
if (!opened) {
await page.getByRole("button", { name: "Settings" }).first().click()
await expect(dialog).toBeVisible()
}
await dialog.getByRole("tab", { name: "Providers" }).click()
await expect(dialog.getByText("Connected providers", { exact: true })).toBeVisible()
await expect(dialog.getByText("Popular providers", { exact: true })).toBeVisible()
await dialog.getByRole("button", { name: "Show more providers" }).click()
const providerDialog = page.getByRole("dialog").filter({ has: page.getByPlaceholder("Search providers") })
await expect(providerDialog).toBeVisible()
await expect(providerDialog.getByPlaceholder("Search providers")).toBeVisible()
await expect(providerDialog.locator('[data-slot="list-item"]').first()).toBeVisible()
await page.keyboard.press("Escape")
await expect(providerDialog).toHaveCount(0)
await expect(page.locator(promptSelector)).toBeVisible()
const stillOpen = await dialog.isVisible().catch(() => false)
if (!stillOpen) return
await page.keyboard.press("Escape")
const closed = await dialog
.waitFor({ state: "detached", timeout: 1500 })
.then(() => true)
.catch(() => false)
if (closed) return
await page.keyboard.press("Escape")
const closedSecond = await dialog
.waitFor({ state: "detached", timeout: 1500 })
.then(() => true)
.catch(() => false)
if (closedSecond) return
await page.locator('[data-component="dialog-overlay"]').click({ position: { x: 5, y: 5 } })
await expect(dialog).toHaveCount(0)
})
@@ -0,0 +1,61 @@
import { test, expect } from "./fixtures"
import { modKey, promptSelector } from "./utils"
type Locator = {
first: () => Locator
getAttribute: (name: string) => Promise<string | null>
scrollIntoViewIfNeeded: () => Promise<void>
click: () => Promise<void>
}
type Page = {
locator: (selector: string) => Locator
keyboard: {
press: (key: string) => Promise<void>
}
}
type Fixtures = {
page: Page
slug: string
sdk: {
session: {
create: (input: { title: string }) => Promise<{ data?: { id?: string } }>
delete: (input: { sessionID: string }) => Promise<unknown>
}
}
gotoSession: (sessionID?: string) => Promise<void>
}
test("sidebar session links navigate to the selected session", async ({ page, slug, sdk, gotoSession }: Fixtures) => {
const stamp = Date.now()
const one = await sdk.session.create({ title: `e2e sidebar nav 1 ${stamp}` }).then((r) => r.data)
const two = await sdk.session.create({ title: `e2e sidebar nav 2 ${stamp}` }).then((r) => r.data)
if (!one?.id) throw new Error("Session create did not return an id")
if (!two?.id) throw new Error("Session create did not return an id")
try {
await gotoSession(one.id)
const main = page.locator("main")
const collapsed = ((await main.getAttribute("class")) ?? "").includes("xl:border-l")
if (collapsed) {
await page.keyboard.press(`${modKey}+B`)
await expect(main).not.toHaveClass(/xl:border-l/)
}
const target = page.locator(`[data-session-id="${two.id}"] a`).first()
await expect(target).toBeVisible()
await target.scrollIntoViewIfNeeded()
await target.click()
await expect(page).toHaveURL(new RegExp(`/${slug}/session/${two.id}(?:\\?|#|$)`))
await expect(page.locator(promptSelector)).toBeVisible()
await expect(page.locator(`[data-session-id="${two.id}"] a`).first()).toHaveClass(/\bactive\b/)
} finally {
await sdk.session.delete({ sessionID: one.id }).catch(() => undefined)
await sdk.session.delete({ sessionID: two.id }).catch(() => undefined)
}
})
+52
View File
@@ -0,0 +1,52 @@
import { test, expect } from "./fixtures"
import { modKey, promptSelector } from "./utils"
test("titlebar back/forward navigates between sessions", async ({ page, slug, sdk, gotoSession }) => {
await page.setViewportSize({ width: 1400, height: 800 })
const stamp = Date.now()
const one = await sdk.session.create({ title: `e2e titlebar history 1 ${stamp}` }).then((r) => r.data)
const two = await sdk.session.create({ title: `e2e titlebar history 2 ${stamp}` }).then((r) => r.data)
if (!one?.id) throw new Error("Session create did not return an id")
if (!two?.id) throw new Error("Session create did not return an id")
try {
await gotoSession(one.id)
const main = page.locator("main")
const collapsed = ((await main.getAttribute("class")) ?? "").includes("xl:border-l")
if (collapsed) {
await page.keyboard.press(`${modKey}+B`)
await expect(main).not.toHaveClass(/xl:border-l/)
}
const link = page.locator(`[data-session-id="${two.id}"] a`).first()
await expect(link).toBeVisible()
await link.scrollIntoViewIfNeeded()
await link.click()
await expect(page).toHaveURL(new RegExp(`/${slug}/session/${two.id}(?:\\?|#|$)`))
await expect(page.locator(promptSelector)).toBeVisible()
const back = page.getByRole("button", { name: "Back" })
const forward = page.getByRole("button", { name: "Forward" })
await expect(back).toBeVisible()
await expect(back).toBeEnabled()
await back.click()
await expect(page).toHaveURL(new RegExp(`/${slug}/session/${one.id}(?:\\?|#|$)`))
await expect(page.locator(promptSelector)).toBeVisible()
await expect(forward).toBeVisible()
await expect(forward).toBeEnabled()
await forward.click()
await expect(page).toHaveURL(new RegExp(`/${slug}/session/${two.id}(?:\\?|#|$)`))
await expect(page.locator(promptSelector)).toBeVisible()
} finally {
await sdk.session.delete({ sessionID: one.id }).catch(() => undefined)
await sdk.session.delete({ sessionID: two.id }).catch(() => undefined)
}
})
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "@opencode-ai/app", "name": "@opencode-ai/app",
"version": "1.1.36", "version": "0.0.0-ci-202601291718",
"description": "", "description": "",
"type": "module", "type": "module",
"exports": { "exports": {
+4 -3
View File
@@ -26,11 +26,10 @@ import { DialogProvider } from "@opencode-ai/ui/context/dialog"
import { CommandProvider } from "@/context/command" import { CommandProvider } from "@/context/command"
import { LanguageProvider, useLanguage } from "@/context/language" import { LanguageProvider, useLanguage } from "@/context/language"
import { usePlatform } from "@/context/platform" import { usePlatform } from "@/context/platform"
import { Logo } from "@opencode-ai/ui/logo" import { HighlightsProvider } from "@/context/highlights"
import Layout from "@/pages/layout" import Layout from "@/pages/layout"
import DirectoryLayout from "@/pages/directory-layout" import DirectoryLayout from "@/pages/directory-layout"
import { ErrorPage } from "./pages/error" import { ErrorPage } from "./pages/error"
import { iife } from "@opencode-ai/util/iife"
import { Suspense } from "solid-js" import { Suspense } from "solid-js"
const Home = lazy(() => import("@/pages/home")) const Home = lazy(() => import("@/pages/home"))
@@ -44,7 +43,7 @@ function UiI18nBridge(props: ParentProps) {
declare global { declare global {
interface Window { interface Window {
__OPENCODE__?: { updaterEnabled?: boolean; serverPassword?: string } __OPENCODE__?: { updaterEnabled?: boolean; serverPassword?: string; deepLinks?: string[] }
} }
} }
@@ -119,7 +118,9 @@ export function AppInterface(props: { defaultUrl?: string }) {
<NotificationProvider> <NotificationProvider>
<ModelsProvider> <ModelsProvider>
<CommandProvider> <CommandProvider>
<HighlightsProvider>
<Layout>{props.children}</Layout> <Layout>{props.children}</Layout>
</HighlightsProvider>
</CommandProvider> </CommandProvider>
</ModelsProvider> </ModelsProvider>
</NotificationProvider> </NotificationProvider>
@@ -27,6 +27,17 @@ export function DialogConnectProvider(props: { provider: string }) {
const globalSDK = useGlobalSDK() const globalSDK = useGlobalSDK()
const platform = usePlatform() const platform = usePlatform()
const language = useLanguage() const language = useLanguage()
const alive = { value: true }
const timer = { current: undefined as ReturnType<typeof setTimeout> | undefined }
onCleanup(() => {
alive.value = false
if (timer.current === undefined) return
clearTimeout(timer.current)
timer.current = undefined
})
const provider = createMemo(() => globalSync.data.provider.all.find((x) => x.id === props.provider)!) const provider = createMemo(() => globalSync.data.provider.all.find((x) => x.id === props.provider)!)
const methods = createMemo( const methods = createMemo(
() => () =>
@@ -53,6 +64,11 @@ export function DialogConnectProvider(props: { provider: string }) {
} }
async function selectMethod(index: number) { async function selectMethod(index: number) {
if (timer.current !== undefined) {
clearTimeout(timer.current)
timer.current = undefined
}
const method = methods()[index] const method = methods()[index]
setStore( setStore(
produce((draft) => { produce((draft) => {
@@ -75,11 +91,15 @@ export function DialogConnectProvider(props: { provider: string }) {
{ throwOnError: true }, { throwOnError: true },
) )
.then((x) => { .then((x) => {
if (!alive.value) return
const elapsed = Date.now() - start const elapsed = Date.now() - start
const delay = 1000 - elapsed const delay = 1000 - elapsed
if (delay > 0) { if (delay > 0) {
setTimeout(() => { if (timer.current !== undefined) clearTimeout(timer.current)
timer.current = setTimeout(() => {
timer.current = undefined
if (!alive.value) return
setStore("state", "complete") setStore("state", "complete")
setStore("authorization", x.data!) setStore("authorization", x.data!)
}, delay) }, delay)
@@ -89,6 +109,7 @@ export function DialogConnectProvider(props: { provider: string }) {
setStore("authorization", x.data!) setStore("authorization", x.data!)
}) })
.catch((e) => { .catch((e) => {
if (!alive.value) return
setStore("state", "error") setStore("state", "error")
setStore("error", String(e)) setStore("error", String(e))
}) })
@@ -372,10 +393,12 @@ export function DialogConnectProvider(props: { provider: string }) {
return instructions return instructions
}) })
onMount(async () => { onMount(() => {
void (async () => {
if (store.authorization?.url) { if (store.authorization?.url) {
platform.openLink(store.authorization.url) platform.openLink(store.authorization.url)
} }
const result = await globalSDK.client.provider.oauth const result = await globalSDK.client.provider.oauth
.callback({ .callback({
providerID: props.provider, providerID: props.provider,
@@ -385,13 +408,18 @@ export function DialogConnectProvider(props: { provider: string }) {
value.error ? { ok: false as const, error: value.error } : { ok: true as const }, value.error ? { ok: false as const, error: value.error } : { ok: true as const },
) )
.catch((error) => ({ ok: false as const, error })) .catch((error) => ({ ok: false as const, error }))
if (!alive.value) return
if (!result.ok) { if (!result.ok) {
const message = result.error instanceof Error ? result.error.message : String(result.error) const message = result.error instanceof Error ? result.error.message : String(result.error)
setStore("state", "error") setStore("state", "error")
setStore("error", message) setStore("error", message)
return return
} }
await complete() await complete()
})()
}) })
return ( return (
@@ -0,0 +1,424 @@
import { Button } from "@opencode-ai/ui/button"
import { useDialog } from "@opencode-ai/ui/context/dialog"
import { Dialog } from "@opencode-ai/ui/dialog"
import { IconButton } from "@opencode-ai/ui/icon-button"
import { ProviderIcon } from "@opencode-ai/ui/provider-icon"
import { TextField } from "@opencode-ai/ui/text-field"
import { showToast } from "@opencode-ai/ui/toast"
import { For } from "solid-js"
import { createStore, produce } from "solid-js/store"
import { Link } from "@/components/link"
import { useGlobalSDK } from "@/context/global-sdk"
import { useGlobalSync } from "@/context/global-sync"
import { useLanguage } from "@/context/language"
import { DialogSelectProvider } from "./dialog-select-provider"
const PROVIDER_ID = /^[a-z0-9][a-z0-9-_]*$/
const OPENAI_COMPATIBLE = "@ai-sdk/openai-compatible"
type Props = {
back?: "providers" | "close"
}
export function DialogCustomProvider(props: Props) {
const dialog = useDialog()
const globalSync = useGlobalSync()
const globalSDK = useGlobalSDK()
const language = useLanguage()
const [form, setForm] = createStore({
providerID: "",
name: "",
baseURL: "",
apiKey: "",
models: [{ id: "", name: "" }],
headers: [{ key: "", value: "" }],
saving: false,
})
const [errors, setErrors] = createStore({
providerID: undefined as string | undefined,
name: undefined as string | undefined,
baseURL: undefined as string | undefined,
models: [{} as { id?: string; name?: string }],
headers: [{} as { key?: string; value?: string }],
})
const goBack = () => {
if (props.back === "close") {
dialog.close()
return
}
dialog.show(() => <DialogSelectProvider />)
}
const addModel = () => {
setForm(
"models",
produce((draft) => {
draft.push({ id: "", name: "" })
}),
)
setErrors(
"models",
produce((draft) => {
draft.push({})
}),
)
}
const removeModel = (index: number) => {
if (form.models.length <= 1) return
setForm(
"models",
produce((draft) => {
draft.splice(index, 1)
}),
)
setErrors(
"models",
produce((draft) => {
draft.splice(index, 1)
}),
)
}
const addHeader = () => {
setForm(
"headers",
produce((draft) => {
draft.push({ key: "", value: "" })
}),
)
setErrors(
"headers",
produce((draft) => {
draft.push({})
}),
)
}
const removeHeader = (index: number) => {
if (form.headers.length <= 1) return
setForm(
"headers",
produce((draft) => {
draft.splice(index, 1)
}),
)
setErrors(
"headers",
produce((draft) => {
draft.splice(index, 1)
}),
)
}
const validate = () => {
const providerID = form.providerID.trim()
const name = form.name.trim()
const baseURL = form.baseURL.trim()
const apiKey = form.apiKey.trim()
const env = apiKey.match(/^\{env:([^}]+)\}$/)?.[1]?.trim()
const key = apiKey && !env ? apiKey : undefined
const idError = !providerID
? "Provider ID is required"
: !PROVIDER_ID.test(providerID)
? "Use lowercase letters, numbers, hyphens, or underscores"
: undefined
const nameError = !name ? "Display name is required" : undefined
const urlError = !baseURL
? "Base URL is required"
: !/^https?:\/\//.test(baseURL)
? "Must start with http:// or https://"
: undefined
const disabled = (globalSync.data.config.disabled_providers ?? []).includes(providerID)
const existingProvider = globalSync.data.provider.all.find((p) => p.id === providerID)
const existsError = idError
? undefined
: existingProvider && !disabled
? "That provider ID already exists"
: undefined
const seenModels = new Set<string>()
const modelErrors = form.models.map((m) => {
const id = m.id.trim()
const modelIdError = !id
? "Required"
: seenModels.has(id)
? "Duplicate"
: (() => {
seenModels.add(id)
return undefined
})()
const modelNameError = !m.name.trim() ? "Required" : undefined
return { id: modelIdError, name: modelNameError }
})
const modelsValid = modelErrors.every((m) => !m.id && !m.name)
const models = Object.fromEntries(form.models.map((m) => [m.id.trim(), { name: m.name.trim() }]))
const seenHeaders = new Set<string>()
const headerErrors = form.headers.map((h) => {
const key = h.key.trim()
const value = h.value.trim()
if (!key && !value) return {}
const keyError = !key
? "Required"
: seenHeaders.has(key.toLowerCase())
? "Duplicate"
: (() => {
seenHeaders.add(key.toLowerCase())
return undefined
})()
const valueError = !value ? "Required" : undefined
return { key: keyError, value: valueError }
})
const headersValid = headerErrors.every((h) => !h.key && !h.value)
const headers = Object.fromEntries(
form.headers
.map((h) => ({ key: h.key.trim(), value: h.value.trim() }))
.filter((h) => !!h.key && !!h.value)
.map((h) => [h.key, h.value]),
)
setErrors(
produce((draft) => {
draft.providerID = idError ?? existsError
draft.name = nameError
draft.baseURL = urlError
draft.models = modelErrors
draft.headers = headerErrors
}),
)
const ok = !idError && !existsError && !nameError && !urlError && modelsValid && headersValid
if (!ok) return
const options = {
baseURL,
...(Object.keys(headers).length ? { headers } : {}),
}
return {
providerID,
name,
key,
config: {
npm: OPENAI_COMPATIBLE,
name,
...(env ? { env: [env] } : {}),
options,
models,
},
}
}
const save = async (e: SubmitEvent) => {
e.preventDefault()
if (form.saving) return
const result = validate()
if (!result) return
setForm("saving", true)
const disabledProviders = globalSync.data.config.disabled_providers ?? []
const nextDisabled = disabledProviders.filter((id) => id !== result.providerID)
const auth = result.key
? globalSDK.client.auth.set({
providerID: result.providerID,
auth: {
type: "api",
key: result.key,
},
})
: Promise.resolve()
auth
.then(() =>
globalSync.updateConfig({ provider: { [result.providerID]: result.config }, disabled_providers: nextDisabled }),
)
.then(() => {
dialog.close()
showToast({
variant: "success",
icon: "circle-check",
title: language.t("provider.connect.toast.connected.title", { provider: result.name }),
description: language.t("provider.connect.toast.connected.description", { provider: result.name }),
})
})
.catch((err: unknown) => {
const message = err instanceof Error ? err.message : String(err)
showToast({ title: language.t("common.requestFailed"), description: message })
})
.finally(() => {
setForm("saving", false)
})
}
return (
<Dialog
title={
<IconButton
tabIndex={-1}
icon="arrow-left"
variant="ghost"
onClick={goBack}
aria-label={language.t("common.goBack")}
/>
}
transition
>
<div class="flex flex-col gap-6 px-2.5 pb-3 overflow-y-auto max-h-[60vh]">
<div class="px-2.5 flex gap-4 items-center">
<ProviderIcon id="synthetic" class="size-5 shrink-0 icon-strong-base" />
<div class="text-16-medium text-text-strong">Custom provider</div>
</div>
<form onSubmit={save} class="px-2.5 pb-6 flex flex-col gap-6">
<p class="text-14-regular text-text-base">
Configure an OpenAI-compatible provider. See the{" "}
<Link href="https://opencode.ai/docs/providers/#custom-provider" tabIndex={-1}>
provider config docs
</Link>
.
</p>
<div class="flex flex-col gap-4">
<TextField
autofocus
label="Provider ID"
placeholder="myprovider"
description="Lowercase letters, numbers, hyphens, or underscores"
value={form.providerID}
onChange={setForm.bind(null, "providerID")}
validationState={errors.providerID ? "invalid" : undefined}
error={errors.providerID}
/>
<TextField
label="Display name"
placeholder="My AI Provider"
value={form.name}
onChange={setForm.bind(null, "name")}
validationState={errors.name ? "invalid" : undefined}
error={errors.name}
/>
<TextField
label="Base URL"
placeholder="https://api.myprovider.com/v1"
value={form.baseURL}
onChange={setForm.bind(null, "baseURL")}
validationState={errors.baseURL ? "invalid" : undefined}
error={errors.baseURL}
/>
<TextField
label="API key"
placeholder="API key"
description="Optional. Leave empty if you manage auth via headers."
value={form.apiKey}
onChange={setForm.bind(null, "apiKey")}
/>
</div>
<div class="flex flex-col gap-3">
<label class="text-12-medium text-text-weak">Models</label>
<For each={form.models}>
{(m, i) => (
<div class="flex gap-2 items-start">
<div class="flex-1">
<TextField
label="ID"
hideLabel
placeholder="model-id"
value={m.id}
onChange={(v) => setForm("models", i(), "id", v)}
validationState={errors.models[i()]?.id ? "invalid" : undefined}
error={errors.models[i()]?.id}
/>
</div>
<div class="flex-1">
<TextField
label="Name"
hideLabel
placeholder="Display Name"
value={m.name}
onChange={(v) => setForm("models", i(), "name", v)}
validationState={errors.models[i()]?.name ? "invalid" : undefined}
error={errors.models[i()]?.name}
/>
</div>
<IconButton
type="button"
icon="trash"
variant="ghost"
class="mt-1.5"
onClick={() => removeModel(i())}
disabled={form.models.length <= 1}
aria-label="Remove model"
/>
</div>
)}
</For>
<Button type="button" size="small" variant="ghost" icon="plus-small" onClick={addModel} class="self-start">
Add model
</Button>
</div>
<div class="flex flex-col gap-3">
<label class="text-12-medium text-text-weak">Headers (optional)</label>
<For each={form.headers}>
{(h, i) => (
<div class="flex gap-2 items-start">
<div class="flex-1">
<TextField
label="Header"
hideLabel
placeholder="Header-Name"
value={h.key}
onChange={(v) => setForm("headers", i(), "key", v)}
validationState={errors.headers[i()]?.key ? "invalid" : undefined}
error={errors.headers[i()]?.key}
/>
</div>
<div class="flex-1">
<TextField
label="Value"
hideLabel
placeholder="value"
value={h.value}
onChange={(v) => setForm("headers", i(), "value", v)}
validationState={errors.headers[i()]?.value ? "invalid" : undefined}
error={errors.headers[i()]?.value}
/>
</div>
<IconButton
type="button"
icon="trash"
variant="ghost"
class="mt-1.5"
onClick={() => removeHeader(i())}
disabled={form.headers.length <= 1}
aria-label="Remove header"
/>
</div>
)}
</For>
<Button type="button" size="small" variant="ghost" icon="plus-small" onClick={addHeader} class="self-start">
Add header
</Button>
</div>
<Button class="w-auto self-start" type="submit" size="large" variant="primary" disabled={form.saving}>
{form.saving ? "Saving..." : language.t("common.submit")}
</Button>
</form>
</div>
</Dialog>
)
}
@@ -145,8 +145,7 @@ export function DialogEditProject(props: { project: LocalProject }) {
<Avatar <Avatar
fallback={store.name || defaultName()} fallback={store.name || defaultName()}
{...getAvatarColors(store.color)} {...getAvatarColors(store.color)}
class="size-full" class="size-full text-[32px]"
style={{ "font-size": "32px" }}
/> />
</div> </div>
} }
@@ -159,39 +158,19 @@ export function DialogEditProject(props: { project: LocalProject }) {
</Show> </Show>
</div> </div>
<div <div
style={{ class="absolute inset-0 size-16 bg-black/60 rounded-[6px] z-10 pointer-events-none flex items-center justify-center transition-opacity"
position: "absolute", classList={{
top: 0, "opacity-100": store.iconHover && !store.iconUrl,
left: 0, "opacity-0": !(store.iconHover && !store.iconUrl),
width: "64px",
height: "64px",
background: "rgba(0,0,0,0.6)",
"border-radius": "6px",
"z-index": 10,
"pointer-events": "none",
opacity: store.iconHover && !store.iconUrl ? 1 : 0,
display: "flex",
"align-items": "center",
"justify-content": "center",
}} }}
> >
<Icon name="cloud-upload" size="large" class="text-icon-invert-base" /> <Icon name="cloud-upload" size="large" class="text-icon-invert-base" />
</div> </div>
<div <div
style={{ class="absolute inset-0 size-16 bg-black/60 rounded-[6px] z-10 pointer-events-none flex items-center justify-center transition-opacity"
position: "absolute", classList={{
top: 0, "opacity-100": store.iconHover && !!store.iconUrl,
left: 0, "opacity-0": !(store.iconHover && !!store.iconUrl),
width: "64px",
height: "64px",
background: "rgba(0,0,0,0.6)",
"border-radius": "6px",
"z-index": 10,
"pointer-events": "none",
opacity: store.iconHover && store.iconUrl ? 1 : 0,
display: "flex",
"align-items": "center",
"justify-content": "center",
}} }}
> >
<Icon name="trash" size="large" class="text-icon-invert-base" /> <Icon name="trash" size="large" class="text-icon-invert-base" />
+2 -6
View File
@@ -90,12 +90,8 @@ export const DialogFork: Component = () => {
> >
{(item) => ( {(item) => (
<div class="w-full flex items-center gap-2"> <div class="w-full flex items-center gap-2">
<span class="truncate flex-1 min-w-0 text-left" style={{ "font-weight": "400" }}> <span class="truncate flex-1 min-w-0 text-left font-normal">{item.text}</span>
{item.text} <span class="text-text-weak shrink-0 font-normal">{item.time}</span>
</span>
<span class="text-text-weak shrink-0" style={{ "font-weight": "400" }}>
{item.time}
</span>
</div> </div>
)} )}
</List> </List>
@@ -1,16 +1,33 @@
import { Dialog } from "@opencode-ai/ui/dialog" import { Dialog } from "@opencode-ai/ui/dialog"
import { List } from "@opencode-ai/ui/list" import { List } from "@opencode-ai/ui/list"
import { Switch } from "@opencode-ai/ui/switch" import { Switch } from "@opencode-ai/ui/switch"
import { Button } from "@opencode-ai/ui/button"
import type { Component } from "solid-js" import type { Component } from "solid-js"
import { useLocal } from "@/context/local" import { useLocal } from "@/context/local"
import { popularProviders } from "@/hooks/use-providers" import { popularProviders } from "@/hooks/use-providers"
import { useLanguage } from "@/context/language" import { useLanguage } from "@/context/language"
import { useDialog } from "@opencode-ai/ui/context/dialog"
import { DialogSelectProvider } from "./dialog-select-provider"
export const DialogManageModels: Component = () => { export const DialogManageModels: Component = () => {
const local = useLocal() const local = useLocal()
const language = useLanguage() const language = useLanguage()
const dialog = useDialog()
const handleConnectProvider = () => {
dialog.show(() => <DialogSelectProvider />)
}
return ( return (
<Dialog title={language.t("dialog.model.manage")} description={language.t("dialog.model.manage.description")}> <Dialog
title={language.t("dialog.model.manage")}
description={language.t("dialog.model.manage.description")}
action={
<Button class="h-7 -my-1 text-14-medium" icon="plus-small" tabIndex={-1} onClick={handleConnectProvider}>
{language.t("command.provider.connect")}
</Button>
}
>
<List <List
search={{ placeholder: language.t("dialog.model.search.placeholder"), autofocus: true }} search={{ placeholder: language.t("dialog.model.search.placeholder"), autofocus: true }}
emptyMessage={language.t("dialog.model.empty")} emptyMessage={language.t("dialog.model.empty")}
@@ -0,0 +1,158 @@
import { createSignal, createEffect, onMount, onCleanup } from "solid-js"
import { Dialog } from "@opencode-ai/ui/dialog"
import { Button } from "@opencode-ai/ui/button"
import { useDialog } from "@opencode-ai/ui/context/dialog"
import { useSettings } from "@/context/settings"
export type Highlight = {
title: string
description: string
media?: {
type: "image" | "video"
src: string
alt?: string
}
}
export function DialogReleaseNotes(props: { highlights: Highlight[] }) {
const dialog = useDialog()
const settings = useSettings()
const [index, setIndex] = createSignal(0)
const total = () => props.highlights.length
const last = () => Math.max(0, total() - 1)
const feature = () => props.highlights[index()] ?? props.highlights[last()]
const isFirst = () => index() === 0
const isLast = () => index() >= last()
const paged = () => total() > 1
function handleNext() {
if (isLast()) return
setIndex(index() + 1)
}
function handleClose() {
dialog.close()
}
function handleDisable() {
settings.general.setReleaseNotes(false)
handleClose()
}
let focusTrap: HTMLDivElement | undefined
function handleKeyDown(e: KeyboardEvent) {
if (e.key === "Escape") {
e.preventDefault()
handleClose()
return
}
if (!paged()) return
if (e.key === "ArrowLeft" && !isFirst()) {
e.preventDefault()
setIndex(index() - 1)
}
if (e.key === "ArrowRight" && !isLast()) {
e.preventDefault()
setIndex(index() + 1)
}
}
onMount(() => {
focusTrap?.focus()
document.addEventListener("keydown", handleKeyDown)
onCleanup(() => document.removeEventListener("keydown", handleKeyDown))
})
// Refocus the trap when index changes to ensure escape always works
createEffect(() => {
index() // track index
focusTrap?.focus()
})
return (
<Dialog
size="large"
fit
class="w-[min(calc(100vw-40px),720px)] h-[min(calc(100vh-40px),400px)] -mt-20 min-h-0 overflow-hidden"
>
{/* Hidden element to capture initial focus and handle escape */}
<div ref={focusTrap} tabindex="0" class="absolute opacity-0 pointer-events-none" />
<div class="flex flex-1 min-w-0 min-h-0">
{/* Left side - Text content */}
<div class="flex flex-col flex-1 min-w-0 p-8">
{/* Top section - feature content (fixed position from top) */}
<div class="flex flex-col gap-2 pt-22">
<div class="flex items-center gap-2">
<h1 class="text-16-medium text-text-strong">{feature()?.title ?? ""}</h1>
</div>
<p class="text-14-regular text-text-base">{feature()?.description ?? ""}</p>
</div>
{/* Spacer to push buttons to bottom */}
<div class="flex-1" />
{/* Bottom section - buttons and indicators (fixed position) */}
<div class="flex flex-col gap-12">
<div class="flex flex-col items-start gap-3">
{isLast() ? (
<Button variant="primary" size="large" onClick={handleClose}>
Get started
</Button>
) : (
<Button variant="secondary" size="large" onClick={handleNext}>
Next
</Button>
)}
<Button variant="ghost" size="small" onClick={handleDisable}>
Don't show these in the future
</Button>
</div>
{paged() && (
<div class="flex items-center gap-1.5 -my-2.5">
{props.highlights.map((_, i) => (
<button
type="button"
class="h-6 flex items-center cursor-pointer bg-transparent border-none p-0 transition-all duration-200"
classList={{
"w-8": i === index(),
"w-3": i !== index(),
}}
onClick={() => setIndex(i)}
>
<div
class="w-full h-0.5 rounded-[1px] transition-colors duration-200"
classList={{
"bg-icon-strong-base": i === index(),
"bg-icon-weak-base": i !== index(),
}}
/>
</button>
))}
</div>
)}
</div>
</div>
{/* Right side - Media content (edge to edge) */}
{feature()?.media && (
<div class="flex-1 min-w-0 bg-surface-base overflow-hidden rounded-r-xl">
{feature()!.media!.type === "image" ? (
<img
src={feature()!.media!.src}
alt={feature()!.media!.alt ?? feature()?.title ?? "Release preview"}
class="w-full h-full object-cover"
/>
) : (
<video src={feature()!.media!.src} autoplay loop muted playsinline class="w-full h-full object-cover" />
)}
</div>
)}
</div>
</Dialog>
)
}
@@ -24,16 +24,18 @@ type Entry = {
path?: string path?: string
} }
export function DialogSelectFile() { type DialogSelectFileMode = "all" | "files"
export function DialogSelectFile(props: { mode?: DialogSelectFileMode; onOpenFile?: (path: string) => void }) {
const command = useCommand() const command = useCommand()
const language = useLanguage() const language = useLanguage()
const layout = useLayout() const layout = useLayout()
const file = useFile() const file = useFile()
const dialog = useDialog() const dialog = useDialog()
const params = useParams() const params = useParams()
const filesOnly = () => props.mode === "files"
const sessionKey = createMemo(() => `${params.dir}${params.id ? "/" + params.id : ""}`) const sessionKey = createMemo(() => `${params.dir}${params.id ? "/" + params.id : ""}`)
const tabs = createMemo(() => layout.tabs(sessionKey)) const tabs = createMemo(() => layout.tabs(sessionKey))
const view = createMemo(() => layout.view(sessionKey))
const state = { cleanup: undefined as (() => void) | void, committed: false } const state = { cleanup: undefined as (() => void) | void, committed: false }
const [grouped, setGrouped] = createSignal(false) const [grouped, setGrouped] = createSignal(false)
const common = [ const common = [
@@ -46,11 +48,12 @@ export function DialogSelectFile() {
] ]
const limit = 5 const limit = 5
const allowed = createMemo(() => const allowed = createMemo(() => {
command.options.filter( if (filesOnly()) return []
return command.options.filter(
(option) => !option.disabled && !option.id.startsWith("suggested.") && option.id !== "file.open", (option) => !option.disabled && !option.id.startsWith("suggested.") && option.id !== "file.open",
),
) )
})
const commandItem = (option: CommandOption): Entry => ({ const commandItem = (option: CommandOption): Entry => ({
id: "command:" + option.id, id: "command:" + option.id,
@@ -99,10 +102,50 @@ export function DialogSelectFile() {
return items.slice(0, limit) return items.slice(0, limit)
}) })
const items = async (filter: string) => { const root = createMemo(() => {
const query = filter.trim() const nodes = file.tree.children("")
const paths = nodes
.filter((node) => node.type === "file")
.map((node) => node.path)
.sort((a, b) => a.localeCompare(b))
return paths.slice(0, limit).map(fileItem)
})
const unique = (items: Entry[]) => {
const seen = new Set<string>()
const out: Entry[] = []
for (const item of items) {
if (seen.has(item.id)) continue
seen.add(item.id)
out.push(item)
}
return out
}
const items = async (text: string) => {
const query = text.trim()
setGrouped(query.length > 0) setGrouped(query.length > 0)
if (!query && filesOnly()) {
const loaded = file.tree.state("")?.loaded
const pending = loaded ? Promise.resolve() : file.tree.list("")
const next = unique([...recent(), ...root()])
if (loaded || next.length > 0) {
void pending
return next
}
await pending
return unique([...recent(), ...root()])
}
if (!query) return [...picks(), ...recent()] if (!query) return [...picks(), ...recent()]
if (filesOnly()) {
const files = await file.searchFiles(query)
return files.map(fileItem)
}
const files = await file.searchFiles(query) const files = await file.searchFiles(query)
const entries = files.map(fileItem) const entries = files.map(fileItem)
return [...list(), ...entries] return [...list(), ...entries]
@@ -119,7 +162,9 @@ export function DialogSelectFile() {
const value = file.tab(path) const value = file.tab(path)
tabs().open(value) tabs().open(value)
file.load(path) file.load(path)
view().reviewPanel.open() layout.fileTree.open()
layout.fileTree.setTab("all")
props.onOpenFile?.(path)
} }
const handleSelect = (item: Entry | undefined) => { const handleSelect = (item: Entry | undefined) => {
@@ -143,13 +188,14 @@ export function DialogSelectFile() {
}) })
return ( return (
<Dialog class="pt-3 pb-0 !max-h-[480px]"> <Dialog class="pt-3 pb-0 !max-h-[480px]" transition>
<List <List
search={{ search={{
placeholder: language.t("palette.search.placeholder"), placeholder: filesOnly()
? language.t("session.header.searchFiles")
: language.t("palette.search.placeholder"),
autofocus: true, autofocus: true,
hideIcon: true, hideIcon: true,
class: "pl-3 pr-2 !mb-0",
}} }}
emptyMessage={language.t("palette.empty")} emptyMessage={language.t("palette.empty")}
loadingMessage={language.t("common.loading")} loadingMessage={language.t("common.loading")}
@@ -177,7 +223,7 @@ export function DialogSelectFile() {
</div> </div>
} }
> >
<div class="w-full flex items-center justify-between gap-4 pl-1"> <div class="w-full flex items-center justify-between gap-4">
<div class="flex items-center gap-2 min-w-0"> <div class="flex items-center gap-2 min-w-0">
<span class="text-14-regular text-text-strong whitespace-nowrap">{item.title}</span> <span class="text-14-regular text-text-strong whitespace-nowrap">{item.title}</span>
<Show when={item.description}> <Show when={item.description}>
@@ -54,6 +54,7 @@ const ModelList: Component<{
class="w-full" class="w-full"
placement="right-start" placement="right-start"
gutter={12} gutter={12}
forceMount={false}
value={ value={
<ModelTooltip <ModelTooltip
model={item} model={item}
@@ -110,6 +111,11 @@ export function ModelSelectorPopover<T extends ValidComponent = "div">(props: {
setStore("open", false) setStore("open", false)
dialog.show(() => <DialogManageModels />) dialog.show(() => <DialogManageModels />)
} }
const handleConnectProvider = () => {
setStore("open", false)
dialog.show(() => <DialogSelectProvider />)
}
const language = useLanguage() const language = useLanguage()
createEffect(() => { createEffect(() => {
@@ -181,7 +187,7 @@ export function ModelSelectorPopover<T extends ValidComponent = "div">(props: {
<Kobalte.Portal> <Kobalte.Portal>
<Kobalte.Content <Kobalte.Content
ref={(el) => setStore("content", el)} ref={(el) => setStore("content", el)}
class="w-72 h-80 flex flex-col rounded-md border border-border-base bg-surface-raised-stronger-non-alpha shadow-md z-50 outline-none overflow-hidden" class="w-72 h-80 flex flex-col p-2 rounded-md border border-border-base bg-surface-raised-stronger-non-alpha shadow-md z-50 outline-none overflow-hidden"
onEscapeKeyDown={(event) => { onEscapeKeyDown={(event) => {
setStore("dismiss", "escape") setStore("dismiss", "escape")
setStore("open", false) setStore("open", false)
@@ -207,15 +213,28 @@ export function ModelSelectorPopover<T extends ValidComponent = "div">(props: {
onSelect={() => setStore("open", false)} onSelect={() => setStore("open", false)}
class="p-1" class="p-1"
action={ action={
<div class="flex items-center gap-1">
<Tooltip placement="top" forceMount={false} value={language.t("command.provider.connect")}>
<IconButton
icon="plus-small"
variant="ghost"
iconSize="normal"
class="size-6"
aria-label={language.t("command.provider.connect")}
onClick={handleConnectProvider}
/>
</Tooltip>
<Tooltip placement="top" forceMount={false} value={language.t("dialog.model.manage")}>
<IconButton <IconButton
icon="sliders" icon="sliders"
variant="ghost" variant="ghost"
iconSize="normal" iconSize="normal"
class="size-6" class="size-6"
aria-label={language.t("dialog.model.manage")} aria-label={language.t("dialog.model.manage")}
title={language.t("dialog.model.manage")}
onClick={handleManage} onClick={handleManage}
/> />
</Tooltip>
</div>
} }
/> />
</Kobalte.Content> </Kobalte.Content>
@@ -5,9 +5,17 @@ import { Dialog } from "@opencode-ai/ui/dialog"
import { List } from "@opencode-ai/ui/list" import { List } from "@opencode-ai/ui/list"
import { Tag } from "@opencode-ai/ui/tag" import { Tag } from "@opencode-ai/ui/tag"
import { ProviderIcon } from "@opencode-ai/ui/provider-icon" import { ProviderIcon } from "@opencode-ai/ui/provider-icon"
import { IconName } from "@opencode-ai/ui/icons/provider" import { iconNames, type IconName } from "@opencode-ai/ui/icons/provider"
import { DialogConnectProvider } from "./dialog-connect-provider" import { DialogConnectProvider } from "./dialog-connect-provider"
import { useLanguage } from "@/context/language" import { useLanguage } from "@/context/language"
import { DialogCustomProvider } from "./dialog-custom-provider"
const CUSTOM_ID = "_custom"
function icon(id: string): IconName {
if (iconNames.includes(id as IconName)) return id as IconName
return "synthetic"
}
export const DialogSelectProvider: Component = () => { export const DialogSelectProvider: Component = () => {
const dialog = useDialog() const dialog = useDialog()
@@ -18,7 +26,7 @@ export const DialogSelectProvider: Component = () => {
const otherGroup = () => language.t("dialog.provider.group.other") const otherGroup = () => language.t("dialog.provider.group.other")
return ( return (
<Dialog title={language.t("command.provider.connect")}> <Dialog title={language.t("command.provider.connect")} transition>
<List <List
search={{ placeholder: language.t("dialog.provider.search.placeholder"), autofocus: true }} search={{ placeholder: language.t("dialog.provider.search.placeholder"), autofocus: true }}
emptyMessage={language.t("dialog.provider.empty")} emptyMessage={language.t("dialog.provider.empty")}
@@ -26,11 +34,13 @@ export const DialogSelectProvider: Component = () => {
key={(x) => x?.id} key={(x) => x?.id}
items={() => { items={() => {
language.locale() language.locale()
return providers.all() return [{ id: CUSTOM_ID, name: "Custom provider" }, ...providers.all()]
}} }}
filterKeys={["id", "name"]} filterKeys={["id", "name"]}
groupBy={(x) => (popularProviders.includes(x.id) ? popularGroup() : otherGroup())} groupBy={(x) => (popularProviders.includes(x.id) ? popularGroup() : otherGroup())}
sortBy={(a, b) => { sortBy={(a, b) => {
if (a.id === CUSTOM_ID) return -1
if (b.id === CUSTOM_ID) return 1
if (popularProviders.includes(a.id) && popularProviders.includes(b.id)) if (popularProviders.includes(a.id) && popularProviders.includes(b.id))
return popularProviders.indexOf(a.id) - popularProviders.indexOf(b.id) return popularProviders.indexOf(a.id) - popularProviders.indexOf(b.id)
return a.name.localeCompare(b.name) return a.name.localeCompare(b.name)
@@ -43,13 +53,20 @@ export const DialogSelectProvider: Component = () => {
}} }}
onSelect={(x) => { onSelect={(x) => {
if (!x) return if (!x) return
if (x.id === CUSTOM_ID) {
dialog.show(() => <DialogCustomProvider back="providers" />)
return
}
dialog.show(() => <DialogConnectProvider provider={x.id} />) dialog.show(() => <DialogConnectProvider provider={x.id} />)
}} }}
> >
{(i) => ( {(i) => (
<div class="px-1.25 w-full flex items-center gap-x-3"> <div class="px-1.25 w-full flex items-center gap-x-3">
<ProviderIcon data-slot="list-item-extra-icon" id={i.id as IconName} /> <ProviderIcon data-slot="list-item-extra-icon" id={icon(i.id)} />
<span>{i.name}</span> <span>{i.name}</span>
<Show when={i.id === CUSTOM_ID}>
<Tag>{language.t("settings.providers.tag.custom")}</Tag>
</Show>
<Show when={i.id === "opencode"}> <Show when={i.id === "opencode"}>
<Tag>{language.t("dialog.provider.tag.recommended")}</Tag> <Tag>{language.t("dialog.provider.tag.recommended")}</Tag>
</Show> </Show>
@@ -14,6 +14,7 @@ import { useLanguage } from "@/context/language"
import { DropdownMenu } from "@opencode-ai/ui/dropdown-menu" import { DropdownMenu } from "@opencode-ai/ui/dropdown-menu"
import { Tooltip } from "@opencode-ai/ui/tooltip" import { Tooltip } from "@opencode-ai/ui/tooltip"
import { useGlobalSDK } from "@/context/global-sdk" import { useGlobalSDK } from "@/context/global-sdk"
import { showToast } from "@opencode-ai/ui/toast"
type ServerStatus = { healthy: boolean; version?: string } type ServerStatus = { healthy: boolean; version?: string }
@@ -40,10 +41,11 @@ interface EditRowProps {
} }
async function checkHealth(url: string, platform: ReturnType<typeof usePlatform>): Promise<ServerStatus> { async function checkHealth(url: string, platform: ReturnType<typeof usePlatform>): Promise<ServerStatus> {
const signal = (AbortSignal as unknown as { timeout?: (ms: number) => AbortSignal }).timeout?.(3000)
const sdk = createOpencodeClient({ const sdk = createOpencodeClient({
baseUrl: url, baseUrl: url,
fetch: platform.fetch, fetch: platform.fetch,
signal: AbortSignal.timeout(3000), signal,
}) })
return sdk.global return sdk.global
.health() .health()
@@ -57,18 +59,16 @@ function AddRow(props: AddRowProps) {
<div class="flex-1 min-w-0 [&_[data-slot=input-wrapper]]:relative"> <div class="flex-1 min-w-0 [&_[data-slot=input-wrapper]]:relative">
<div <div
classList={{ classList={{
"size-1.5 rounded-full absolute left-3 z-10 pointer-events-none": true, "size-1.5 rounded-full absolute left-3 top-1/2 -translate-y-1/2 z-10 pointer-events-none": true,
"bg-icon-success-base": props.status === true, "bg-icon-success-base": props.status === true,
"bg-icon-critical-base": props.status === false, "bg-icon-critical-base": props.status === false,
"bg-border-weak-base": props.status === undefined, "bg-border-weak-base": props.status === undefined,
}} }}
style={{ top: "50%", transform: "translateY(-50%)" }}
ref={(el) => { ref={(el) => {
// Position relative to input-wrapper // Position relative to input-wrapper
requestAnimationFrame(() => { requestAnimationFrame(() => {
const wrapper = el.parentElement?.querySelector('[data-slot="input-wrapper"]') const wrapper = el.parentElement?.querySelector('[data-slot="input-wrapper"]')
if (wrapper instanceof HTMLElement) { if (wrapper instanceof HTMLElement) {
wrapper.style.position = "relative"
wrapper.appendChild(el) wrapper.appendChild(el)
} }
}) })
@@ -149,9 +149,18 @@ export function DialogSelectServer() {
}) })
const [defaultUrl, defaultUrlActions] = createResource( const [defaultUrl, defaultUrlActions] = createResource(
async () => { async () => {
try {
const url = await platform.getDefaultServerUrl?.() const url = await platform.getDefaultServerUrl?.()
if (!url) return null if (!url) return null
return normalizeServerUrl(url) ?? null return normalizeServerUrl(url) ?? null
} catch (err) {
showToast({
variant: "error",
title: language.t("common.requestFailed"),
description: err instanceof Error ? err.message : String(err),
})
return null
}
}, },
{ initialValue: null }, { initialValue: null },
) )
@@ -508,8 +517,16 @@ export function DialogSelectServer() {
<Show when={canDefault() && defaultUrl() !== i}> <Show when={canDefault() && defaultUrl() !== i}>
<DropdownMenu.Item <DropdownMenu.Item
onSelect={async () => { onSelect={async () => {
try {
await platform.setDefaultServerUrl?.(i) await platform.setDefaultServerUrl?.(i)
defaultUrlActions.mutate(i) defaultUrlActions.mutate(i)
} catch (err) {
showToast({
variant: "error",
title: language.t("common.requestFailed"),
description: err instanceof Error ? err.message : String(err),
})
}
}} }}
> >
<DropdownMenu.ItemLabel> <DropdownMenu.ItemLabel>
@@ -520,8 +537,16 @@ export function DialogSelectServer() {
<Show when={canDefault() && defaultUrl() === i}> <Show when={canDefault() && defaultUrl() === i}>
<DropdownMenu.Item <DropdownMenu.Item
onSelect={async () => { onSelect={async () => {
try {
await platform.setDefaultServerUrl?.(null) await platform.setDefaultServerUrl?.(null)
defaultUrlActions.mutate(null) defaultUrlActions.mutate(null)
} catch (err) {
showToast({
variant: "error",
title: language.t("common.requestFailed"),
description: err instanceof Error ? err.message : String(err),
})
}
}} }}
> >
<DropdownMenu.ItemLabel> <DropdownMenu.ItemLabel>
@@ -14,7 +14,7 @@ export const DialogSettings: Component = () => {
const platform = usePlatform() const platform = usePlatform()
return ( return (
<Dialog size="x-large"> <Dialog size="x-large" transition>
<Tabs orientation="vertical" variant="settings" defaultValue="general" class="h-full settings-dialog"> <Tabs orientation="vertical" variant="settings" defaultValue="general" class="h-full settings-dialog">
<Tabs.List> <Tabs.List>
<div class="flex flex-col justify-between h-full w-full"> <div class="flex flex-col justify-between h-full w-full">
@@ -38,11 +38,11 @@ export const DialogSettings: Component = () => {
<Tabs.SectionTitle>{language.t("settings.section.server")}</Tabs.SectionTitle> <Tabs.SectionTitle>{language.t("settings.section.server")}</Tabs.SectionTitle>
<div class="flex flex-col gap-1.5 w-full"> <div class="flex flex-col gap-1.5 w-full">
<Tabs.Trigger value="providers"> <Tabs.Trigger value="providers">
<Icon name="server" /> <Icon name="providers" />
{language.t("settings.providers.title")} {language.t("settings.providers.title")}
</Tabs.Trigger> </Tabs.Trigger>
<Tabs.Trigger value="models"> <Tabs.Trigger value="models">
<Icon name="server" /> <Icon name="models" />
{language.t("settings.models.title")} {language.t("settings.models.title")}
</Tabs.Trigger> </Tabs.Trigger>
</div> </div>
@@ -50,7 +50,7 @@ export const DialogSettings: Component = () => {
</div> </div>
</div> </div>
<div class="flex flex-col gap-1 pl-1 py-1 text-12-medium text-text-weak"> <div class="flex flex-col gap-1 pl-1 py-1 text-12-medium text-text-weak">
<span>OpenCode Desktop</span> <span>{language.t("app.name.desktop")}</span>
<span class="text-11-regular">v{platform.version}</span> <span class="text-11-regular">v{platform.version}</span>
</div> </div>
</div> </div>
+182 -16
View File
@@ -1,12 +1,14 @@
import { useFile } from "@/context/file" import { useFile } from "@/context/file"
import { Collapsible } from "@opencode-ai/ui/collapsible" import { Collapsible } from "@opencode-ai/ui/collapsible"
import { FileIcon } from "@opencode-ai/ui/file-icon" import { FileIcon } from "@opencode-ai/ui/file-icon"
import { Icon } from "@opencode-ai/ui/icon"
import { Tooltip } from "@opencode-ai/ui/tooltip" import { Tooltip } from "@opencode-ai/ui/tooltip"
import { import {
createEffect, createEffect,
createMemo, createMemo,
For, For,
Match, Match,
Show,
splitProps, splitProps,
Switch, Switch,
untrack, untrack,
@@ -16,16 +18,30 @@ import {
import { Dynamic } from "solid-js/web" import { Dynamic } from "solid-js/web"
import type { FileNode } from "@opencode-ai/sdk/v2" import type { FileNode } from "@opencode-ai/sdk/v2"
type Kind = "add" | "del" | "mix"
type Filter = {
files: Set<string>
dirs: Set<string>
}
export default function FileTree(props: { export default function FileTree(props: {
path: string path: string
class?: string class?: string
nodeClass?: string nodeClass?: string
active?: string
level?: number level?: number
allowed?: readonly string[] allowed?: readonly string[]
modified?: readonly string[] modified?: readonly string[]
kinds?: ReadonlyMap<string, Kind>
draggable?: boolean draggable?: boolean
tooltip?: boolean tooltip?: boolean
onFileClick?: (file: FileNode) => void onFileClick?: (file: FileNode) => void
_filter?: Filter
_marks?: Set<string>
_deeps?: Map<string, number>
_kinds?: ReadonlyMap<string, Kind>
}) { }) {
const file = useFile() const file = useFile()
const level = props.level ?? 0 const level = props.level ?? 0
@@ -33,6 +49,8 @@ export default function FileTree(props: {
const tooltip = () => props.tooltip ?? true const tooltip = () => props.tooltip ?? true
const filter = createMemo(() => { const filter = createMemo(() => {
if (props._filter) return props._filter
const allowed = props.allowed const allowed = props.allowed
if (!allowed) return if (!allowed) return
@@ -52,9 +70,43 @@ export default function FileTree(props: {
}) })
const marks = createMemo(() => { const marks = createMemo(() => {
const modified = props.modified if (props._marks) return props._marks
if (!modified || modified.length === 0) return
return new Set(modified) const out = new Set<string>()
for (const item of props.modified ?? []) out.add(item)
for (const item of props.kinds?.keys() ?? []) out.add(item)
if (out.size === 0) return
return out
})
const kinds = createMemo(() => {
if (props._kinds) return props._kinds
return props.kinds
})
const deeps = createMemo(() => {
if (props._deeps) return props._deeps
const out = new Map<string, number>()
const visit = (dir: string, lvl: number): number => {
const expanded = file.tree.state(dir)?.expanded ?? false
if (!expanded) return -1
const nodes = file.tree.children(dir)
const max = nodes.reduce((max, node) => {
if (node.type !== "directory") return max
const open = file.tree.state(node.path)?.expanded ?? false
if (!open) return max
return Math.max(max, visit(node.path, lvl + 1))
}, lvl)
out.set(dir, max)
return max
}
visit(props.path, level - 1)
return out
}) })
createEffect(() => { createEffect(() => {
@@ -70,7 +122,8 @@ export default function FileTree(props: {
}) })
createEffect(() => { createEffect(() => {
void file.tree.list(props.path) const path = props.path
untrack(() => void file.tree.list(path))
}) })
const nodes = createMemo(() => { const nodes = createMemo(() => {
@@ -96,12 +149,13 @@ export default function FileTree(props: {
<Dynamic <Dynamic
component={local.as ?? "div"} component={local.as ?? "div"}
classList={{ classList={{
"w-full min-w-0 flex items-center justify-start gap-x-2 rounded-md px-2 py-1 text-left hover:bg-surface-raised-base-hover active:bg-surface-base-active transition-colors cursor-pointer": true, "w-full min-w-0 h-6 flex items-center justify-start gap-x-1.5 rounded-md px-1.5 py-0 text-left hover:bg-surface-raised-base-hover active:bg-surface-base-active transition-colors cursor-pointer": true,
"bg-surface-base-active": local.node.path === props.active,
...(local.classList ?? {}), ...(local.classList ?? {}),
[local.class ?? ""]: !!local.class, [local.class ?? ""]: !!local.class,
[props.nodeClass ?? ""]: !!props.nodeClass, [props.nodeClass ?? ""]: !!props.nodeClass,
}} }}
style={`padding-left: ${8 + level * 12}px`} style={`padding-left: ${Math.max(0, 8 + level * 12 - (local.node.type === "file" ? 24 : 4))}px`}
draggable={draggable()} draggable={draggable()}
onDragStart={(e: DragEvent) => { onDragStart={(e: DragEvent) => {
if (!draggable()) return if (!draggable()) return
@@ -130,31 +184,127 @@ export default function FileTree(props: {
{...rest} {...rest}
> >
{local.children} {local.children}
{(() => {
const kind = kinds()?.get(local.node.path)
const marked = marks()?.has(local.node.path) ?? false
const active = !!kind && marked && !local.node.ignored
const color =
kind === "add"
? "color: var(--icon-diff-add-base)"
: kind === "del"
? "color: var(--icon-diff-delete-base)"
: kind === "mix"
? "color: var(--icon-diff-modified-base)"
: undefined
return (
<span <span
classList={{ classList={{
"flex-1 min-w-0 text-12-regular whitespace-nowrap truncate": true, "flex-1 min-w-0 text-12-medium whitespace-nowrap truncate": true,
"text-text-weaker": local.node.ignored, "text-text-weaker": local.node.ignored,
"text-text-weak": !local.node.ignored, "text-text-weak": !local.node.ignored && !active,
}} }}
style={active ? color : undefined}
> >
{local.node.name} {local.node.name}
</span> </span>
{local.node.type === "file" && marks()?.has(local.node.path) ? ( )
<div class="shrink-0 size-1.5 rounded-full bg-surface-warning-strong" /> })()}
) : null} {(() => {
const kind = kinds()?.get(local.node.path)
if (!kind) return null
if (!marks()?.has(local.node.path)) return null
if (local.node.type === "file") {
const text = kind === "add" ? "A" : kind === "del" ? "D" : "M"
const color =
kind === "add"
? "color: var(--icon-diff-add-base)"
: kind === "del"
? "color: var(--icon-diff-delete-base)"
: "color: var(--icon-diff-modified-base)"
return (
<span class="shrink-0 w-4 text-center text-12-medium" style={color}>
{text}
</span>
)
}
if (local.node.type === "directory") {
const color =
kind === "add"
? "background-color: var(--icon-diff-add-base)"
: kind === "del"
? "background-color: var(--icon-diff-delete-base)"
: "background-color: var(--icon-diff-modified-base)"
return <div class="shrink-0 size-1.5 mr-1.5 rounded-full" style={color} />
}
return null
})()}
</Dynamic> </Dynamic>
) )
} }
return ( return (
<div class={`flex flex-col ${props.class ?? ""}`}> <div class={`flex flex-col gap-0.5 ${props.class ?? ""}`}>
<For each={nodes()}> <For each={nodes()}>
{(node) => { {(node) => {
const expanded = () => file.tree.state(node.path)?.expanded ?? false const expanded = () => file.tree.state(node.path)?.expanded ?? false
const deep = () => deeps().get(node.path) ?? -1
const Wrapper = (p: ParentProps) => { const Wrapper = (p: ParentProps) => {
if (!tooltip()) return p.children if (!tooltip()) return p.children
const parts = node.path.split("/")
const leaf = parts[parts.length - 1] ?? node.path
const head = parts.slice(0, -1).join("/")
const prefix = head ? `${head}/` : ""
const kind = () => kinds()?.get(node.path)
const label = () => {
const k = kind()
if (!k) return
if (k === "add") return "Additions"
if (k === "del") return "Deletions"
return "Modifications"
}
const ignored = () => node.type === "directory" && node.ignored
return ( return (
<Tooltip forceMount={false} openDelay={2000} value={node.path} placement="right" class="w-full"> <Tooltip
forceMount={false}
openDelay={2000}
placement="bottom-start"
class="w-full"
contentStyle={{ "max-width": "480px", width: "fit-content" }}
value={
<div class="flex items-center min-w-0 whitespace-nowrap text-12-regular">
<span
class="min-w-0 truncate text-text-invert-base"
style={{ direction: "rtl", "unicode-bidi": "plaintext" }}
>
{prefix}
</span>
<span class="shrink-0 text-text-invert-strong">{leaf}</span>
<Show when={label()}>
{(t: () => string) => (
<>
<span class="mx-1 font-bold text-text-invert-strong"></span>
<span class="shrink-0 text-text-invert-strong">{t()}</span>
</>
)}
</Show>
<Show when={ignored()}>
<>
<span class="mx-1 font-bold text-text-invert-strong"></span>
<span class="shrink-0 text-text-invert-strong">Ignored</span>
</>
</Show>
</div>
}
>
{p.children} {p.children}
</Tooltip> </Tooltip>
) )
@@ -166,6 +316,7 @@ export default function FileTree(props: {
<Collapsible <Collapsible
variant="ghost" variant="ghost"
class="w-full" class="w-full"
data-scope="filetree"
forceMount={false} forceMount={false}
open={expanded()} open={expanded()}
onOpenChange={(open) => (open ? file.tree.expand(node.path) : file.tree.collapse(node.path))} onOpenChange={(open) => (open ? file.tree.expand(node.path) : file.tree.collapse(node.path))}
@@ -173,20 +324,35 @@ export default function FileTree(props: {
<Collapsible.Trigger> <Collapsible.Trigger>
<Wrapper> <Wrapper>
<Node node={node}> <Node node={node}>
<Collapsible.Arrow class="text-icon-weak ml-1" /> <div class="size-4 flex items-center justify-center text-icon-weak">
<FileIcon node={node} expanded={expanded()} class="text-icon-weak -ml-1 size-4" /> <Icon name={expanded() ? "chevron-down" : "chevron-right"} size="small" />
</div>
</Node> </Node>
</Wrapper> </Wrapper>
</Collapsible.Trigger> </Collapsible.Trigger>
<Collapsible.Content> <Collapsible.Content class="relative pt-0.5">
<div
classList={{
"absolute top-0 bottom-0 w-px pointer-events-none bg-border-weak-base opacity-0 transition-opacity duration-150 ease-out motion-reduce:transition-none": true,
"group-hover/filetree:opacity-100": expanded() && deep() === level,
"group-hover/filetree:opacity-50": !(expanded() && deep() === level),
}}
style={`left: ${Math.max(0, 8 + level * 12 - 4) + 8}px`}
/>
<FileTree <FileTree
path={node.path} path={node.path}
level={level + 1} level={level + 1}
allowed={props.allowed} allowed={props.allowed}
modified={props.modified} modified={props.modified}
kinds={props.kinds}
active={props.active}
draggable={props.draggable} draggable={props.draggable}
tooltip={props.tooltip} tooltip={props.tooltip}
onFileClick={props.onFileClick} onFileClick={props.onFileClick}
_filter={filter()}
_marks={marks()}
_deeps={deeps()}
_kinds={kinds()}
/> />
</Collapsible.Content> </Collapsible.Content>
</Collapsible> </Collapsible>
+24 -28
View File
@@ -171,7 +171,6 @@ export const PromptInput: Component<PromptInputProps> = (props) => {
const sessionKey = createMemo(() => `${params.dir}${params.id ? "/" + params.id : ""}`) const sessionKey = createMemo(() => `${params.dir}${params.id ? "/" + params.id : ""}`)
const tabs = createMemo(() => layout.tabs(sessionKey)) const tabs = createMemo(() => layout.tabs(sessionKey))
const view = createMemo(() => layout.view(sessionKey))
const commentInReview = (path: string) => { const commentInReview = (path: string) => {
const sessionID = params.id const sessionID = params.id
@@ -187,20 +186,17 @@ export const PromptInput: Component<PromptInputProps> = (props) => {
const focus = { file: item.path, id: item.commentID } const focus = { file: item.path, id: item.commentID }
comments.setActive(focus) comments.setActive(focus)
view().reviewPanel.open()
if (item.commentOrigin === "review") { const wantsReview = item.commentOrigin === "review" || (item.commentOrigin !== "file" && commentInReview(item.path))
tabs().open("review") if (wantsReview) {
requestAnimationFrame(() => comments.setFocus(focus)) layout.fileTree.open()
return layout.fileTree.setTab("changes")
}
if (item.commentOrigin !== "file" && commentInReview(item.path)) {
tabs().open("review")
requestAnimationFrame(() => comments.setFocus(focus)) requestAnimationFrame(() => comments.setFocus(focus))
return return
} }
layout.fileTree.open()
layout.fileTree.setTab("all")
const tab = files.tab(item.path) const tab = files.tab(item.path)
tabs().open(tab) tabs().open(tab)
files.load(item.path) files.load(item.path)
@@ -1042,13 +1038,17 @@ export const PromptInput: Component<PromptInputProps> = (props) => {
return return
} }
const ctrl = event.ctrlKey && !event.metaKey && !event.altKey && !event.shiftKey
if (store.popover) { if (store.popover) {
if (event.key === "Tab") { if (event.key === "Tab") {
selectPopoverActive() selectPopoverActive()
event.preventDefault() event.preventDefault()
return return
} }
if (event.key === "ArrowUp" || event.key === "ArrowDown" || event.key === "Enter") { const nav = event.key === "ArrowUp" || event.key === "ArrowDown" || event.key === "Enter"
const ctrlNav = ctrl && (event.key === "n" || event.key === "p")
if (nav || ctrlNav) {
if (store.popover === "at") { if (store.popover === "at") {
atOnKeyDown(event) atOnKeyDown(event)
event.preventDefault() event.preventDefault()
@@ -1062,8 +1062,6 @@ export const PromptInput: Component<PromptInputProps> = (props) => {
} }
} }
const ctrl = event.ctrlKey && !event.metaKey && !event.altKey && !event.shiftKey
if (ctrl && event.code === "KeyG") { if (ctrl && event.code === "KeyG") {
if (store.popover) { if (store.popover) {
setStore("popover", null) setStore("popover", null)
@@ -1563,13 +1561,17 @@ export const PromptInput: Component<PromptInputProps> = (props) => {
}) })
const timeoutMs = 5 * 60 * 1000 const timeoutMs = 5 * 60 * 1000
const timer = { id: undefined as number | undefined }
const timeout = new Promise<Awaited<ReturnType<typeof WorktreeState.wait>>>((resolve) => { const timeout = new Promise<Awaited<ReturnType<typeof WorktreeState.wait>>>((resolve) => {
setTimeout(() => { timer.id = window.setTimeout(() => {
resolve({ status: "failed", message: "Workspace is still preparing" }) resolve({ status: "failed", message: language.t("workspace.error.stillPreparing") })
}, timeoutMs) }, timeoutMs)
}) })
const result = await Promise.race([WorktreeState.wait(sessionDirectory), abort, timeout]) const result = await Promise.race([WorktreeState.wait(sessionDirectory), abort, timeout]).finally(() => {
if (timer.id === undefined) return
clearTimeout(timer.id)
})
pending.delete(session.id) pending.delete(session.id)
if (controller.signal.aborted) return false if (controller.signal.aborted) return false
if (result.status === "failed") throw new Error(result.message) if (result.status === "failed") throw new Error(result.message)
@@ -1746,10 +1748,7 @@ export const PromptInput: Component<PromptInputProps> = (props) => {
<Tooltip <Tooltip
value={ value={
<span class="flex max-w-[300px]"> <span class="flex max-w-[300px]">
<span <span class="text-text-invert-base truncate-start [unicode-bidi:plaintext] min-w-0">
class="text-text-invert-base truncate min-w-0"
style={{ direction: "rtl", "text-align": "left", "unicode-bidi": "plaintext" }}
>
{getDirectory(item.path)} {getDirectory(item.path)}
</span> </span>
<span class="shrink-0">{getFilename(item.path)}</span> <span class="shrink-0">{getFilename(item.path)}</span>
@@ -1772,10 +1771,7 @@ export const PromptInput: Component<PromptInputProps> = (props) => {
> >
<div class="flex items-center gap-1.5"> <div class="flex items-center gap-1.5">
<FileIcon node={{ path: item.path, type: "file" }} class="shrink-0 size-3.5" /> <FileIcon node={{ path: item.path, type: "file" }} class="shrink-0 size-3.5" />
<div <div class="flex items-center text-11-regular min-w-0 font-medium">
class="flex items-center text-11-regular min-w-0"
style={{ "font-weight": "var(--font-weight-medium)" }}
>
<span class="text-text-strong whitespace-nowrap">{getFilenameTruncated(item.path, 14)}</span> <span class="text-text-strong whitespace-nowrap">{getFilenameTruncated(item.path, 14)}</span>
<Show when={item.selection}> <Show when={item.selection}>
{(sel) => ( {(sel) => (
@@ -1863,9 +1859,9 @@ export const PromptInput: Component<PromptInputProps> = (props) => {
store.mode === "shell" store.mode === "shell"
? language.t("prompt.placeholder.shell") ? language.t("prompt.placeholder.shell")
: commentCount() > 1 : commentCount() > 1
? "Summarize comments" ? language.t("prompt.placeholder.summarizeComments")
: commentCount() === 1 : commentCount() === 1
? "Summarize comment" ? language.t("prompt.placeholder.summarizeComment")
: language.t("prompt.placeholder.normal", { example: language.t(EXAMPLES[store.placeholder]) }) : language.t("prompt.placeholder.normal", { example: language.t(EXAMPLES[store.placeholder]) })
} }
contenteditable="true" contenteditable="true"
@@ -1887,9 +1883,9 @@ export const PromptInput: Component<PromptInputProps> = (props) => {
{store.mode === "shell" {store.mode === "shell"
? language.t("prompt.placeholder.shell") ? language.t("prompt.placeholder.shell")
: commentCount() > 1 : commentCount() > 1
? "Summarize comments" ? language.t("prompt.placeholder.summarizeComments")
: commentCount() === 1 : commentCount() === 1
? "Summarize comment" ? language.t("prompt.placeholder.summarizeComment")
: language.t("prompt.placeholder.normal", { example: language.t(EXAMPLES[store.placeholder]) })} : language.t("prompt.placeholder.normal", { example: language.t(EXAMPLES[store.placeholder]) })}
</div> </div>
</Show> </Show>
@@ -23,7 +23,6 @@ export function SessionContextUsage(props: SessionContextUsageProps) {
const variant = createMemo(() => props.variant ?? "button") const variant = createMemo(() => props.variant ?? "button")
const sessionKey = createMemo(() => `${params.dir}${params.id ? "/" + params.id : ""}`) const sessionKey = createMemo(() => `${params.dir}${params.id ? "/" + params.id : ""}`)
const tabs = createMemo(() => layout.tabs(sessionKey)) const tabs = createMemo(() => layout.tabs(sessionKey))
const view = createMemo(() => layout.view(sessionKey))
const messages = createMemo(() => (params.id ? (sync.data.message[params.id] ?? []) : [])) const messages = createMemo(() => (params.id ? (sync.data.message[params.id] ?? []) : []))
const usd = createMemo( const usd = createMemo(
@@ -58,7 +57,8 @@ export function SessionContextUsage(props: SessionContextUsageProps) {
const openContext = () => { const openContext = () => {
if (!params.id) return if (!params.id) return
view().reviewPanel.open() layout.fileTree.open()
layout.fileTree.setTab("all")
tabs().open("context") tabs().open("context")
tabs().setActive("context") tabs().setActive("context")
} }
@@ -9,7 +9,7 @@ import { usePlatform } from "@/context/platform"
import { useSync } from "@/context/sync" import { useSync } from "@/context/sync"
import { useGlobalSDK } from "@/context/global-sdk" import { useGlobalSDK } from "@/context/global-sdk"
import { getFilename } from "@opencode-ai/util/path" import { getFilename } from "@opencode-ai/util/path"
import { base64Decode } from "@opencode-ai/util/encode" import { decode64 } from "@/utils/base64"
import { Icon } from "@opencode-ai/ui/icon" import { Icon } from "@opencode-ai/ui/icon"
import { IconButton } from "@opencode-ai/ui/icon-button" import { IconButton } from "@opencode-ai/ui/icon-button"
@@ -29,7 +29,7 @@ export function SessionHeader() {
const platform = usePlatform() const platform = usePlatform()
const language = useLanguage() const language = useLanguage()
const projectDirectory = createMemo(() => base64Decode(params.dir ?? "")) const projectDirectory = createMemo(() => decode64(params.dir) ?? "")
const project = createMemo(() => { const project = createMemo(() => {
const directory = projectDirectory() const directory = projectDirectory()
if (!directory) return if (!directory) return
@@ -45,7 +45,6 @@ export function SessionHeader() {
const currentSession = createMemo(() => sync.data.session.find((s) => s.id === params.id)) const currentSession = createMemo(() => sync.data.session.find((s) => s.id === params.id))
const shareEnabled = createMemo(() => sync.data.config.share !== "disabled") const shareEnabled = createMemo(() => sync.data.config.share !== "disabled")
const showShare = createMemo(() => shareEnabled() && !!currentSession()) const showShare = createMemo(() => shareEnabled() && !!currentSession())
const showReview = createMemo(() => !!currentSession())
const sessionKey = createMemo(() => `${params.dir}${params.id ? "/" + params.id : ""}`) const sessionKey = createMemo(() => `${params.dir}${params.id ? "/" + params.id : ""}`)
const view = createMemo(() => layout.view(sessionKey)) const view = createMemo(() => layout.view(sessionKey))
@@ -280,58 +279,31 @@ export function SessionHeader() {
</Button> </Button>
</TooltipKeybind> </TooltipKeybind>
</div> </div>
<div class="hidden md:block shrink-0">
<Tooltip value="Toggle file tree" placement="bottom">
<Button
variant="ghost"
class="group/file-tree-toggle size-5 p-0"
onClick={() => {
const opening = !layout.fileTree.opened()
if (opening && !view().reviewPanel.opened()) view().reviewPanel.open()
layout.fileTree.toggle()
}}
aria-label="Toggle file tree"
aria-expanded={layout.fileTree.opened()}
>
<div class="relative flex items-center justify-center size-4">
<Icon
size="small"
name="bullet-list"
classList={{
"text-icon-strong": layout.fileTree.opened(),
"text-icon-weak": !layout.fileTree.opened(),
}}
/>
</div>
</Button>
</Tooltip>
</div>
<div class="hidden md:block shrink-0"> <div class="hidden md:block shrink-0">
<TooltipKeybind title={language.t("command.review.toggle")} keybind={command.keybind("review.toggle")}> <TooltipKeybind title={language.t("command.review.toggle")} keybind={command.keybind("review.toggle")}>
<Button <Button
variant="ghost" variant="ghost"
class="group/review-toggle size-6 p-0" class="group/file-tree-toggle size-6 p-0"
onClick={() => view().reviewPanel.toggle()} onClick={() => layout.fileTree.toggle()}
aria-label={language.t("command.review.toggle")} aria-label={language.t("command.review.toggle")}
aria-expanded={view().reviewPanel.opened()} aria-expanded={layout.fileTree.opened()}
aria-controls="review-panel" aria-controls="review-panel"
tabIndex={showReview() ? 0 : -1}
> >
<div class="relative flex items-center justify-center size-4 [&>*]:absolute [&>*]:inset-0"> <div class="relative flex items-center justify-center size-4 [&>*]:absolute [&>*]:inset-0">
<Icon <Icon
size="small" size="small"
name={view().reviewPanel.opened() ? "layout-right-full" : "layout-right"} name={layout.fileTree.opened() ? "layout-right-full" : "layout-right"}
class="group-hover/review-toggle:hidden" class="group-hover/file-tree-toggle:hidden"
/> />
<Icon <Icon
size="small" size="small"
name="layout-right-partial" name="layout-right-partial"
class="hidden group-hover/review-toggle:inline-block" class="hidden group-hover/file-tree-toggle:inline-block"
/> />
<Icon <Icon
size="small" size="small"
name={view().reviewPanel.opened() ? "layout-right" : "layout-right-full"} name={layout.fileTree.opened() ? "layout-right" : "layout-right-full"}
class="hidden group-active/review-toggle:inline-block" class="hidden group-active/file-tree-toggle:inline-block"
/> />
</div> </div>
</Button> </Button>
@@ -45,10 +45,7 @@ export function NewSessionView(props: NewSessionViewProps) {
} }
return ( return (
<div <div class="size-full flex flex-col justify-end items-start gap-4 flex-[1_0_0] self-stretch max-w-200 mx-auto px-6 pb-[calc(var(--prompt-height,11.25rem)+64px)]">
class="size-full flex flex-col pb-45 justify-end items-start gap-4 flex-[1_0_0] self-stretch max-w-200 mx-auto px-6"
style={{ "padding-bottom": "calc(var(--prompt-height, 11.25rem) + 64px)" }}
>
<div class="text-20-medium text-text-weaker">{language.t("command.session.new")}</div> <div class="text-20-medium text-text-weaker">{language.t("command.session.new")}</div>
<div class="flex justify-center items-center gap-3"> <div class="flex justify-center items-center gap-3">
<Icon name="folder" size="small" /> <Icon name="folder" size="small" />
@@ -11,7 +11,7 @@ import { useLanguage } from "@/context/language"
export function FileVisual(props: { path: string; active?: boolean }): JSX.Element { export function FileVisual(props: { path: string; active?: boolean }): JSX.Element {
return ( return (
<div class="flex items-center gap-x-1.5"> <div class="flex items-center gap-x-1.5 min-w-0">
<FileIcon <FileIcon
node={{ path: props.path, type: "file" }} node={{ path: props.path, type: "file" }}
classList={{ classList={{
@@ -19,7 +19,7 @@ export function FileVisual(props: { path: string; active?: boolean }): JSX.Eleme
"grayscale-0": props.active, "grayscale-0": props.active,
}} }}
/> />
<span class="text-14-medium">{getFilename(props.path)}</span> <span class="text-14-medium truncate">{getFilename(props.path)}</span>
</div> </div>
) )
} }
@@ -38,8 +38,9 @@ export function SortableTab(props: { tab: string; onTabClose: (tab: string) => v
closeButton={ closeButton={
<Tooltip value={language.t("common.closeTab")} placement="bottom"> <Tooltip value={language.t("common.closeTab")} placement="bottom">
<IconButton <IconButton
icon="close" icon="close-small"
variant="ghost" variant="ghost"
class="h-5 w-5"
onClick={() => props.onTabClose(props.tab)} onClick={() => props.onTabClose(props.tab)}
aria-label={language.t("common.closeTab")} aria-label={language.t("common.closeTab")}
/> />
@@ -146,7 +146,7 @@ export function SortableTerminalTab(props: { terminal: LocalPTY; onClose?: () =>
/> />
} }
> >
<span onDblClick={edit} style={{ visibility: store.editing ? "hidden" : "visible" }}> <span onDblClick={edit} classList={{ invisible: store.editing }}>
{label()} {label()}
</span> </span>
</Tabs.Trigger> </Tabs.Trigger>
@@ -167,8 +167,8 @@ export function SortableTerminalTab(props: { terminal: LocalPTY; onClose?: () =>
<DropdownMenu open={store.menuOpen} onOpenChange={(open) => setStore("menuOpen", open)}> <DropdownMenu open={store.menuOpen} onOpenChange={(open) => setStore("menuOpen", open)}>
<DropdownMenu.Portal> <DropdownMenu.Portal>
<DropdownMenu.Content <DropdownMenu.Content
class="fixed"
style={{ style={{
position: "fixed",
left: `${store.menuPosition.x}px`, left: `${store.menuPosition.x}px`,
top: `${store.menuPosition.y}px`, top: `${store.menuPosition.y}px`,
}} }}
+111 -10
View File
@@ -1,8 +1,12 @@
import { Component, createMemo, type JSX } from "solid-js" import { Component, createMemo, type JSX } from "solid-js"
import { createStore } from "solid-js/store"
import { Button } from "@opencode-ai/ui/button"
import { Select } from "@opencode-ai/ui/select" import { Select } from "@opencode-ai/ui/select"
import { Switch } from "@opencode-ai/ui/switch" import { Switch } from "@opencode-ai/ui/switch"
import { useTheme, type ColorScheme } from "@opencode-ai/ui/theme" import { useTheme, type ColorScheme } from "@opencode-ai/ui/theme"
import { showToast } from "@opencode-ai/ui/toast"
import { useLanguage } from "@/context/language" import { useLanguage } from "@/context/language"
import { usePlatform } from "@/context/platform"
import { useSettings, monoFontFamily } from "@/context/settings" import { useSettings, monoFontFamily } from "@/context/settings"
import { playSound, SOUND_OPTIONS } from "@/utils/sound" import { playSound, SOUND_OPTIONS } from "@/utils/sound"
import { Link } from "./link" import { Link } from "./link"
@@ -29,8 +33,67 @@ const playDemoSound = (src: string) => {
export const SettingsGeneral: Component = () => { export const SettingsGeneral: Component = () => {
const theme = useTheme() const theme = useTheme()
const language = useLanguage() const language = useLanguage()
const platform = usePlatform()
const settings = useSettings() const settings = useSettings()
const [store, setStore] = createStore({
checking: false,
})
const check = () => {
if (!platform.checkUpdate) return
setStore("checking", true)
void platform
.checkUpdate()
.then((result) => {
if (!result.updateAvailable) {
showToast({
variant: "success",
icon: "circle-check",
title: language.t("settings.updates.toast.latest.title"),
description: language.t("settings.updates.toast.latest.description", { version: platform.version ?? "" }),
})
return
}
const actions =
platform.update && platform.restart
? [
{
label: language.t("toast.update.action.installRestart"),
onClick: async () => {
await platform.update!()
await platform.restart!()
},
},
{
label: language.t("toast.update.action.notYet"),
onClick: "dismiss" as const,
},
]
: [
{
label: language.t("toast.update.action.notYet"),
onClick: "dismiss" as const,
},
]
showToast({
persistent: true,
icon: "download",
title: language.t("toast.update.title"),
description: language.t("toast.update.description", { version: result.version ?? "" }),
actions,
})
})
.catch((err: unknown) => {
const message = err instanceof Error ? err.message : String(err)
showToast({ title: language.t("common.requestFailed"), description: message })
})
.finally(() => setStore("checking", false))
}
const themeOptions = createMemo(() => const themeOptions = createMemo(() =>
Object.entries(theme.themes()).map(([id, def]) => ({ id, name: def.name ?? id })), Object.entries(theme.themes()).map(([id, def]) => ({ id, name: def.name ?? id })),
) )
@@ -67,14 +130,8 @@ export const SettingsGeneral: Component = () => {
const soundOptions = [...SOUND_OPTIONS] const soundOptions = [...SOUND_OPTIONS]
return ( return (
<div class="flex flex-col h-full overflow-y-auto no-scrollbar" style={{ padding: "0 40px 40px 40px" }}> <div class="flex flex-col h-full overflow-y-auto no-scrollbar px-4 pb-10 sm:px-10 sm:pb-10">
<div <div class="sticky top-0 z-10 bg-[linear-gradient(to_bottom,var(--surface-raised-stronger-non-alpha)_calc(100%_-_24px),transparent)]">
class="sticky top-0 z-10"
style={{
background:
"linear-gradient(to bottom, var(--surface-raised-stronger-non-alpha) calc(100% - 24px), transparent)",
}}
>
<div class="flex flex-col gap-1 pt-6 pb-8"> <div class="flex flex-col gap-1 pt-6 pb-8">
<h2 class="text-16-medium text-text-strong">{language.t("settings.tab.general")}</h2> <h2 class="text-16-medium text-text-strong">{language.t("settings.tab.general")}</h2>
</div> </div>
@@ -292,6 +349,50 @@ export const SettingsGeneral: Component = () => {
</SettingsRow> </SettingsRow>
</div> </div>
</div> </div>
{/* Updates Section */}
<div class="flex flex-col gap-1">
<h3 class="text-14-medium text-text-strong pb-2">{language.t("settings.general.section.updates")}</h3>
<div class="bg-surface-raised-base px-4 rounded-lg">
<SettingsRow
title={language.t("settings.updates.row.startup.title")}
description={language.t("settings.updates.row.startup.description")}
>
<Switch
checked={settings.updates.startup()}
disabled={!platform.checkUpdate}
onChange={(checked) => settings.updates.setStartup(checked)}
/>
</SettingsRow>
<SettingsRow
title={language.t("settings.general.row.releaseNotes.title")}
description={language.t("settings.general.row.releaseNotes.description")}
>
<Switch
checked={settings.general.releaseNotes()}
onChange={(checked) => settings.general.setReleaseNotes(checked)}
/>
</SettingsRow>
<SettingsRow
title={language.t("settings.updates.row.check.title")}
description={language.t("settings.updates.row.check.description")}
>
<Button
size="small"
variant="secondary"
disabled={store.checking || !platform.checkUpdate}
onClick={check}
>
{store.checking
? language.t("settings.updates.action.checking")
: language.t("settings.updates.action.checkNow")}
</Button>
</SettingsRow>
</div>
</div>
</div> </div>
</div> </div>
) )
@@ -305,8 +406,8 @@ interface SettingsRowProps {
const SettingsRow: Component<SettingsRowProps> = (props) => { const SettingsRow: Component<SettingsRowProps> = (props) => {
return ( return (
<div class="flex items-center justify-between gap-4 py-3 border-b border-border-weak-base last:border-none"> <div class="flex flex-wrap items-center justify-between gap-4 py-3 border-b border-border-weak-base last:border-none">
<div class="flex flex-col gap-0.5"> <div class="flex flex-col gap-0.5 min-w-0">
<span class="text-14-medium text-text-strong">{props.title}</span> <span class="text-14-medium text-text-strong">{props.title}</span>
<span class="text-12-regular text-text-weak">{props.description}</span> <span class="text-12-regular text-text-weak">{props.description}</span>
</div> </div>
@@ -352,14 +352,8 @@ export const SettingsKeybinds: Component = () => {
}) })
return ( return (
<div class="flex flex-col h-full overflow-y-auto no-scrollbar" style={{ padding: "0 40px 40px 40px" }}> <div class="flex flex-col h-full overflow-y-auto no-scrollbar px-4 pb-10 sm:px-10 sm:pb-10">
<div <div class="sticky top-0 z-10 bg-[linear-gradient(to_bottom,var(--surface-raised-stronger-non-alpha)_calc(100%_-_24px),transparent)]">
class="sticky top-0 z-10"
style={{
background:
"linear-gradient(to bottom, var(--surface-raised-stronger-non-alpha) calc(100% - 24px), transparent)",
}}
>
<div class="flex flex-col gap-4 pt-6 pb-6 max-w-[720px]"> <div class="flex flex-col gap-4 pt-6 pb-6 max-w-[720px]">
<div class="flex items-center justify-between gap-4"> <div class="flex items-center justify-between gap-4">
<h2 class="text-16-medium text-text-strong">{language.t("settings.shortcuts.title")}</h2> <h2 class="text-16-medium text-text-strong">{language.t("settings.shortcuts.title")}</h2>
@@ -39,14 +39,8 @@ export const SettingsModels: Component = () => {
}) })
return ( return (
<div class="flex flex-col h-full overflow-y-auto no-scrollbar" style={{ padding: "0 40px 40px 40px" }}> <div class="flex flex-col h-full overflow-y-auto no-scrollbar px-4 pb-10 sm:px-10 sm:pb-10">
<div <div class="sticky top-0 z-10 bg-[linear-gradient(to_bottom,var(--surface-raised-stronger-non-alpha)_calc(100%_-_24px),transparent)]">
class="sticky top-0 z-10"
style={{
background:
"linear-gradient(to bottom, var(--surface-raised-stronger-non-alpha) calc(100% - 24px), transparent)",
}}
>
<div class="flex flex-col gap-4 pt-6 pb-6 max-w-[720px]"> <div class="flex flex-col gap-4 pt-6 pb-6 max-w-[720px]">
<h2 class="text-16-medium text-text-strong">{language.t("settings.models.title")}</h2> <h2 class="text-16-medium text-text-strong">{language.t("settings.models.title")}</h2>
<div class="flex items-center gap-2 px-3 h-9 rounded-lg bg-surface-base"> <div class="flex items-center gap-2 px-3 h-9 rounded-lg bg-surface-base">
@@ -105,7 +99,7 @@ export const SettingsModels: Component = () => {
{(item) => { {(item) => {
const key = { providerID: item.provider.id, modelID: item.id } const key = { providerID: item.provider.id, modelID: item.id }
return ( return (
<div class="flex items-center justify-between gap-4 py-3 border-b border-border-weak-base last:border-none"> <div class="flex flex-wrap items-center justify-between gap-4 py-3 border-b border-border-weak-base last:border-none">
<div class="min-w-0"> <div class="min-w-0">
<span class="text-14-regular text-text-strong truncate block">{item.name}</span> <span class="text-14-regular text-text-strong truncate block">{item.name}</span>
</div> </div>
@@ -175,20 +175,14 @@ export const SettingsPermissions: Component = () => {
return ( return (
<div class="flex flex-col h-full overflow-y-auto no-scrollbar"> <div class="flex flex-col h-full overflow-y-auto no-scrollbar">
<div <div class="sticky top-0 z-10 bg-[linear-gradient(to_bottom,var(--surface-raised-stronger-non-alpha)_calc(100%_-_24px),transparent)]">
class="sticky top-0 z-10" <div class="flex flex-col gap-1 px-4 py-8 sm:p-8 max-w-[720px]">
style={{
background:
"linear-gradient(to bottom, var(--surface-raised-stronger-non-alpha) calc(100% - 24px), transparent)",
}}
>
<div class="flex flex-col gap-1 p-8 max-w-[720px]">
<h2 class="text-16-medium text-text-strong">{language.t("settings.permissions.title")}</h2> <h2 class="text-16-medium text-text-strong">{language.t("settings.permissions.title")}</h2>
<p class="text-14-regular text-text-weak">{language.t("settings.permissions.description")}</p> <p class="text-14-regular text-text-weak">{language.t("settings.permissions.description")}</p>
</div> </div>
</div> </div>
<div class="flex flex-col gap-6 p-8 pt-6 max-w-[720px]"> <div class="flex flex-col gap-6 px-4 py-6 sm:p-8 sm:pt-6 max-w-[720px]">
<div class="flex flex-col gap-2"> <div class="flex flex-col gap-2">
<h3 class="text-14-medium text-text-strong">{language.t("settings.permissions.section.tools")}</h3> <h3 class="text-14-medium text-text-strong">{language.t("settings.permissions.section.tools")}</h3>
<div class="border border-border-weak-base rounded-lg overflow-hidden"> <div class="border border-border-weak-base rounded-lg overflow-hidden">
@@ -223,8 +217,8 @@ interface SettingsRowProps {
const SettingsRow: Component<SettingsRowProps> = (props) => { const SettingsRow: Component<SettingsRowProps> = (props) => {
return ( return (
<div class="flex items-center justify-between gap-4 px-4 py-3 border-b border-border-weak-base last:border-none"> <div class="flex flex-wrap items-center justify-between gap-4 px-4 py-3 border-b border-border-weak-base last:border-none">
<div class="flex flex-col gap-0.5"> <div class="flex flex-col gap-0.5 min-w-0">
<span class="text-14-medium text-text-strong">{props.title}</span> <span class="text-14-medium text-text-strong">{props.title}</span>
<span class="text-12-regular text-text-weak">{props.description}</span> <span class="text-12-regular text-text-weak">{props.description}</span>
</div> </div>
@@ -3,13 +3,15 @@ import { useDialog } from "@opencode-ai/ui/context/dialog"
import { ProviderIcon } from "@opencode-ai/ui/provider-icon" import { ProviderIcon } from "@opencode-ai/ui/provider-icon"
import { Tag } from "@opencode-ai/ui/tag" import { Tag } from "@opencode-ai/ui/tag"
import { showToast } from "@opencode-ai/ui/toast" import { showToast } from "@opencode-ai/ui/toast"
import type { IconName } from "@opencode-ai/ui/icons/provider" import { iconNames, type IconName } from "@opencode-ai/ui/icons/provider"
import { popularProviders, useProviders } from "@/hooks/use-providers" import { popularProviders, useProviders } from "@/hooks/use-providers"
import { createMemo, type Component, For, Show } from "solid-js" import { createMemo, type Component, For, Show } from "solid-js"
import { useLanguage } from "@/context/language" import { useLanguage } from "@/context/language"
import { useGlobalSDK } from "@/context/global-sdk" import { useGlobalSDK } from "@/context/global-sdk"
import { useGlobalSync } from "@/context/global-sync"
import { DialogConnectProvider } from "./dialog-connect-provider" import { DialogConnectProvider } from "./dialog-connect-provider"
import { DialogSelectProvider } from "./dialog-select-provider" import { DialogSelectProvider } from "./dialog-select-provider"
import { DialogCustomProvider } from "./dialog-custom-provider"
type ProviderSource = "env" | "api" | "config" | "custom" type ProviderSource = "env" | "api" | "config" | "custom"
type ProviderMeta = { source?: ProviderSource } type ProviderMeta = { source?: ProviderSource }
@@ -18,9 +20,20 @@ export const SettingsProviders: Component = () => {
const dialog = useDialog() const dialog = useDialog()
const language = useLanguage() const language = useLanguage()
const globalSDK = useGlobalSDK() const globalSDK = useGlobalSDK()
const globalSync = useGlobalSync()
const providers = useProviders() const providers = useProviders()
const connected = createMemo(() => providers.connected()) const icon = (id: string): IconName => {
if (iconNames.includes(id as IconName)) return id as IconName
return "synthetic"
}
const connected = createMemo(() => {
return providers
.connected()
.filter((p) => p.id !== "opencode" || Object.values(p.models).find((m) => m.cost?.input))
})
const popular = createMemo(() => { const popular = createMemo(() => {
const connectedIDs = new Set(connected().map((p) => p.id)) const connectedIDs = new Set(connected().map((p) => p.id))
const items = providers const items = providers
@@ -37,14 +50,53 @@ export const SettingsProviders: Component = () => {
const current = source(item) const current = source(item)
if (current === "env") return language.t("settings.providers.tag.environment") if (current === "env") return language.t("settings.providers.tag.environment")
if (current === "api") return language.t("provider.connect.method.apiKey") if (current === "api") return language.t("provider.connect.method.apiKey")
if (current === "config") return language.t("settings.providers.tag.config") if (current === "config") {
const id = (item as { id?: string }).id
if (id && isConfigCustom(id)) return language.t("settings.providers.tag.custom")
return language.t("settings.providers.tag.config")
}
if (current === "custom") return language.t("settings.providers.tag.custom") if (current === "custom") return language.t("settings.providers.tag.custom")
return language.t("settings.providers.tag.other") return language.t("settings.providers.tag.other")
} }
const canDisconnect = (item: unknown) => source(item) !== "env" const canDisconnect = (item: unknown) => source(item) !== "env"
const isConfigCustom = (providerID: string) => {
const provider = globalSync.data.config.provider?.[providerID]
if (!provider) return false
if (provider.npm !== "@ai-sdk/openai-compatible") return false
if (!provider.models || Object.keys(provider.models).length === 0) return false
return true
}
const disableProvider = async (providerID: string, name: string) => {
const before = globalSync.data.config.disabled_providers ?? []
const next = before.includes(providerID) ? before : [...before, providerID]
globalSync.set("config", "disabled_providers", next)
await globalSync
.updateConfig({ disabled_providers: next })
.then(() => {
showToast({
variant: "success",
icon: "circle-check",
title: language.t("provider.disconnect.toast.disconnected.title", { provider: name }),
description: language.t("provider.disconnect.toast.disconnected.description", { provider: name }),
})
})
.catch((err: unknown) => {
globalSync.set("config", "disabled_providers", before)
const message = err instanceof Error ? err.message : String(err)
showToast({ title: language.t("common.requestFailed"), description: message })
})
}
const disconnect = async (providerID: string, name: string) => { const disconnect = async (providerID: string, name: string) => {
if (isConfigCustom(providerID)) {
await globalSDK.client.auth.remove({ providerID }).catch(() => undefined)
await disableProvider(providerID, name)
return
}
await globalSDK.client.auth await globalSDK.client.auth
.remove({ providerID }) .remove({ providerID })
.then(async () => { .then(async () => {
@@ -63,7 +115,7 @@ export const SettingsProviders: Component = () => {
} }
return ( return (
<div class="flex flex-col h-full overflow-y-auto no-scrollbar" style={{ padding: "0 40px 40px 40px" }}> <div class="flex flex-col h-full overflow-y-auto no-scrollbar px-4 pb-10 sm:px-10 sm:pb-10">
<div class="sticky top-0 z-10 bg-[linear-gradient(to_bottom,var(--surface-raised-stronger-non-alpha)_calc(100%_-_24px),transparent)]"> <div class="sticky top-0 z-10 bg-[linear-gradient(to_bottom,var(--surface-raised-stronger-non-alpha)_calc(100%_-_24px),transparent)]">
<div class="flex flex-col gap-1 pt-6 pb-8 max-w-[720px]"> <div class="flex flex-col gap-1 pt-6 pb-8 max-w-[720px]">
<h2 class="text-16-medium text-text-strong">{language.t("settings.providers.title")}</h2> <h2 class="text-16-medium text-text-strong">{language.t("settings.providers.title")}</h2>
@@ -84,14 +136,21 @@ export const SettingsProviders: Component = () => {
> >
<For each={connected()}> <For each={connected()}>
{(item) => ( {(item) => (
<div class="flex items-center justify-between gap-4 py-3 border-b border-border-weak-base last:border-none"> <div class="group flex flex-wrap items-center justify-between gap-4 min-h-16 py-3 border-b border-border-weak-base last:border-none">
<div class="flex items-center gap-3 min-w-0"> <div class="flex items-center gap-3 min-w-0">
<ProviderIcon id={item.id as IconName} class="size-5 shrink-0 icon-strong-base" /> <ProviderIcon id={icon(item.id)} class="size-5 shrink-0 icon-strong-base" />
<span class="text-14-regular text-text-strong truncate">{item.name}</span> <span class="text-14-medium text-text-strong truncate">{item.name}</span>
<Tag>{type(item)}</Tag> <Tag>{type(item)}</Tag>
</div> </div>
<Show when={canDisconnect(item)}> <Show
<Button size="small" variant="ghost" onClick={() => void disconnect(item.id, item.name)}> when={canDisconnect(item)}
fallback={
<span class="text-14-regular text-text-base opacity-0 group-hover:opacity-100 transition-opacity duration-200 pr-3 cursor-default">
Connected from your environment variables
</span>
}
>
<Button size="large" variant="ghost" onClick={() => void disconnect(item.id, item.name)}>
{language.t("common.disconnect")} {language.t("common.disconnect")}
</Button> </Button>
</Show> </Show>
@@ -107,21 +166,49 @@ export const SettingsProviders: Component = () => {
<div class="bg-surface-raised-base px-4 rounded-lg"> <div class="bg-surface-raised-base px-4 rounded-lg">
<For each={popular()}> <For each={popular()}>
{(item) => ( {(item) => (
<div class="flex items-center justify-between gap-4 py-3 border-b border-border-weak-base last:border-none"> <div class="flex flex-wrap items-center justify-between gap-4 min-h-16 py-3 border-b border-border-weak-base last:border-none">
<div class="flex items-center gap-x-3 min-w-0"> <div class="flex flex-col min-w-0">
<ProviderIcon id={item.id as IconName} class="size-5 shrink-0 icon-strong-base" /> <div class="flex items-center gap-x-3">
<span class="text-14-regular text-text-strong">{item.name}</span> <ProviderIcon id={icon(item.id)} class="size-5 shrink-0 icon-strong-base" />
<span class="text-14-medium text-text-strong">{item.name}</span>
<Show when={item.id === "opencode"}> <Show when={item.id === "opencode"}>
<Tag>{language.t("dialog.provider.tag.recommended")}</Tag> <Tag>{language.t("dialog.provider.tag.recommended")}</Tag>
</Show> </Show>
<Show when={item.id === "anthropic"}> </div>
<div class="text-14-regular text-text-weak">{language.t("dialog.provider.anthropic.note")}</div> <Show when={item.id === "opencode"}>
<span class="text-12-regular text-text-weak pl-8">
{language.t("dialog.provider.opencode.note")}
</span>
</Show> </Show>
<Show when={item.id === "openai"}> <Show when={item.id === "anthropic"}>
<div class="text-14-regular text-text-weak">{language.t("dialog.provider.openai.note")}</div> <span class="text-12-regular text-text-weak pl-8">
{language.t("dialog.provider.anthropic.note")}
</span>
</Show> </Show>
<Show when={item.id.startsWith("github-copilot")}> <Show when={item.id.startsWith("github-copilot")}>
<div class="text-14-regular text-text-weak">{language.t("dialog.provider.copilot.note")}</div> <span class="text-12-regular text-text-weak pl-8">
{language.t("dialog.provider.copilot.note")}
</span>
</Show>
<Show when={item.id === "openai"}>
<span class="text-12-regular text-text-weak pl-8">
{language.t("dialog.provider.openai.note")}
</span>
</Show>
<Show when={item.id === "google"}>
<span class="text-12-regular text-text-weak pl-8">
{language.t("dialog.provider.google.note")}
</span>
</Show>
<Show when={item.id === "openrouter"}>
<span class="text-12-regular text-text-weak pl-8">
{language.t("dialog.provider.openrouter.note")}
</span>
</Show>
<Show when={item.id === "vercel"}>
<span class="text-12-regular text-text-weak pl-8">
{language.t("dialog.provider.vercel.note")}
</span>
</Show> </Show>
</div> </div>
<Button <Button
@@ -137,11 +224,32 @@ export const SettingsProviders: Component = () => {
</div> </div>
)} )}
</For> </For>
<div class="flex items-center justify-between gap-4 h-16 border-b border-border-weak-base last:border-none">
<div class="flex flex-col min-w-0">
<div class="flex items-center gap-x-3">
<ProviderIcon id={icon("synthetic")} class="size-5 shrink-0 icon-strong-base" />
<span class="text-14-medium text-text-strong">Custom provider</span>
<Tag>{language.t("settings.providers.tag.custom")}</Tag>
</div>
<span class="text-12-regular text-text-weak pl-8">Add an OpenAI-compatible provider by base URL.</span>
</div>
<Button
size="large"
variant="secondary"
icon="plus-small"
onClick={() => {
dialog.show(() => <DialogCustomProvider back="close" />)
}}
>
{language.t("common.connect")}
</Button>
</div>
</div> </div>
<Button <Button
variant="ghost" variant="ghost"
class="px-0 py-0 text-14-medium text-text-strong text-left justify-start hover:bg-transparent active:bg-transparent" class="px-0 py-0 mt-5 text-14-medium text-text-interactive-base text-left justify-start hover:bg-transparent active:bg-transparent"
onClick={() => { onClick={() => {
dialog.show(() => <DialogSelectProvider />) dialog.show(() => <DialogSelectProvider />)
}} }}
+17 -26
View File
@@ -15,14 +15,16 @@ import { usePlatform } from "@/context/platform"
import { useLanguage } from "@/context/language" import { useLanguage } from "@/context/language"
import { createOpencodeClient } from "@opencode-ai/sdk/v2/client" import { createOpencodeClient } from "@opencode-ai/sdk/v2/client"
import { DialogSelectServer } from "./dialog-select-server" import { DialogSelectServer } from "./dialog-select-server"
import { showToast } from "@opencode-ai/ui/toast"
type ServerStatus = { healthy: boolean; version?: string } type ServerStatus = { healthy: boolean; version?: string }
async function checkHealth(url: string, platform: ReturnType<typeof usePlatform>): Promise<ServerStatus> { async function checkHealth(url: string, platform: ReturnType<typeof usePlatform>): Promise<ServerStatus> {
const signal = (AbortSignal as unknown as { timeout?: (ms: number) => AbortSignal }).timeout?.(3000)
const sdk = createOpencodeClient({ const sdk = createOpencodeClient({
baseUrl: url, baseUrl: url,
fetch: platform.fetch, fetch: platform.fetch,
signal: AbortSignal.timeout(3000), signal,
}) })
return sdk.global return sdk.global
.health() .health()
@@ -100,16 +102,22 @@ export function StatusPopover() {
const toggleMcp = async (name: string) => { const toggleMcp = async (name: string) => {
if (store.loading) return if (store.loading) return
setStore("loading", name) setStore("loading", name)
try {
const status = sync.data.mcp[name] const status = sync.data.mcp[name]
if (status?.status === "connected") { await (status?.status === "connected" ? sdk.client.mcp.disconnect({ name }) : sdk.client.mcp.connect({ name }))
await sdk.client.mcp.disconnect({ name })
} else {
await sdk.client.mcp.connect({ name })
}
const result = await sdk.client.mcp.status() const result = await sdk.client.mcp.status()
if (result.data) sync.set("mcp", result.data) if (result.data) sync.set("mcp", result.data)
} catch (err) {
showToast({
variant: "error",
title: language.t("common.requestFailed"),
description: err instanceof Error ? err.message : String(err),
})
} finally {
setStore("loading", null) setStore("loading", null)
} }
}
const lspItems = createMemo(() => sync.data.lsp ?? []) const lspItems = createMemo(() => sync.data.lsp ?? [])
const lspCount = createMemo(() => lspItems().length) const lspCount = createMemo(() => lspItems().length)
@@ -168,33 +176,16 @@ export function StatusPopover() {
placement="bottom-end" placement="bottom-end"
shift={-136} shift={-136}
> >
<div <div class="flex items-center gap-1 w-[360px] rounded-xl shadow-[var(--shadow-lg-border-base)]">
class="flex items-center gap-1 w-[360px] rounded-xl"
style={{ "box-shadow": "var(--shadow-lg-border-base)" }}
>
<Tabs <Tabs
aria-label={language.t("status.popover.ariaLabel")} aria-label={language.t("status.popover.ariaLabel")}
class="tabs" class="tabs bg-background-strong rounded-xl overflow-hidden"
data-component="tabs" data-component="tabs"
data-active="servers" data-active="servers"
defaultValue="servers" defaultValue="servers"
variant="alt" variant="alt"
style={{
"background-color": "var(--background-strong)",
"border-radius": "12px",
overflow: "hidden",
}}
>
<Tabs.List
data-slot="tablist"
style={{
"background-color": "transparent",
"border-bottom": "none",
padding: "8px 16px 0",
gap: "16px",
height: "40px",
}}
> >
<Tabs.List data-slot="tablist" class="bg-transparent border-b-0 px-4 pt-2 pb-0 gap-4 h-10">
<Tabs.Trigger value="servers" data-slot="tab" class="text-12-regular"> <Tabs.Trigger value="servers" data-slot="tab" class="text-12-regular">
{serverCount() > 0 ? `${serverCount()} ` : ""} {serverCount() > 0 ? `${serverCount()} ` : ""}
{language.t("status.popover.tab.servers")} {language.t("status.popover.tab.servers")}
+107 -31
View File
@@ -5,6 +5,8 @@ import { monoFontFamily, useSettings } from "@/context/settings"
import { SerializeAddon } from "@/addons/serialize" import { SerializeAddon } from "@/addons/serialize"
import { LocalPTY } from "@/context/terminal" import { LocalPTY } from "@/context/terminal"
import { resolveThemeVariant, useTheme, withAlpha, type HexColor } from "@opencode-ai/ui/theme" import { resolveThemeVariant, useTheme, withAlpha, type HexColor } from "@opencode-ai/ui/theme"
import { useLanguage } from "@/context/language"
import { showToast } from "@opencode-ai/ui/toast"
export interface TerminalProps extends ComponentProps<"div"> { export interface TerminalProps extends ComponentProps<"div"> {
pty: LocalPTY pty: LocalPTY
@@ -14,6 +16,19 @@ export interface TerminalProps extends ComponentProps<"div"> {
onConnectError?: (error: unknown) => void onConnectError?: (error: unknown) => void
} }
let shared: Promise<{ mod: typeof import("ghostty-web"); ghostty: Ghostty }> | undefined
const loadGhostty = () => {
if (shared) return shared
shared = import("ghostty-web")
.then(async (mod) => ({ mod, ghostty: await mod.Ghostty.load() }))
.catch((err) => {
shared = undefined
throw err
})
return shared
}
type TerminalColors = { type TerminalColors = {
background: string background: string
foreground: string foreground: string
@@ -40,6 +55,7 @@ export const Terminal = (props: TerminalProps) => {
const sdk = useSDK() const sdk = useSDK()
const settings = useSettings() const settings = useSettings()
const theme = useTheme() const theme = useTheme()
const language = useLanguage()
let container!: HTMLDivElement let container!: HTMLDivElement
const [local, others] = splitProps(props, ["pty", "class", "classList", "onConnect", "onConnectError"]) const [local, others] = splitProps(props, ["pty", "class", "classList", "onConnect", "onConnectError"])
let ws: WebSocket | undefined let ws: WebSocket | undefined
@@ -50,8 +66,20 @@ export const Terminal = (props: TerminalProps) => {
let handleResize: () => void let handleResize: () => void
let handleTextareaFocus: () => void let handleTextareaFocus: () => void
let handleTextareaBlur: () => void let handleTextareaBlur: () => void
let reconnect: number | undefined
let disposed = false let disposed = false
const cleanups: VoidFunction[] = []
const cleanup = () => {
if (!cleanups.length) return
const fns = cleanups.splice(0).reverse()
for (const fn of fns) {
try {
fn()
} catch {
// ignore
}
}
}
const getTerminalColors = (): TerminalColors => { const getTerminalColors = (): TerminalColors => {
const mode = theme.mode() const mode = theme.mode()
@@ -107,9 +135,13 @@ export const Terminal = (props: TerminalProps) => {
focusTerminal() focusTerminal()
} }
onMount(async () => { onMount(() => {
const mod = await import("ghostty-web") const run = async () => {
ghostty = await mod.Ghostty.load() const loaded = await loadGhostty()
if (disposed) return
const mod = loaded.mod
const g = loaded.ghostty
const once = { value: false } const once = { value: false }
@@ -119,6 +151,13 @@ export const Terminal = (props: TerminalProps) => {
url.password = window.__OPENCODE__?.serverPassword url.password = window.__OPENCODE__?.serverPassword
} }
const socket = new WebSocket(url) const socket = new WebSocket(url)
cleanups.push(() => {
if (socket.readyState !== WebSocket.CLOSED && socket.readyState !== WebSocket.CLOSING) socket.close()
})
if (disposed) {
cleanup()
return
}
ws = socket ws = socket
const t = new mod.Terminal({ const t = new mod.Terminal({
@@ -129,8 +168,14 @@ export const Terminal = (props: TerminalProps) => {
allowTransparency: true, allowTransparency: true,
theme: terminalColors(), theme: terminalColors(),
scrollback: 10_000, scrollback: 10_000,
ghostty, ghostty: g,
}) })
cleanups.push(() => t.dispose())
if (disposed) {
cleanup()
return
}
ghostty = g
term = t term = t
const copy = () => { const copy = () => {
@@ -182,13 +227,17 @@ export const Terminal = (props: TerminalProps) => {
return false return false
}) })
fitAddon = new mod.FitAddon() const fit = new mod.FitAddon()
serializeAddon = new SerializeAddon() const serializer = new SerializeAddon()
t.loadAddon(serializeAddon) cleanups.push(() => (fit as unknown as { dispose?: VoidFunction }).dispose?.())
t.loadAddon(fitAddon) t.loadAddon(serializer)
t.loadAddon(fit)
fitAddon = fit
serializeAddon = serializer
t.open(container) t.open(container)
container.addEventListener("pointerdown", handlePointerDown) container.addEventListener("pointerdown", handlePointerDown)
cleanups.push(() => container.removeEventListener("pointerdown", handlePointerDown))
handleTextareaFocus = () => { handleTextareaFocus = () => {
t.options.cursorBlink = true t.options.cursorBlink = true
@@ -199,6 +248,8 @@ export const Terminal = (props: TerminalProps) => {
t.textarea?.addEventListener("focus", handleTextareaFocus) t.textarea?.addEventListener("focus", handleTextareaFocus)
t.textarea?.addEventListener("blur", handleTextareaBlur) t.textarea?.addEventListener("blur", handleTextareaBlur)
cleanups.push(() => t.textarea?.removeEventListener("focus", handleTextareaFocus))
cleanups.push(() => t.textarea?.removeEventListener("blur", handleTextareaBlur))
focusTerminal() focusTerminal()
@@ -214,10 +265,11 @@ export const Terminal = (props: TerminalProps) => {
}) })
} }
fitAddon.observeResize() fit.observeResize()
handleResize = () => fitAddon.fit() handleResize = () => fit.fit()
window.addEventListener("resize", handleResize) window.addEventListener("resize", handleResize)
t.onResize(async (size) => { cleanups.push(() => window.removeEventListener("resize", handleResize))
const onResize = t.onResize(async (size) => {
if (socket.readyState === WebSocket.OPEN) { if (socket.readyState === WebSocket.OPEN) {
await sdk.client.pty await sdk.client.pty
.update({ .update({
@@ -230,20 +282,24 @@ export const Terminal = (props: TerminalProps) => {
.catch(() => {}) .catch(() => {})
} }
}) })
t.onData((data) => { cleanups.push(() => (onResize as unknown as { dispose?: VoidFunction }).dispose?.())
const onData = t.onData((data) => {
if (socket.readyState === WebSocket.OPEN) { if (socket.readyState === WebSocket.OPEN) {
socket.send(data) socket.send(data)
} }
}) })
t.onKey((key) => { cleanups.push(() => (onData as unknown as { dispose?: VoidFunction }).dispose?.())
const onKey = t.onKey((key) => {
if (key.key == "Enter") { if (key.key == "Enter") {
props.onSubmit?.() props.onSubmit?.()
} }
}) })
cleanups.push(() => (onKey as unknown as { dispose?: VoidFunction }).dispose?.())
// t.onScroll((ydisp) => { // t.onScroll((ydisp) => {
// console.log("Scroll position:", ydisp) // console.log("Scroll position:", ydisp)
// }) // })
socket.addEventListener("open", () => {
const handleOpen = () => {
local.onConnect?.() local.onConnect?.()
sdk.client.pty sdk.client.pty
.update({ .update({
@@ -254,18 +310,27 @@ export const Terminal = (props: TerminalProps) => {
}, },
}) })
.catch(() => {}) .catch(() => {})
}) }
socket.addEventListener("message", (event) => { socket.addEventListener("open", handleOpen)
cleanups.push(() => socket.removeEventListener("open", handleOpen))
const handleMessage = (event: MessageEvent) => {
t.write(event.data) t.write(event.data)
}) }
socket.addEventListener("error", (error) => { socket.addEventListener("message", handleMessage)
cleanups.push(() => socket.removeEventListener("message", handleMessage))
const handleError = (error: Event) => {
if (disposed) return if (disposed) return
if (once.value) return if (once.value) return
once.value = true once.value = true
console.error("WebSocket error:", error) console.error("WebSocket error:", error)
local.onConnectError?.(error) local.onConnectError?.(error)
}) }
socket.addEventListener("close", (event) => { socket.addEventListener("error", handleError)
cleanups.push(() => socket.removeEventListener("error", handleError))
const handleClose = (event: CloseEvent) => {
if (disposed) return if (disposed) return
// Normal closure (code 1000) means PTY process exited - server event handles cleanup // Normal closure (code 1000) means PTY process exited - server event handles cleanup
// For other codes (network issues, server restart), trigger error handler // For other codes (network issues, server restart), trigger error handler
@@ -274,21 +339,33 @@ export const Terminal = (props: TerminalProps) => {
once.value = true once.value = true
local.onConnectError?.(new Error(`WebSocket closed abnormally: ${event.code}`)) local.onConnectError?.(new Error(`WebSocket closed abnormally: ${event.code}`))
} }
}
socket.addEventListener("close", handleClose)
cleanups.push(() => socket.removeEventListener("close", handleClose))
}
void run().catch((err) => {
if (disposed) return
showToast({
variant: "error",
title: language.t("terminal.connectionLost.title"),
description: err instanceof Error ? err.message : language.t("terminal.connectionLost.description"),
})
local.onConnectError?.(err)
}) })
}) })
onCleanup(() => { onCleanup(() => {
disposed = true disposed = true
if (handleResize) {
window.removeEventListener("resize", handleResize)
}
container.removeEventListener("pointerdown", handlePointerDown)
term?.textarea?.removeEventListener("focus", handleTextareaFocus)
term?.textarea?.removeEventListener("blur", handleTextareaBlur)
const t = term const t = term
if (serializeAddon && props.onCleanup && t) { if (serializeAddon && props.onCleanup && t) {
const buffer = serializeAddon.serialize() const buffer = (() => {
try {
return serializeAddon.serialize()
} catch {
return ""
}
})()
props.onCleanup({ props.onCleanup({
...local.pty, ...local.pty,
buffer, buffer,
@@ -298,8 +375,7 @@ export const Terminal = (props: TerminalProps) => {
}) })
} }
ws?.close() cleanup()
t?.dispose()
}) })
return ( return (
+85 -2
View File
@@ -1,8 +1,10 @@
import { createEffect, createMemo, Show } from "solid-js" import { createEffect, createMemo, Show, untrack } from "solid-js"
import { createStore } from "solid-js/store"
import { useLocation, useNavigate } from "@solidjs/router"
import { IconButton } from "@opencode-ai/ui/icon-button" import { IconButton } from "@opencode-ai/ui/icon-button"
import { Icon } from "@opencode-ai/ui/icon" import { Icon } from "@opencode-ai/ui/icon"
import { Button } from "@opencode-ai/ui/button" import { Button } from "@opencode-ai/ui/button"
import { TooltipKeybind } from "@opencode-ai/ui/tooltip" import { Tooltip, TooltipKeybind } from "@opencode-ai/ui/tooltip"
import { useTheme } from "@opencode-ai/ui/theme" import { useTheme } from "@opencode-ai/ui/theme"
import { useLayout } from "@/context/layout" import { useLayout } from "@/context/layout"
@@ -16,11 +18,68 @@ export function Titlebar() {
const command = useCommand() const command = useCommand()
const language = useLanguage() const language = useLanguage()
const theme = useTheme() const theme = useTheme()
const navigate = useNavigate()
const location = useLocation()
const mac = createMemo(() => platform.platform === "desktop" && platform.os === "macos") const mac = createMemo(() => platform.platform === "desktop" && platform.os === "macos")
const windows = createMemo(() => platform.platform === "desktop" && platform.os === "windows") const windows = createMemo(() => platform.platform === "desktop" && platform.os === "windows")
const web = createMemo(() => platform.platform === "web") const web = createMemo(() => platform.platform === "web")
const [history, setHistory] = createStore({
stack: [] as string[],
index: 0,
action: undefined as "back" | "forward" | undefined,
})
const path = () => `${location.pathname}${location.search}${location.hash}`
createEffect(() => {
const current = path()
untrack(() => {
if (!history.stack.length) {
const stack = current === "/" ? ["/"] : ["/", current]
setHistory({ stack, index: stack.length - 1 })
return
}
const active = history.stack[history.index]
if (current === active) {
if (history.action) setHistory("action", undefined)
return
}
if (history.action) {
setHistory("action", undefined)
return
}
const next = history.stack.slice(0, history.index + 1).concat(current)
setHistory({ stack: next, index: next.length - 1 })
})
})
const canBack = createMemo(() => history.index > 0)
const canForward = createMemo(() => history.index < history.stack.length - 1)
const back = () => {
if (!canBack()) return
const index = history.index - 1
const to = history.stack[index]
if (!to) return
setHistory({ index, action: "back" })
navigate(to)
}
const forward = () => {
if (!canForward()) return
const index = history.index + 1
const to = history.stack[index]
if (!to) return
setHistory({ index, action: "forward" })
navigate(to)
}
const getWin = () => { const getWin = () => {
if (platform.platform !== "desktop") return if (platform.platform !== "desktop") return
@@ -106,6 +165,7 @@ export function Titlebar() {
/> />
</div> </div>
</Show> </Show>
<div class="flex items-center gap-3 shrink-0">
<TooltipKeybind <TooltipKeybind
class={web() ? "hidden xl:flex shrink-0 ml-14" : "hidden xl:flex shrink-0 ml-2"} class={web() ? "hidden xl:flex shrink-0 ml-14" : "hidden xl:flex shrink-0 ml-2"}
placement="bottom" placement="bottom"
@@ -134,6 +194,29 @@ export function Titlebar() {
</div> </div>
</Button> </Button>
</TooltipKeybind> </TooltipKeybind>
<div class="hidden xl:flex items-center gap-1 shrink-0">
<Tooltip placement="bottom" value={language.t("common.goBack")} openDelay={2000}>
<Button
variant="ghost"
icon="arrow-left"
class="size-6 p-0"
disabled={!canBack()}
onClick={back}
aria-label={language.t("common.goBack")}
/>
</Tooltip>
<Tooltip placement="bottom" value={language.t("common.goForward")} openDelay={2000}>
<Button
variant="ghost"
icon="arrow-right"
class="size-6 p-0"
disabled={!canForward()}
onClick={forward}
aria-label={language.t("common.goForward")}
/>
</Tooltip>
</div>
</div>
<div id="opencode-titlebar-left" class="flex items-center gap-3 min-w-0 px-2" data-tauri-drag-region /> <div id="opencode-titlebar-left" class="flex items-center gap-3 min-w-0 px-2" data-tauri-drag-region />
<div class="flex-1 h-full" data-tauri-drag-region /> <div class="flex-1 h-full" data-tauri-drag-region />
<div <div
+91 -7
View File
@@ -151,6 +151,28 @@ const WORKSPACE_KEY = "__workspace__"
const MAX_FILE_VIEW_SESSIONS = 20 const MAX_FILE_VIEW_SESSIONS = 20
const MAX_VIEW_FILES = 500 const MAX_VIEW_FILES = 500
const MAX_FILE_CONTENT_ENTRIES = 40
const MAX_FILE_CONTENT_BYTES = 20 * 1024 * 1024
const contentLru = new Map<string, number>()
function approxBytes(content: FileContent) {
const patchBytes =
content.patch?.hunks.reduce((total, hunk) => {
return total + hunk.lines.reduce((sum, line) => sum + line.length, 0)
}, 0) ?? 0
return (content.content.length + (content.diff?.length ?? 0) + patchBytes) * 2
}
function touchContent(path: string, bytes?: number) {
const prev = contentLru.get(path)
if (prev === undefined && bytes === undefined) return
const value = bytes ?? prev ?? 0
contentLru.delete(path)
contentLru.set(path, value)
}
type ViewSession = ReturnType<typeof createViewSession> type ViewSession = ReturnType<typeof createViewSession>
type ViewCacheEntry = { type ViewCacheEntry = {
@@ -295,6 +317,12 @@ export const { use: useFile, provider: FileProvider } = createSimpleContext({
const inflight = new Map<string, Promise<void>>() const inflight = new Map<string, Promise<void>>()
const treeInflight = new Map<string, Promise<void>>() const treeInflight = new Map<string, Promise<void>>()
const search = (query: string, dirs: "true" | "false") =>
sdk.client.find.files({ query, dirs }).then(
(x) => (x.data ?? []).map(normalize),
() => [],
)
const [store, setStore] = createStore<{ const [store, setStore] = createStore<{
file: Record<string, FileState> file: Record<string, FileState>
}>({ }>({
@@ -309,10 +337,40 @@ export const { use: useFile, provider: FileProvider } = createSimpleContext({
dir: { "": { expanded: true } }, dir: { "": { expanded: true } },
}) })
const evictContent = (keep?: Set<string>) => {
const protectedSet = keep ?? new Set<string>()
const total = () => {
return Array.from(contentLru.values()).reduce((sum, bytes) => sum + bytes, 0)
}
while (contentLru.size > MAX_FILE_CONTENT_ENTRIES || total() > MAX_FILE_CONTENT_BYTES) {
const path = contentLru.keys().next().value
if (!path) return
if (protectedSet.has(path)) {
touchContent(path)
if (contentLru.size <= protectedSet.size) return
continue
}
contentLru.delete(path)
if (!store.file[path]) continue
setStore(
"file",
path,
produce((draft) => {
draft.content = undefined
draft.loaded = false
}),
)
}
}
createEffect(() => { createEffect(() => {
scope() scope()
inflight.clear() inflight.clear()
treeInflight.clear() treeInflight.clear()
contentLru.clear()
setStore("file", {}) setStore("file", {})
setTree("node", {}) setTree("node", {})
setTree("dir", { "": { expanded: true } }) setTree("dir", { "": { expanded: true } })
@@ -393,15 +451,20 @@ export const { use: useFile, provider: FileProvider } = createSimpleContext({
.read({ path }) .read({ path })
.then((x) => { .then((x) => {
if (scope() !== directory) return if (scope() !== directory) return
const content = x.data
setStore( setStore(
"file", "file",
path, path,
produce((draft) => { produce((draft) => {
draft.loaded = true draft.loaded = true
draft.loading = false draft.loading = false
draft.content = x.data draft.content = content
}), }),
) )
if (!content) return
touchContent(path, approxBytes(content))
evictContent(new Set([path]))
}) })
.catch((e) => { .catch((e) => {
if (scope() !== directory) return if (scope() !== directory) return
@@ -517,7 +580,7 @@ export const { use: useFile, provider: FileProvider } = createSimpleContext({
) )
showToast({ showToast({
variant: "error", variant: "error",
title: "Failed to list files", title: language.t("toast.file.listFailed.title"),
description: e.message, description: e.message,
}) })
}) })
@@ -571,6 +634,18 @@ export const { use: useFile, provider: FileProvider } = createSimpleContext({
} }
const kind = event.properties.event const kind = event.properties.event
if (kind === "change") {
const dir = (() => {
if (path === "") return ""
const node = tree.node[path]
if (node?.type !== "directory") return
return path
})()
if (dir === undefined) return
if (!tree.dir[dir]?.loaded) return
listDir(dir, { force: true })
return
}
if (kind !== "add" && kind !== "unlink") return if (kind !== "add" && kind !== "unlink") return
const parent = path.split("/").slice(0, -1).join("/") const parent = path.split("/").slice(0, -1).join("/")
@@ -579,7 +654,18 @@ export const { use: useFile, provider: FileProvider } = createSimpleContext({
listDir(parent, { force: true }) listDir(parent, { force: true })
}) })
const get = (input: string) => store.file[normalize(input)] const get = (input: string) => {
const path = normalize(input)
const file = store.file[path]
const content = file?.content
if (!content) return file
if (contentLru.has(path)) {
touchContent(path)
return file
}
touchContent(path, approxBytes(content))
return file
}
const scrollTop = (input: string) => view().scrollTop(normalize(input)) const scrollTop = (input: string) => view().scrollTop(normalize(input))
const scrollLeft = (input: string) => view().scrollLeft(normalize(input)) const scrollLeft = (input: string) => view().scrollLeft(normalize(input))
@@ -633,10 +719,8 @@ export const { use: useFile, provider: FileProvider } = createSimpleContext({
setScrollLeft, setScrollLeft,
selectedLines, selectedLines,
setSelectedLines, setSelectedLines,
searchFiles: (query: string) => searchFiles: (query: string) => search(query, "false"),
sdk.client.find.files({ query, dirs: "false" }).then((x) => (x.data ?? []).map(normalize)), searchFilesAndDirectories: (query: string) => search(query, "true"),
searchFilesAndDirectories: (query: string) =>
sdk.client.find.files({ query, dirs: "true" }).then((x) => (x.data ?? []).map(normalize)),
} }
}, },
}) })
+284 -81
View File
@@ -23,7 +23,7 @@ import { createStore, produce, reconcile, type SetStoreFunction, type Store } fr
import { Binary } from "@opencode-ai/util/binary" import { Binary } from "@opencode-ai/util/binary"
import { retry } from "@opencode-ai/util/retry" import { retry } from "@opencode-ai/util/retry"
import { useGlobalSDK } from "./global-sdk" import { useGlobalSDK } from "./global-sdk"
import { ErrorPage, type InitError } from "../pages/error" import type { InitError } from "../pages/error"
import { import {
batch, batch,
createContext, createContext,
@@ -188,7 +188,74 @@ function createGlobalSync() {
config: {}, config: {},
reload: undefined, reload: undefined,
}) })
let bootstrapQueue: string[] = []
const queued = new Set<string>()
let root = false
let running = false
let timer: ReturnType<typeof setTimeout> | undefined
const paused = () => untrack(() => globalStore.reload) !== undefined
const tick = () => new Promise<void>((resolve) => setTimeout(resolve, 0))
const take = (count: number) => {
if (queued.size === 0) return [] as string[]
const items: string[] = []
for (const item of queued) {
queued.delete(item)
items.push(item)
if (items.length >= count) break
}
return items
}
const schedule = () => {
if (timer) return
timer = setTimeout(() => {
timer = undefined
void drain()
}, 0)
}
const push = (directory: string) => {
if (!directory) return
queued.add(directory)
if (paused()) return
schedule()
}
const refresh = () => {
root = true
if (paused()) return
schedule()
}
async function drain() {
if (running) return
running = true
try {
while (true) {
if (paused()) return
if (root) {
root = false
await bootstrap()
await tick()
continue
}
const dirs = take(2)
if (dirs.length === 0) return
await Promise.all(dirs.map((dir) => bootstrapInstance(dir)))
await tick()
}
} finally {
running = false
if (paused()) return
if (root || queued.size) schedule()
}
}
createEffect(() => { createEffect(() => {
if (!projectCacheReady()) return if (!projectCacheReady()) return
@@ -210,14 +277,8 @@ function createGlobalSync() {
createEffect(() => { createEffect(() => {
if (globalStore.reload !== "complete") return if (globalStore.reload !== "complete") return
if (bootstrapQueue.length) {
for (const directory of bootstrapQueue) {
bootstrapInstance(directory)
}
bootstrap()
}
bootstrapQueue = []
setGlobalStore("reload", undefined) setGlobalStore("reload", undefined)
refresh()
}) })
const children: Record<string, [Store<State>, SetStoreFunction<State>]> = {} const children: Record<string, [Store<State>, SetStoreFunction<State>]> = {}
@@ -225,6 +286,65 @@ function createGlobalSync() {
const sessionLoads = new Map<string, Promise<void>>() const sessionLoads = new Map<string, Promise<void>>()
const sessionMeta = new Map<string, { limit: number }>() const sessionMeta = new Map<string, { limit: number }>()
const sessionRecentWindow = 4 * 60 * 60 * 1000
const sessionRecentLimit = 50
function sessionUpdatedAt(session: Session) {
return session.time.updated ?? session.time.created
}
function compareSessionRecent(a: Session, b: Session) {
const aUpdated = sessionUpdatedAt(a)
const bUpdated = sessionUpdatedAt(b)
if (aUpdated !== bUpdated) return bUpdated - aUpdated
return a.id.localeCompare(b.id)
}
function takeRecentSessions(sessions: Session[], limit: number, cutoff: number) {
if (limit <= 0) return [] as Session[]
const selected: Session[] = []
const seen = new Set<string>()
for (const session of sessions) {
if (!session?.id) continue
if (seen.has(session.id)) continue
seen.add(session.id)
if (sessionUpdatedAt(session) <= cutoff) continue
const index = selected.findIndex((x) => compareSessionRecent(session, x) < 0)
if (index === -1) selected.push(session)
if (index !== -1) selected.splice(index, 0, session)
if (selected.length > limit) selected.pop()
}
return selected
}
function trimSessions(input: Session[], options: { limit: number; permission: Record<string, PermissionRequest[]> }) {
const limit = Math.max(0, options.limit)
const cutoff = Date.now() - sessionRecentWindow
const all = input
.filter((s) => !!s?.id)
.filter((s) => !s.time?.archived)
.sort((a, b) => a.id.localeCompare(b.id))
const roots = all.filter((s) => !s.parentID)
const children = all.filter((s) => !!s.parentID)
const base = roots.slice(0, limit)
const recent = takeRecentSessions(roots.slice(limit), sessionRecentLimit, cutoff)
const keepRoots = [...base, ...recent]
const keepRootIds = new Set(keepRoots.map((s) => s.id))
const keepChildren = children.filter((s) => {
if (s.parentID && keepRootIds.has(s.parentID)) return true
const perms = options.permission[s.id] ?? []
if (perms.length > 0) return true
return sessionUpdatedAt(s) > cutoff
})
return [...keepRoots, ...keepChildren].sort((a, b) => a.id.localeCompare(b.id))
}
function ensureChild(directory: string) { function ensureChild(directory: string) {
if (!directory) console.error("No directory provided") if (!directory) console.error("No directory provided")
if (!children[directory]) { if (!children[directory]) {
@@ -323,7 +443,13 @@ function createGlobalSync() {
const [store, setStore] = child(directory, { bootstrap: false }) const [store, setStore] = child(directory, { bootstrap: false })
const meta = sessionMeta.get(directory) const meta = sessionMeta.get(directory)
if (meta && meta.limit >= store.limit) return if (meta && meta.limit >= store.limit) {
const next = trimSessions(store.session, { limit: store.limit, permission: store.permission })
if (next.length !== store.session.length) {
setStore("session", reconcile(next, { key: "id" }))
}
return
}
const promise = globalSDK.client.session const promise = globalSDK.client.session
.list({ directory, roots: true }) .list({ directory, roots: true })
@@ -337,21 +463,9 @@ function createGlobalSync() {
// a request is in-flight still get the expanded result. // a request is in-flight still get the expanded result.
const limit = store.limit const limit = store.limit
const sandboxWorkspace = globalStore.project.some((p) => (p.sandboxes ?? []).includes(directory)) const children = store.session.filter((s) => !!s.parentID)
if (sandboxWorkspace) { const sessions = trimSessions([...nonArchived, ...children], { limit, permission: store.permission })
setStore("sessionTotal", nonArchived.length)
setStore("session", reconcile(nonArchived, { key: "id" }))
sessionMeta.set(directory, { limit })
return
}
const fourHoursAgo = Date.now() - 4 * 60 * 60 * 1000
// Include up to the limit, plus any updated in the last 4 hours
const sessions = nonArchived.filter((s, i) => {
if (i < limit) return true
const updated = new Date(s.time?.updated ?? s.time?.created).getTime()
return updated > fourHoursAgo
})
// Store total session count (used for "load more" pagination) // Store total session count (used for "load more" pagination)
setStore("sessionTotal", nonArchived.length) setStore("sessionTotal", nonArchived.length)
setStore("session", reconcile(sessions, { key: "id" })) setStore("session", reconcile(sessions, { key: "id" }))
@@ -493,6 +607,37 @@ function createGlobalSync() {
return promise return promise
} }
function purgeMessageParts(setStore: SetStoreFunction<State>, messageID: string | undefined) {
if (!messageID) return
setStore(
produce((draft) => {
delete draft.part[messageID]
}),
)
}
function purgeSessionData(store: Store<State>, setStore: SetStoreFunction<State>, sessionID: string | undefined) {
if (!sessionID) return
const messages = store.message[sessionID]
const messageIDs = (messages ?? []).map((m) => m.id).filter((id): id is string => !!id)
setStore(
produce((draft) => {
delete draft.message[sessionID]
delete draft.session_diff[sessionID]
delete draft.todo[sessionID]
delete draft.permission[sessionID]
delete draft.question[sessionID]
delete draft.session_status[sessionID]
for (const messageID of messageIDs) {
delete draft.part[messageID]
}
}),
)
}
const unsub = globalSDK.event.listen((e) => { const unsub = globalSDK.event.listen((e) => {
const directory = e.name const directory = e.name
const event = e.details const event = e.details
@@ -500,9 +645,8 @@ function createGlobalSync() {
if (directory === "global") { if (directory === "global") {
switch (event?.type) { switch (event?.type) {
case "global.disposed": { case "global.disposed": {
if (globalStore.reload) return refresh()
bootstrap() return
break
} }
case "project.updated": { case "project.updated": {
const result = Binary.search(globalStore.project, event.properties.id, (s) => s.id) const result = Binary.search(globalStore.project, event.properties.id, (s) => s.id)
@@ -526,35 +670,66 @@ function createGlobalSync() {
if (!existing) return if (!existing) return
const [store, setStore] = existing const [store, setStore] = existing
switch (event.type) {
case "server.instance.disposed": { const cleanupSessionCaches = (sessionID: string) => {
if (globalStore.reload) { if (!sessionID) return
bootstrapQueue.push(directory)
return const hasAny =
} store.message[sessionID] !== undefined ||
bootstrapInstance(directory) store.session_diff[sessionID] !== undefined ||
break store.todo[sessionID] !== undefined ||
} store.permission[sessionID] !== undefined ||
case "session.created": { store.question[sessionID] !== undefined ||
const result = Binary.search(store.session, event.properties.info.id, (s) => s.id) store.session_status[sessionID] !== undefined
if (result.found) {
setStore("session", result.index, reconcile(event.properties.info)) if (!hasAny) return
break
}
setStore( setStore(
"session",
produce((draft) => { produce((draft) => {
draft.splice(result.index, 0, event.properties.info) const messages = draft.message[sessionID]
if (messages) {
for (const message of messages) {
const id = message?.id
if (!id) continue
delete draft.part[id]
}
}
delete draft.message[sessionID]
delete draft.session_diff[sessionID]
delete draft.todo[sessionID]
delete draft.permission[sessionID]
delete draft.question[sessionID]
delete draft.session_status[sessionID]
}), }),
) )
if (!event.properties.info.parentID) { }
setStore("sessionTotal", store.sessionTotal + 1)
switch (event.type) {
case "server.instance.disposed": {
push(directory)
return
}
case "session.created": {
const info = event.properties.info
const result = Binary.search(store.session, info.id, (s) => s.id)
if (result.found) {
setStore("session", result.index, reconcile(info))
break
}
const next = store.session.slice()
next.splice(result.index, 0, info)
const trimmed = trimSessions(next, { limit: store.limit, permission: store.permission })
setStore("session", reconcile(trimmed, { key: "id" }))
if (!info.parentID) {
setStore("sessionTotal", (value) => value + 1)
} }
break break
} }
case "session.updated": { case "session.updated": {
const result = Binary.search(store.session, event.properties.info.id, (s) => s.id) const info = event.properties.info
if (event.properties.info.time.archived) { const result = Binary.search(store.session, info.id, (s) => s.id)
if (info.time.archived) {
if (result.found) { if (result.found) {
setStore( setStore(
"session", "session",
@@ -563,24 +738,24 @@ function createGlobalSync() {
}), }),
) )
} }
if (event.properties.info.parentID) break cleanupSessionCaches(info.id)
if (info.parentID) break
setStore("sessionTotal", (value) => Math.max(0, value - 1)) setStore("sessionTotal", (value) => Math.max(0, value - 1))
break break
} }
if (result.found) { if (result.found) {
setStore("session", result.index, reconcile(event.properties.info)) setStore("session", result.index, reconcile(info))
break break
} }
setStore( const next = store.session.slice()
"session", next.splice(result.index, 0, info)
produce((draft) => { const trimmed = trimSessions(next, { limit: store.limit, permission: store.permission })
draft.splice(result.index, 0, event.properties.info) setStore("session", reconcile(trimmed, { key: "id" }))
}),
)
break break
} }
case "session.deleted": { case "session.deleted": {
const result = Binary.search(store.session, event.properties.info.id, (s) => s.id) const sessionID = event.properties.info.id
const result = Binary.search(store.session, sessionID, (s) => s.id)
if (result.found) { if (result.found) {
setStore( setStore(
"session", "session",
@@ -589,6 +764,7 @@ function createGlobalSync() {
}), }),
) )
} }
cleanupSessionCaches(sessionID)
if (event.properties.info.parentID) break if (event.properties.info.parentID) break
setStore("sessionTotal", (value) => Math.max(0, value - 1)) setStore("sessionTotal", (value) => Math.max(0, value - 1))
break break
@@ -624,18 +800,22 @@ function createGlobalSync() {
break break
} }
case "message.removed": { case "message.removed": {
const messages = store.message[event.properties.sessionID] const sessionID = event.properties.sessionID
if (!messages) break const messageID = event.properties.messageID
const result = Binary.search(messages, event.properties.messageID, (m) => m.id)
if (result.found) {
setStore( setStore(
"message",
event.properties.sessionID,
produce((draft) => { produce((draft) => {
draft.splice(result.index, 1) const messages = draft.message[sessionID]
if (messages) {
const result = Binary.search(messages, messageID, (m) => m.id)
if (result.found) {
messages.splice(result.index, 1)
}
}
delete draft.part[messageID]
}), }),
) )
}
break break
} }
case "message.part.updated": { case "message.part.updated": {
@@ -660,15 +840,19 @@ function createGlobalSync() {
break break
} }
case "message.part.removed": { case "message.part.removed": {
const parts = store.part[event.properties.messageID] const messageID = event.properties.messageID
const parts = store.part[messageID]
if (!parts) break if (!parts) break
const result = Binary.search(parts, event.properties.partID, (p) => p.id) const result = Binary.search(parts, event.properties.partID, (p) => p.id)
if (result.found) { if (result.found) {
setStore( setStore(
"part",
event.properties.messageID,
produce((draft) => { produce((draft) => {
draft.splice(result.index, 1) const list = draft.part[messageID]
if (!list) return
const next = Binary.search(list, event.properties.partID, (p) => p.id)
if (!next.found) return
list.splice(next.index, 1)
if (list.length === 0) delete draft.part[messageID]
}), }),
) )
} }
@@ -765,6 +949,10 @@ function createGlobalSync() {
} }
}) })
onCleanup(unsub) onCleanup(unsub)
onCleanup(() => {
if (!timer) return
clearTimeout(timer)
})
async function bootstrap() { async function bootstrap() {
const health = await globalSDK.client.global const health = await globalSDK.client.global
@@ -772,18 +960,23 @@ function createGlobalSync() {
.then((x) => x.data) .then((x) => x.data)
.catch(() => undefined) .catch(() => undefined)
if (!health?.healthy) { if (!health?.healthy) {
setGlobalStore("error", new Error(language.t("error.globalSync.connectFailed", { url: globalSDK.url }))) showToast({
variant: "error",
title: language.t("dialog.server.add.error"),
description: language.t("error.globalSync.connectFailed", { url: globalSDK.url }),
})
setGlobalStore("ready", true)
return return
} }
return Promise.all([ const tasks = [
retry(() => retry(() =>
globalSDK.client.path.get().then((x) => { globalSDK.client.path.get().then((x) => {
setGlobalStore("path", x.data!) setGlobalStore("path", x.data!)
}), }),
), ),
retry(() => retry(() =>
globalSDK.client.config.get().then((x) => { globalSDK.client.global.config.get().then((x) => {
setGlobalStore("config", x.data!) setGlobalStore("config", x.data!)
}), }),
), ),
@@ -807,9 +1000,22 @@ function createGlobalSync() {
setGlobalStore("provider_auth", x.data ?? {}) setGlobalStore("provider_auth", x.data ?? {})
}), }),
), ),
]) ]
.then(() => setGlobalStore("ready", true))
.catch((e) => setGlobalStore("error", e)) const results = await Promise.allSettled(tasks)
const errors = results.filter((r): r is PromiseRejectedResult => r.status === "rejected").map((r) => r.reason)
if (errors.length) {
const message = errors[0] instanceof Error ? errors[0].message : String(errors[0])
const more = errors.length > 1 ? ` (+${errors.length - 1} more)` : ""
showToast({
variant: "error",
title: language.t("common.requestFailed"),
description: message + more,
})
}
setGlobalStore("ready", true)
} }
onMount(() => { onMount(() => {
@@ -853,13 +1059,13 @@ function createGlobalSync() {
}, },
child, child,
bootstrap, bootstrap,
updateConfig: async (config: Config) => { updateConfig: (config: Config) => {
setGlobalStore("reload", "pending") setGlobalStore("reload", "pending")
const response = await globalSDK.client.config.update({ config }) return globalSDK.client.global.config.update({ config }).finally(() => {
setTimeout(() => { setTimeout(() => {
setGlobalStore("reload", "complete") setGlobalStore("reload", "complete")
}, 1000) }, 1000)
return response })
}, },
project: { project: {
loadSessions, loadSessions,
@@ -875,9 +1081,6 @@ export function GlobalSyncProvider(props: ParentProps) {
const value = createGlobalSync() const value = createGlobalSync()
return ( return (
<Switch> <Switch>
<Match when={value.error}>
<ErrorPage error={value.error} />
</Match>
<Match when={value.ready}> <Match when={value.ready}>
<GlobalSyncContext.Provider value={value}>{props.children}</GlobalSyncContext.Provider> <GlobalSyncContext.Provider value={value}>{props.children}</GlobalSyncContext.Provider>
</Match> </Match>
+225
View File
@@ -0,0 +1,225 @@
import { createEffect, createSignal, onCleanup } from "solid-js"
import { createStore } from "solid-js/store"
import { createSimpleContext } from "@opencode-ai/ui/context"
import { useDialog } from "@opencode-ai/ui/context/dialog"
import { usePlatform } from "@/context/platform"
import { useSettings } from "@/context/settings"
import { persisted } from "@/utils/persist"
import { DialogReleaseNotes, type Highlight } from "@/components/dialog-release-notes"
const CHANGELOG_URL = "https://opencode.ai/changelog.json"
type Store = {
version?: string
}
type ParsedRelease = {
tag?: string
highlights: Highlight[]
}
function isRecord(value: unknown): value is Record<string, unknown> {
return typeof value === "object" && value !== null && !Array.isArray(value)
}
function getText(value: unknown): string | undefined {
if (typeof value === "string") {
const text = value.trim()
return text.length > 0 ? text : undefined
}
if (typeof value === "number") return String(value)
return
}
function normalizeVersion(value: string | undefined) {
const text = value?.trim()
if (!text) return
return text.startsWith("v") || text.startsWith("V") ? text.slice(1) : text
}
function parseMedia(value: unknown, alt: string): Highlight["media"] | undefined {
if (!isRecord(value)) return
const type = getText(value.type)?.toLowerCase()
const src = getText(value.src) ?? getText(value.url)
if (!src) return
if (type !== "image" && type !== "video") return
return { type, src, alt }
}
function parseHighlight(value: unknown): Highlight | undefined {
if (!isRecord(value)) return
const title = getText(value.title)
if (!title) return
const description = getText(value.description) ?? getText(value.shortDescription)
if (!description) return
const media = parseMedia(value.media, title)
return { title, description, media }
}
function parseRelease(value: unknown): ParsedRelease | undefined {
if (!isRecord(value)) return
const tag = getText(value.tag) ?? getText(value.tag_name) ?? getText(value.name)
if (!Array.isArray(value.highlights)) {
return { tag, highlights: [] }
}
const highlights = value.highlights.flatMap((group) => {
if (!isRecord(group)) return []
const source = getText(group.source)
if (!source) return []
if (!source.toLowerCase().includes("desktop")) return []
if (Array.isArray(group.items)) {
return group.items.map((item) => parseHighlight(item)).filter((item): item is Highlight => item !== undefined)
}
const item = parseHighlight(group)
if (!item) return []
return [item]
})
return { tag, highlights }
}
function parseChangelog(value: unknown): ParsedRelease[] | undefined {
if (Array.isArray(value)) {
return value.map(parseRelease).filter((release): release is ParsedRelease => release !== undefined)
}
if (!isRecord(value)) return
if (!Array.isArray(value.releases)) return
return value.releases.map(parseRelease).filter((release): release is ParsedRelease => release !== undefined)
}
function sliceHighlights(input: { releases: ParsedRelease[]; current?: string; previous?: string }) {
const current = normalizeVersion(input.current)
const previous = normalizeVersion(input.previous)
const releases = input.releases
const start = (() => {
if (!current) return 0
const index = releases.findIndex((release) => normalizeVersion(release.tag) === current)
return index === -1 ? 0 : index
})()
const end = (() => {
if (!previous) return releases.length
const index = releases.findIndex((release, i) => i >= start && normalizeVersion(release.tag) === previous)
return index === -1 ? releases.length : index
})()
const highlights = releases.slice(start, end).flatMap((release) => release.highlights)
const seen = new Set<string>()
const unique = highlights.filter((highlight) => {
const key = [highlight.title, highlight.description, highlight.media?.type ?? "", highlight.media?.src ?? ""].join(
"\n",
)
if (seen.has(key)) return false
seen.add(key)
return true
})
return unique.slice(0, 5)
}
export const { use: useHighlights, provider: HighlightsProvider } = createSimpleContext({
name: "Highlights",
gate: false,
init: () => {
const platform = usePlatform()
const dialog = useDialog()
const settings = useSettings()
const [store, setStore, _, ready] = persisted("highlights.v1", createStore<Store>({ version: undefined }))
const [from, setFrom] = createSignal<string | undefined>(undefined)
const [to, setTo] = createSignal<string | undefined>(undefined)
const [timer, setTimer] = createSignal<ReturnType<typeof setTimeout> | undefined>(undefined)
const state = { started: false }
const markSeen = () => {
if (!platform.version) return
setStore("version", platform.version)
}
createEffect(() => {
if (state.started) return
if (!ready()) return
if (!settings.ready()) return
if (!platform.version) return
state.started = true
const previous = store.version
if (!previous) {
setStore("version", platform.version)
return
}
if (previous === platform.version) return
setFrom(previous)
setTo(platform.version)
if (!settings.general.releaseNotes()) {
markSeen()
return
}
const fetcher = platform.fetch ?? fetch
const controller = new AbortController()
onCleanup(() => {
controller.abort()
const id = timer()
if (id === undefined) return
clearTimeout(id)
})
fetcher(CHANGELOG_URL, {
signal: controller.signal,
headers: { Accept: "application/json" },
})
.then((response) => (response.ok ? (response.json() as Promise<unknown>) : undefined))
.then((json) => {
if (!json) return
const releases = parseChangelog(json)
if (!releases) return
if (releases.length === 0) return
const highlights = sliceHighlights({
releases,
current: platform.version,
previous,
})
if (controller.signal.aborted) return
if (highlights.length === 0) {
markSeen()
return
}
const timer = setTimeout(() => {
markSeen()
dialog.show(() => <DialogReleaseNotes highlights={highlights} />)
}, 500)
setTimer(timer)
})
.catch(() => undefined)
})
return {
ready,
from,
to,
get last() {
return store.version
},
markSeen,
}
},
})
+39 -2
View File
@@ -17,6 +17,7 @@ import { dict as ru } from "@/i18n/ru"
import { dict as ar } from "@/i18n/ar" import { dict as ar } from "@/i18n/ar"
import { dict as no } from "@/i18n/no" import { dict as no } from "@/i18n/no"
import { dict as br } from "@/i18n/br" import { dict as br } from "@/i18n/br"
import { dict as th } from "@/i18n/th"
import { dict as uiEn } from "@opencode-ai/ui/i18n/en" import { dict as uiEn } from "@opencode-ai/ui/i18n/en"
import { dict as uiZh } from "@opencode-ai/ui/i18n/zh" import { dict as uiZh } from "@opencode-ai/ui/i18n/zh"
import { dict as uiZht } from "@opencode-ai/ui/i18n/zht" import { dict as uiZht } from "@opencode-ai/ui/i18n/zht"
@@ -31,13 +32,45 @@ import { dict as uiRu } from "@opencode-ai/ui/i18n/ru"
import { dict as uiAr } from "@opencode-ai/ui/i18n/ar" import { dict as uiAr } from "@opencode-ai/ui/i18n/ar"
import { dict as uiNo } from "@opencode-ai/ui/i18n/no" import { dict as uiNo } from "@opencode-ai/ui/i18n/no"
import { dict as uiBr } from "@opencode-ai/ui/i18n/br" import { dict as uiBr } from "@opencode-ai/ui/i18n/br"
import { dict as uiTh } from "@opencode-ai/ui/i18n/th"
export type Locale = "en" | "zh" | "zht" | "ko" | "de" | "es" | "fr" | "da" | "ja" | "pl" | "ru" | "ar" | "no" | "br" export type Locale =
| "en"
| "zh"
| "zht"
| "ko"
| "de"
| "es"
| "fr"
| "da"
| "ja"
| "pl"
| "ru"
| "ar"
| "no"
| "br"
| "th"
type RawDictionary = typeof en & typeof uiEn type RawDictionary = typeof en & typeof uiEn
type Dictionary = i18n.Flatten<RawDictionary> type Dictionary = i18n.Flatten<RawDictionary>
const LOCALES: readonly Locale[] = ["en", "zh", "zht", "ko", "de", "es", "fr", "da", "ja", "pl", "ru", "ar", "no", "br"] const LOCALES: readonly Locale[] = [
"en",
"zh",
"zht",
"ko",
"de",
"es",
"fr",
"da",
"ja",
"pl",
"ru",
"ar",
"no",
"br",
"th",
]
function detectLocale(): Locale { function detectLocale(): Locale {
if (typeof navigator !== "object") return "en" if (typeof navigator !== "object") return "en"
@@ -65,6 +98,7 @@ function detectLocale(): Locale {
) )
return "no" return "no"
if (language.toLowerCase().startsWith("pt")) return "br" if (language.toLowerCase().startsWith("pt")) return "br"
if (language.toLowerCase().startsWith("th")) return "th"
} }
return "en" return "en"
@@ -94,6 +128,7 @@ export const { use: useLanguage, provider: LanguageProvider } = createSimpleCont
if (store.locale === "ar") return "ar" if (store.locale === "ar") return "ar"
if (store.locale === "no") return "no" if (store.locale === "no") return "no"
if (store.locale === "br") return "br" if (store.locale === "br") return "br"
if (store.locale === "th") return "th"
return "en" return "en"
}) })
@@ -118,6 +153,7 @@ export const { use: useLanguage, provider: LanguageProvider } = createSimpleCont
if (locale() === "ar") return { ...base, ...i18n.flatten({ ...ar, ...uiAr }) } if (locale() === "ar") return { ...base, ...i18n.flatten({ ...ar, ...uiAr }) }
if (locale() === "no") return { ...base, ...i18n.flatten({ ...no, ...uiNo }) } if (locale() === "no") return { ...base, ...i18n.flatten({ ...no, ...uiNo }) }
if (locale() === "br") return { ...base, ...i18n.flatten({ ...br, ...uiBr }) } if (locale() === "br") return { ...base, ...i18n.flatten({ ...br, ...uiBr }) }
if (locale() === "th") return { ...base, ...i18n.flatten({ ...th, ...uiTh }) }
return { ...base, ...i18n.flatten({ ...ko, ...uiKo }) } return { ...base, ...i18n.flatten({ ...ko, ...uiKo }) }
}) })
@@ -138,6 +174,7 @@ export const { use: useLanguage, provider: LanguageProvider } = createSimpleCont
ar: "language.ar", ar: "language.ar",
no: "language.no", no: "language.no",
br: "language.br", br: "language.br",
th: "language.th",
} }
const label = (value: Locale) => t(labelKey[value]) const label = (value: Locale) => t(labelKey[value])
+50 -52
View File
@@ -51,16 +51,37 @@ export const { use: useLayout, provider: LayoutProvider } = createSimpleContext(
const migrate = (value: unknown) => { const migrate = (value: unknown) => {
if (!isRecord(value)) return value if (!isRecord(value)) return value
const sidebar = value.sidebar const sidebar = value.sidebar
if (!isRecord(sidebar)) return value const migratedSidebar = (() => {
if (typeof sidebar.workspaces !== "boolean") return value if (!isRecord(sidebar)) return sidebar
if (typeof sidebar.workspaces !== "boolean") return sidebar
return { return {
...value,
sidebar: {
...sidebar, ...sidebar,
workspaces: {}, workspaces: {},
workspacesDefault: sidebar.workspaces, workspacesDefault: sidebar.workspaces,
}, }
})()
const fileTree = value.fileTree
const migratedFileTree = (() => {
if (!isRecord(fileTree)) return fileTree
if (fileTree.tab === "changes" || fileTree.tab === "all") return fileTree
const width = typeof fileTree.width === "number" ? fileTree.width : 344
return {
...fileTree,
opened: true,
width: width === 260 ? 344 : width,
tab: "changes",
}
})()
if (migratedSidebar === sidebar && migratedFileTree === fileTree) return value
return {
...value,
sidebar: migratedSidebar,
fileTree: migratedFileTree,
} }
} }
@@ -80,11 +101,11 @@ export const { use: useLayout, provider: LayoutProvider } = createSimpleContext(
}, },
review: { review: {
diffStyle: "split" as ReviewDiffStyle, diffStyle: "split" as ReviewDiffStyle,
panelOpened: true,
}, },
fileTree: { fileTree: {
opened: false, opened: true,
width: 260, width: 344,
tab: "changes" as "changes" | "all",
}, },
session: { session: {
width: 600, width: 600,
@@ -454,32 +475,40 @@ export const { use: useLayout, provider: LayoutProvider } = createSimpleContext(
}, },
}, },
fileTree: { fileTree: {
opened: createMemo(() => store.fileTree?.opened ?? false), opened: createMemo(() => store.fileTree?.opened ?? true),
width: createMemo(() => store.fileTree?.width ?? 260), width: createMemo(() => store.fileTree?.width ?? 344),
tab: createMemo(() => store.fileTree?.tab ?? "changes"),
setTab(tab: "changes" | "all") {
if (!store.fileTree) {
setStore("fileTree", { opened: true, width: 344, tab })
return
}
setStore("fileTree", "tab", tab)
},
open() { open() {
if (!store.fileTree) { if (!store.fileTree) {
setStore("fileTree", { opened: true, width: 260 }) setStore("fileTree", { opened: true, width: 344, tab: "changes" })
return return
} }
setStore("fileTree", "opened", true) setStore("fileTree", "opened", true)
}, },
close() { close() {
if (!store.fileTree) { if (!store.fileTree) {
setStore("fileTree", { opened: false, width: 260 }) setStore("fileTree", { opened: false, width: 344, tab: "changes" })
return return
} }
setStore("fileTree", "opened", false) setStore("fileTree", "opened", false)
}, },
toggle() { toggle() {
if (!store.fileTree) { if (!store.fileTree) {
setStore("fileTree", { opened: true, width: 260 }) setStore("fileTree", { opened: true, width: 344, tab: "changes" })
return return
} }
setStore("fileTree", "opened", (x) => !x) setStore("fileTree", "opened", (x) => !x)
}, },
resize(width: number) { resize(width: number) {
if (!store.fileTree) { if (!store.fileTree) {
setStore("fileTree", { opened: true, width }) setStore("fileTree", { opened: true, width, tab: "changes" })
return return
} }
setStore("fileTree", "width", width) setStore("fileTree", "width", width)
@@ -526,7 +555,6 @@ export const { use: useLayout, provider: LayoutProvider } = createSimpleContext(
const s = createMemo(() => store.sessionView[key()] ?? { scroll: {} }) const s = createMemo(() => store.sessionView[key()] ?? { scroll: {} })
const terminalOpened = createMemo(() => store.terminal?.opened ?? false) const terminalOpened = createMemo(() => store.terminal?.opened ?? false)
const reviewPanelOpened = createMemo(() => store.review?.panelOpened ?? true)
function setTerminalOpened(next: boolean) { function setTerminalOpened(next: boolean) {
const current = store.terminal const current = store.terminal
@@ -540,18 +568,6 @@ export const { use: useLayout, provider: LayoutProvider } = createSimpleContext(
setStore("terminal", "opened", next) setStore("terminal", "opened", next)
} }
function setReviewPanelOpened(next: boolean) {
const current = store.review
if (!current) {
setStore("review", { diffStyle: "split" as ReviewDiffStyle, panelOpened: next })
return
}
const value = current.panelOpened ?? true
if (value === next) return
setStore("review", "panelOpened", next)
}
return { return {
scroll(tab: string) { scroll(tab: string) {
return scroll.scroll(key(), tab) return scroll.scroll(key(), tab)
@@ -571,18 +587,6 @@ export const { use: useLayout, provider: LayoutProvider } = createSimpleContext(
setTerminalOpened(!terminalOpened()) setTerminalOpened(!terminalOpened())
}, },
}, },
reviewPanel: {
opened: reviewPanelOpened,
open() {
setReviewPanelOpened(true)
},
close() {
setReviewPanelOpened(false)
},
toggle() {
setReviewPanelOpened(!reviewPanelOpened())
},
},
review: { review: {
open: createMemo(() => s().reviewOpen), open: createMemo(() => s().reviewOpen),
setOpen(open: string[]) { setOpen(open: string[]) {
@@ -620,10 +624,11 @@ export const { use: useLayout, provider: LayoutProvider } = createSimpleContext(
const tabs = createMemo(() => store.sessionTabs[key()] ?? { all: [] }) const tabs = createMemo(() => store.sessionTabs[key()] ?? { all: [] })
return { return {
tabs, tabs,
active: createMemo(() => tabs().active), active: createMemo(() => (tabs().active === "review" ? undefined : tabs().active)),
all: createMemo(() => tabs().all), all: createMemo(() => tabs().all.filter((tab) => tab !== "review")),
setActive(tab: string | undefined) { setActive(tab: string | undefined) {
const session = key() const session = key()
if (tab === "review") return
if (!store.sessionTabs[session]) { if (!store.sessionTabs[session]) {
setStore("sessionTabs", session, { all: [], active: tab }) setStore("sessionTabs", session, { all: [], active: tab })
} else { } else {
@@ -632,25 +637,18 @@ export const { use: useLayout, provider: LayoutProvider } = createSimpleContext(
}, },
setAll(all: string[]) { setAll(all: string[]) {
const session = key() const session = key()
const next = all.filter((tab) => tab !== "review")
if (!store.sessionTabs[session]) { if (!store.sessionTabs[session]) {
setStore("sessionTabs", session, { all, active: undefined }) setStore("sessionTabs", session, { all: next, active: undefined })
} else { } else {
setStore("sessionTabs", session, "all", all) setStore("sessionTabs", session, "all", next)
} }
}, },
async open(tab: string) { async open(tab: string) {
if (tab === "review") return
const session = key() const session = key()
const current = store.sessionTabs[session] ?? { all: [] } const current = store.sessionTabs[session] ?? { all: [] }
if (tab === "review") {
if (!store.sessionTabs[session]) {
setStore("sessionTabs", session, { all: [], active: tab })
return
}
setStore("sessionTabs", session, "active", tab)
return
}
if (tab === "context") { if (tab === "context") {
const all = [tab, ...current.all.filter((x) => x !== tab)] const all = [tab, ...current.all.filter((x) => x !== tab)]
if (!store.sessionTabs[session]) { if (!store.sessionTabs[session]) {
+2 -266
View File
@@ -1,47 +1,20 @@
import { createStore, produce, reconcile } from "solid-js/store" import { createStore } from "solid-js/store"
import { batch, createEffect, createMemo, onCleanup } from "solid-js" import { batch, createMemo } from "solid-js"
import type { FileContent, FileNode, Model, Provider, File as FileStatus } from "@opencode-ai/sdk/v2"
import { createSimpleContext } from "@opencode-ai/ui/context" import { createSimpleContext } from "@opencode-ai/ui/context"
import { useSDK } from "./sdk" import { useSDK } from "./sdk"
import { useSync } from "./sync" import { useSync } from "./sync"
import { base64Encode } from "@opencode-ai/util/encode" import { base64Encode } from "@opencode-ai/util/encode"
import { useProviders } from "@/hooks/use-providers" import { useProviders } from "@/hooks/use-providers"
import { useModels } from "@/context/models" import { useModels } from "@/context/models"
import { showToast } from "@opencode-ai/ui/toast"
import { useLanguage } from "@/context/language"
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
latest?: boolean
}
export type ModelKey = { providerID: string; modelID: string } export type ModelKey = { providerID: string; modelID: string }
export type FileContext = { type: "file"; path: string; selection?: TextSelection }
export type ContextItem = FileContext
export const { use: useLocal, provider: LocalProvider } = createSimpleContext({ export const { use: useLocal, provider: LocalProvider } = createSimpleContext({
name: "Local", name: "Local",
init: () => { init: () => {
const sdk = useSDK() const sdk = useSDK()
const sync = useSync() const sync = useSync()
const providers = useProviders() const providers = useProviders()
const language = useLanguage()
function isModelValid(model: ModelKey) { function isModelValid(model: ModelKey) {
const provider = providers.all().find((x) => x.id === model.providerID) const provider = providers.all().find((x) => x.id === model.providerID)
@@ -246,247 +219,10 @@ export const { use: useLocal, provider: LocalProvider } = createSimpleContext({
} }
})() })()
const file = (() => {
const [store, setStore] = createStore<{
node: Record<string, LocalFile>
}>({
node: {}, // Object.fromEntries(sync.data.node.map((x) => [x.path, x])),
})
const scope = createMemo(() => sdk.directory)
createEffect(() => {
scope()
setStore("node", {})
})
// 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(() => {
// if (store.node[p.path] === undefined) return
// 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, {
// loaded: undefined,
// pinned: undefined,
// content: undefined,
// selection: undefined,
// scrollTop: undefined,
// folded: undefined,
// view: undefined,
// selectedChange: undefined,
// })
// }
const relative = (path: string) => path.replace(sync.data.path.directory + "/", "")
const load = async (path: string) => {
const directory = scope()
const client = sdk.client
const relativePath = relative(path)
await client.file
.read({ path: relativePath })
.then((x) => {
if (scope() !== directory) return
if (!store.node[relativePath]) return
setStore(
"node",
relativePath,
produce((draft) => {
draft.loaded = true
draft.content = x.data
}),
)
})
.catch((e) => {
if (scope() !== directory) return
showToast({
variant: "error",
title: language.t("toast.file.loadFailed.title"),
description: e.message,
})
})
}
const fetch = async (path: string) => {
const relativePath = relative(path)
const parent = relativePath.split("/").slice(0, -1).join("/")
if (parent) {
await list(parent)
}
}
const init = async (path: string) => {
const relativePath = relative(path)
if (!store.node[relativePath]) await fetch(path)
if (store.node[relativePath]?.loaded) return
return load(relativePath)
}
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)
// context.addActive()
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) => {
const directory = scope()
const client = sdk.client
return client.file
.list({ path: path + "/" })
.then((x) => {
if (scope() !== directory) return
setStore(
"node",
produce((draft) => {
x.data!.forEach((node) => {
if (node.path in draft) return
draft[node.path] = node
})
}),
)
})
.catch(() => {})
}
const searchFiles = (query: string) => sdk.client.find.files({ query, dirs: "false" }).then((x) => x.data!)
const searchFilesAndDirectories = (query: string) =>
sdk.client.find.files({ query, dirs: "true" }).then((x) => x.data!)
const unsub = sdk.event.listen((e) => {
const event = e.details
switch (event.type) {
case "file.watcher.updated":
const relativePath = relative(event.properties.file)
if (relativePath.startsWith(".git/")) return
if (store.node[relativePath]) load(relativePath)
break
}
})
onCleanup(unsub)
return {
node: async (path: string) => {
if (!store.node[path] || !store.node[path].loaded) {
await init(path)
}
return store.node[path]
},
update: (path: string, node: LocalFile) => setStore("node", path, reconcile(node)),
open,
load,
init,
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)
},
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("/"),
)
},
searchFiles,
searchFilesAndDirectories,
relative,
}
})()
const result = { const result = {
slug: createMemo(() => base64Encode(sdk.directory)), slug: createMemo(() => base64Encode(sdk.directory)),
model, model,
agent, agent,
file,
} }
return result return result
}, },
+3 -3
View File
@@ -8,7 +8,8 @@ import { usePlatform } from "@/context/platform"
import { useLanguage } from "@/context/language" import { useLanguage } from "@/context/language"
import { useSettings } from "@/context/settings" import { useSettings } from "@/context/settings"
import { Binary } from "@opencode-ai/util/binary" import { Binary } from "@opencode-ai/util/binary"
import { base64Decode, base64Encode } from "@opencode-ai/util/encode" import { base64Encode } from "@opencode-ai/util/encode"
import { decode64 } from "@/utils/base64"
import { EventSessionError } from "@opencode-ai/sdk/v2" import { EventSessionError } from "@opencode-ai/sdk/v2"
import { Persist, persisted } from "@/utils/persist" import { Persist, persisted } from "@/utils/persist"
import { playSound, soundSrc } from "@/utils/sound" import { playSound, soundSrc } from "@/utils/sound"
@@ -55,8 +56,7 @@ export const { use: useNotification, provider: NotificationProvider } = createSi
const empty: Notification[] = [] const empty: Notification[] = []
const currentDirectory = createMemo(() => { const currentDirectory = createMemo(() => {
if (!params.dir) return return decode64(params.dir)
return base64Decode(params.dir)
}) })
const currentSession = createMemo(() => params.id) const currentSession = createMemo(() => params.id)
+24 -5
View File
@@ -6,7 +6,8 @@ import { Persist, persisted } from "@/utils/persist"
import { useGlobalSDK } from "@/context/global-sdk" import { useGlobalSDK } from "@/context/global-sdk"
import { useGlobalSync } from "./global-sync" import { useGlobalSync } from "./global-sync"
import { useParams } from "@solidjs/router" import { useParams } from "@solidjs/router"
import { base64Decode, base64Encode } from "@opencode-ai/util/encode" import { base64Encode } from "@opencode-ai/util/encode"
import { decode64 } from "@/utils/base64"
type PermissionRespondFn = (input: { type PermissionRespondFn = (input: {
sessionID: string sessionID: string
@@ -53,7 +54,7 @@ export const { use: usePermission, provider: PermissionProvider } = createSimple
const globalSync = useGlobalSync() const globalSync = useGlobalSync()
const permissionsEnabled = createMemo(() => { const permissionsEnabled = createMemo(() => {
const directory = params.dir ? base64Decode(params.dir) : undefined const directory = decode64(params.dir)
if (!directory) return false if (!directory) return false
const [store] = globalSync.child(directory) const [store] = globalSync.child(directory)
return hasAutoAcceptPermissionConfig(store.config.permission) return hasAutoAcceptPermissionConfig(store.config.permission)
@@ -66,7 +67,21 @@ export const { use: usePermission, provider: PermissionProvider } = createSimple
}), }),
) )
const responded = new Set<string>() const MAX_RESPONDED = 1000
const RESPONDED_TTL_MS = 60 * 60 * 1000
const responded = new Map<string, number>()
function pruneResponded(now: number) {
for (const [id, ts] of responded) {
if (now - ts < RESPONDED_TTL_MS) break
responded.delete(id)
}
for (const id of responded.keys()) {
if (responded.size <= MAX_RESPONDED) break
responded.delete(id)
}
}
const respond: PermissionRespondFn = (input) => { const respond: PermissionRespondFn = (input) => {
globalSDK.client.permission.respond(input).catch(() => { globalSDK.client.permission.respond(input).catch(() => {
@@ -75,8 +90,12 @@ export const { use: usePermission, provider: PermissionProvider } = createSimple
} }
function respondOnce(permission: PermissionRequest, directory?: string) { function respondOnce(permission: PermissionRequest, directory?: string) {
if (responded.has(permission.id)) return const now = Date.now()
responded.add(permission.id) const hit = responded.has(permission.id)
responded.delete(permission.id)
responded.set(permission.id, now)
pruneResponded(now)
if (hit) return
respond({ respond({
sessionID: permission.sessionID, sessionID: permission.sessionID,
permissionID: permission.id, permissionID: permission.id,
+6
View File
@@ -17,6 +17,12 @@ export type Platform = {
/** Restart the app */ /** Restart the app */
restart(): Promise<void> restart(): Promise<void>
/** Navigate back in history */
back(): void
/** Navigate forward in history */
forward(): void
/** Send a system notification (optional deep link) */ /** Send a system notification (optional deep link) */
notify(title: string, description?: string, href?: string): Promise<void> notify(title: string, description?: string, href?: string): Promise<void>
+2 -1
View File
@@ -95,10 +95,11 @@ export const { use: useServer, provider: ServerProvider } = createSimpleContext(
const isReady = createMemo(() => ready() && !!state.active) const isReady = createMemo(() => ready() && !!state.active)
const check = (url: string) => { const check = (url: string) => {
const signal = (AbortSignal as unknown as { timeout?: (ms: number) => AbortSignal }).timeout?.(3000)
const sdk = createOpencodeClient({ const sdk = createOpencodeClient({
baseUrl: url, baseUrl: url,
fetch: platform.fetch, fetch: platform.fetch,
signal: AbortSignal.timeout(3000), signal,
}) })
return sdk.global return sdk.global
.health() .health()
+18
View File
@@ -18,6 +18,10 @@ export interface SoundSettings {
export interface Settings { export interface Settings {
general: { general: {
autoSave: boolean autoSave: boolean
releaseNotes: boolean
}
updates: {
startup: boolean
} }
appearance: { appearance: {
fontSize: number fontSize: number
@@ -34,6 +38,10 @@ export interface Settings {
const defaultSettings: Settings = { const defaultSettings: Settings = {
general: { general: {
autoSave: true, autoSave: true,
releaseNotes: true,
},
updates: {
startup: true,
}, },
appearance: { appearance: {
fontSize: 14, fontSize: 14,
@@ -97,6 +105,16 @@ export const { use: useSettings, provider: SettingsProvider } = createSimpleCont
setAutoSave(value: boolean) { setAutoSave(value: boolean) {
setStore("general", "autoSave", value) setStore("general", "autoSave", value)
}, },
releaseNotes: createMemo(() => store.general?.releaseNotes ?? defaultSettings.general.releaseNotes),
setReleaseNotes(value: boolean) {
setStore("general", "releaseNotes", value)
},
},
updates: {
startup: createMemo(() => store.updates?.startup ?? defaultSettings.updates.startup),
setStartup(value: boolean) {
setStore("updates", "startup", value)
},
}, },
appearance: { appearance: {
fontSize: createMemo(() => store.appearance?.fontSize ?? defaultSettings.appearance.fontSize), fontSize: createMemo(() => store.appearance?.fontSize ?? defaultSettings.appearance.fontSize),
+7 -20
View File
@@ -16,7 +16,6 @@ export const { use: useSync, provider: SyncProvider } = createSimpleContext({
const sdk = useSDK() const sdk = useSDK()
type Child = ReturnType<(typeof globalSync)["child"]> type Child = ReturnType<(typeof globalSync)["child"]>
type Store = Child[0]
type Setter = Child[1] type Setter = Child[1]
const current = createMemo(() => globalSync.child(sdk.directory)) const current = createMemo(() => globalSync.child(sdk.directory))
@@ -43,18 +42,6 @@ export const { use: useSync, provider: SyncProvider } = createSimpleContext({
return Math.ceil(count / chunk) * chunk return Math.ceil(count / chunk) * chunk
} }
const hydrateMessages = (directory: string, store: Store, sessionID: string) => {
const key = keyFor(directory, sessionID)
if (meta.limit[key] !== undefined) return
const messages = store.message[sessionID]
if (!messages) return
const limit = limitFor(messages.length)
setMeta("limit", key, limit)
setMeta("complete", key, messages.length < limit)
}
const loadMessages = async (input: { const loadMessages = async (input: {
directory: string directory: string
client: typeof sdk.client client: typeof sdk.client
@@ -150,21 +137,20 @@ export const { use: useSync, provider: SyncProvider } = createSimpleContext({
const directory = sdk.directory const directory = sdk.directory
const client = sdk.client const client = sdk.client
const [store, setStore] = globalSync.child(directory) const [store, setStore] = globalSync.child(directory)
const key = keyFor(directory, sessionID)
const hasSession = (() => { const hasSession = (() => {
const match = Binary.search(store.session, sessionID, (s) => s.id) const match = Binary.search(store.session, sessionID, (s) => s.id)
return match.found return match.found
})() })()
hydrateMessages(directory, store, sessionID)
const hasMessages = store.message[sessionID] !== undefined const hasMessages = store.message[sessionID] !== undefined
if (hasSession && hasMessages) return const hydrated = meta.limit[key] !== undefined
if (hasSession && hasMessages && hydrated) return
const key = keyFor(directory, sessionID)
const pending = inflight.get(key) const pending = inflight.get(key)
if (pending) return pending if (pending) return pending
const limit = meta.limit[key] ?? chunk const count = store.message[sessionID]?.length ?? 0
const limit = hydrated ? (meta.limit[key] ?? chunk) : limitFor(count)
const sessionReq = hasSession const sessionReq = hasSession
? Promise.resolve() ? Promise.resolve()
@@ -184,7 +170,8 @@ export const { use: useSync, provider: SyncProvider } = createSimpleContext({
) )
}) })
const messagesReq = hasMessages const messagesReq =
hasMessages && hydrated
? Promise.resolve() ? Promise.resolve()
: loadMessages({ : loadMessages({
directory, directory,
+3 -2
View File
@@ -155,8 +155,9 @@ function createTerminalSession(sdk: ReturnType<typeof useSDK>, dir: string, sess
batch(() => { batch(() => {
setStore("all", index, { setStore("all", index, {
...pty, id: clone.data.id,
...clone.data, title: clone.data.title ?? pty.title,
titleNumber: pty.titleNumber,
}) })
if (active) { if (active) {
setStore("active", clone.data.id) setStore("active", clone.data.id)
+6
View File
@@ -31,6 +31,12 @@ const platform: Platform = {
openLink(url: string) { openLink(url: string) {
window.open(url, "_blank") window.open(url, "_blank")
}, },
back() {
window.history.back()
},
forward() {
window.history.forward()
},
restart: async () => { restart: async () => {
window.location.reload() window.location.reload()
}, },
+2 -2
View File
@@ -1,5 +1,5 @@
import { useGlobalSync } from "@/context/global-sync" import { useGlobalSync } from "@/context/global-sync"
import { base64Decode } from "@opencode-ai/util/encode" import { decode64 } from "@/utils/base64"
import { useParams } from "@solidjs/router" import { useParams } from "@solidjs/router"
import { createMemo } from "solid-js" import { createMemo } from "solid-js"
@@ -8,7 +8,7 @@ export const popularProviders = ["opencode", "anthropic", "github-copilot", "ope
export function useProviders() { export function useProviders() {
const globalSync = useGlobalSync() const globalSync = useGlobalSync()
const params = useParams() const params = useParams()
const currentDirectory = createMemo(() => base64Decode(params.dir ?? "")) const currentDirectory = createMemo(() => decode64(params.dir) ?? "")
const providers = createMemo(() => { const providers = createMemo(() => {
if (currentDirectory()) { if (currentDirectory()) {
const [projectStore] = globalSync.child(currentDirectory()) const [projectStore] = globalSync.child(currentDirectory())
+46
View File
@@ -8,6 +8,7 @@ export const dict = {
"command.category.theme": "سمة", "command.category.theme": "سمة",
"command.category.language": "لغة", "command.category.language": "لغة",
"command.category.file": "ملف", "command.category.file": "ملف",
"command.category.context": "سياق",
"command.category.terminal": "محطة طرفية", "command.category.terminal": "محطة طرفية",
"command.category.model": "نموذج", "command.category.model": "نموذج",
"command.category.mcp": "MCP", "command.category.mcp": "MCP",
@@ -42,7 +43,10 @@ export const dict = {
"command.session.new": "جلسة جديدة", "command.session.new": "جلسة جديدة",
"command.file.open": "فتح ملف", "command.file.open": "فتح ملف",
"command.file.open.description": "البحث في الملفات والأوامر", "command.file.open.description": "البحث في الملفات والأوامر",
"command.context.addSelection": "إضافة التحديد إلى السياق",
"command.context.addSelection.description": "إضافة الأسطر المحددة من الملف الحالي",
"command.terminal.toggle": "تبديل المحطة الطرفية", "command.terminal.toggle": "تبديل المحطة الطرفية",
"command.fileTree.toggle": "تبديل شجرة الملفات",
"command.review.toggle": "تبديل المراجعة", "command.review.toggle": "تبديل المراجعة",
"command.terminal.new": "محطة طرفية جديدة", "command.terminal.new": "محطة طرفية جديدة",
"command.terminal.new.description": "إنشاء علامة تبويب جديدة للمحطة الطرفية", "command.terminal.new.description": "إنشاء علامة تبويب جديدة للمحطة الطرفية",
@@ -137,6 +141,8 @@ export const dict = {
"provider.connect.toast.connected.title": "تم توصيل {{provider}}", "provider.connect.toast.connected.title": "تم توصيل {{provider}}",
"provider.connect.toast.connected.description": "نماذج {{provider}} متاحة الآن للاستخدام.", "provider.connect.toast.connected.description": "نماذج {{provider}} متاحة الآن للاستخدام.",
"provider.disconnect.toast.disconnected.title": "تم فصل {{provider}}",
"provider.disconnect.toast.disconnected.description": "لم تعد نماذج {{provider}} متاحة.",
"model.tag.free": "مجاني", "model.tag.free": "مجاني",
"model.tag.latest": "الأحدث", "model.tag.latest": "الأحدث",
"model.provider.anthropic": "Anthropic", "model.provider.anthropic": "Anthropic",
@@ -159,6 +165,8 @@ export const dict = {
"common.loading": "جارٍ التحميل", "common.loading": "جارٍ التحميل",
"common.loading.ellipsis": "...", "common.loading.ellipsis": "...",
"common.cancel": "إلغاء", "common.cancel": "إلغاء",
"common.connect": "اتصال",
"common.disconnect": "قطع الاتصال",
"common.submit": "إرسال", "common.submit": "إرسال",
"common.save": "حفظ", "common.save": "حفظ",
"common.saving": "جارٍ الحفظ...", "common.saving": "جارٍ الحفظ...",
@@ -167,6 +175,8 @@ export const dict = {
"prompt.placeholder.shell": "أدخل أمر shell...", "prompt.placeholder.shell": "أدخل أمر shell...",
"prompt.placeholder.normal": 'اسأل أي شيء... "{{example}}"', "prompt.placeholder.normal": 'اسأل أي شيء... "{{example}}"',
"prompt.placeholder.summarizeComments": "لخّص التعليقات…",
"prompt.placeholder.summarizeComment": "لخّص التعليق…",
"prompt.mode.shell": "Shell", "prompt.mode.shell": "Shell",
"prompt.mode.shell.exit": "esc للخروج", "prompt.mode.shell.exit": "esc للخروج",
@@ -270,6 +280,9 @@ export const dict = {
"dialog.project.edit.color": "لون", "dialog.project.edit.color": "لون",
"dialog.project.edit.color.select": "اختر لون {{color}}", "dialog.project.edit.color.select": "اختر لون {{color}}",
"dialog.project.edit.worktree.startup": "سكريبت بدء تشغيل مساحة العمل",
"dialog.project.edit.worktree.startup.description": "يتم تشغيله بعد إنشاء مساحة عمل جديدة (شجرة عمل).",
"dialog.project.edit.worktree.startup.placeholder": "مثال: bun install",
"context.breakdown.title": "تفصيل السياق", "context.breakdown.title": "تفصيل السياق",
"context.breakdown.note": 'تفصيل تقريبي لرموز الإدخال. يشمل "أخرى" تعريفات الأدوات والنفقات العامة.', "context.breakdown.note": 'تفصيل تقريبي لرموز الإدخال. يشمل "أخرى" تعريفات الأدوات والنفقات العامة.',
"context.breakdown.system": "النظام", "context.breakdown.system": "النظام",
@@ -318,6 +331,7 @@ export const dict = {
"language.ar": "العربية", "language.ar": "العربية",
"language.no": "Norsk", "language.no": "Norsk",
"language.br": "Português (Brasil)", "language.br": "Português (Brasil)",
"language.th": "ไทย",
"toast.language.title": "لغة", "toast.language.title": "لغة",
"toast.language.description": "تم التبديل إلى {{language}}", "toast.language.description": "تم التبديل إلى {{language}}",
@@ -335,6 +349,9 @@ export const dict = {
"toast.file.loadFailed.title": "فشل تحميل الملف", "toast.file.loadFailed.title": "فشل تحميل الملف",
"toast.file.listFailed.title": "فشل سرد الملفات",
"toast.context.noLineSelection.title": "لا يوجد تحديد للأسطر",
"toast.context.noLineSelection.description": "حدد نطاق أسطر في تبويب ملف أولاً.",
"toast.session.share.copyFailed.title": "فشل نسخ عنوان URL إلى الحافظة", "toast.session.share.copyFailed.title": "فشل نسخ عنوان URL إلى الحافظة",
"toast.session.share.success.title": "تمت مشاركة الجلسة", "toast.session.share.success.title": "تمت مشاركة الجلسة",
"toast.session.share.success.description": "تم نسخ عنوان URL للمشاركة إلى الحافظة!", "toast.session.share.success.description": "تم نسخ عنوان URL للمشاركة إلى الحافظة!",
@@ -408,8 +425,13 @@ export const dict = {
"session.tab.context": "سياق", "session.tab.context": "سياق",
"session.panel.reviewAndFiles": "المراجعة والملفات", "session.panel.reviewAndFiles": "المراجعة والملفات",
"session.review.filesChanged": "تم تغيير {{count}} ملفات", "session.review.filesChanged": "تم تغيير {{count}} ملفات",
"session.review.change.one": "تغيير",
"session.review.change.other": "تغييرات",
"session.review.loadingChanges": "جارٍ تحميل التغييرات...", "session.review.loadingChanges": "جارٍ تحميل التغييرات...",
"session.review.empty": "لا توجد تغييرات في هذه الجلسة بعد", "session.review.empty": "لا توجد تغييرات في هذه الجلسة بعد",
"session.review.noChanges": "لا توجد تغييرات",
"session.files.selectToOpen": "اختر ملفًا لفتحه",
"session.files.all": "كل الملفات",
"session.messages.renderEarlier": "عرض الرسائل السابقة", "session.messages.renderEarlier": "عرض الرسائل السابقة",
"session.messages.loadingEarlier": "جارٍ تحميل الرسائل السابقة...", "session.messages.loadingEarlier": "جارٍ تحميل الرسائل السابقة...",
"session.messages.loadEarlier": "تحميل الرسائل السابقة", "session.messages.loadEarlier": "تحميل الرسائل السابقة",
@@ -483,12 +505,15 @@ export const dict = {
"sidebar.project.recentSessions": "الجلسات الحديثة", "sidebar.project.recentSessions": "الجلسات الحديثة",
"sidebar.project.viewAllSessions": "عرض جميع الجلسات", "sidebar.project.viewAllSessions": "عرض جميع الجلسات",
"app.name.desktop": "OpenCode Desktop",
"settings.section.desktop": "سطح المكتب", "settings.section.desktop": "سطح المكتب",
"settings.section.server": "الخادم",
"settings.tab.general": "عام", "settings.tab.general": "عام",
"settings.tab.shortcuts": "اختصارات", "settings.tab.shortcuts": "اختصارات",
"settings.general.section.appearance": "المظهر", "settings.general.section.appearance": "المظهر",
"settings.general.section.notifications": "إشعارات النظام", "settings.general.section.notifications": "إشعارات النظام",
"settings.general.section.updates": "التحديثات",
"settings.general.section.sounds": "المؤثرات الصوتية", "settings.general.section.sounds": "المؤثرات الصوتية",
"settings.general.row.language.title": "اللغة", "settings.general.row.language.title": "اللغة",
@@ -499,12 +524,25 @@ export const dict = {
"settings.general.row.theme.description": "تخصيص سمة OpenCode.", "settings.general.row.theme.description": "تخصيص سمة OpenCode.",
"settings.general.row.font.title": "الخط", "settings.general.row.font.title": "الخط",
"settings.general.row.font.description": "تخصيص الخط الأحادي المستخدم في كتل التعليمات البرمجية", "settings.general.row.font.description": "تخصيص الخط الأحادي المستخدم في كتل التعليمات البرمجية",
"settings.general.row.releaseNotes.title": "ملاحظات الإصدار",
"settings.general.row.releaseNotes.description": 'عرض نوافذ "ما الجديد" المنبثقة بعد التحديثات',
"settings.updates.row.startup.title": "التحقق من التحديثات عند بدء التشغيل",
"settings.updates.row.startup.description": "التحقق تلقائيًا من التحديثات عند تشغيل OpenCode",
"settings.updates.row.check.title": "التحقق من التحديثات",
"settings.updates.row.check.description": "التحقق يدويًا من التحديثات وتثبيتها إذا كانت متاحة",
"settings.updates.action.checkNow": "تحقق الآن",
"settings.updates.action.checking": "جارٍ التحقق...",
"settings.updates.toast.latest.title": "أنت على آخر إصدار",
"settings.updates.toast.latest.description": "أنت تستخدم أحدث إصدار من OpenCode.",
"font.option.ibmPlexMono": "IBM Plex Mono", "font.option.ibmPlexMono": "IBM Plex Mono",
"font.option.cascadiaCode": "Cascadia Code", "font.option.cascadiaCode": "Cascadia Code",
"font.option.firaCode": "Fira Code", "font.option.firaCode": "Fira Code",
"font.option.hack": "Hack", "font.option.hack": "Hack",
"font.option.inconsolata": "Inconsolata", "font.option.inconsolata": "Inconsolata",
"font.option.intelOneMono": "Intel One Mono", "font.option.intelOneMono": "Intel One Mono",
"font.option.iosevka": "Iosevka",
"font.option.jetbrainsMono": "JetBrains Mono", "font.option.jetbrainsMono": "JetBrains Mono",
"font.option.mesloLgs": "Meslo LGS", "font.option.mesloLgs": "Meslo LGS",
"font.option.robotoMono": "Roboto Mono", "font.option.robotoMono": "Roboto Mono",
@@ -590,6 +628,13 @@ export const dict = {
"settings.providers.title": "الموفرون", "settings.providers.title": "الموفرون",
"settings.providers.description": "ستكون إعدادات الموفر قابلة للتكوين هنا.", "settings.providers.description": "ستكون إعدادات الموفر قابلة للتكوين هنا.",
"settings.providers.section.connected": "الموفرون المتصلون",
"settings.providers.connected.empty": "لا يوجد موفرون متصلون",
"settings.providers.section.popular": "الموفرون الشائعون",
"settings.providers.tag.environment": "البيئة",
"settings.providers.tag.config": "التكوين",
"settings.providers.tag.custom": "مخصص",
"settings.providers.tag.other": "أخرى",
"settings.models.title": "النماذج", "settings.models.title": "النماذج",
"settings.models.description": "ستكون إعدادات النموذج قابلة للتكوين هنا.", "settings.models.description": "ستكون إعدادات النموذج قابلة للتكوين هنا.",
"settings.agents.title": "الوكلاء", "settings.agents.title": "الوكلاء",
@@ -657,6 +702,7 @@ export const dict = {
"workspace.reset.failed.title": "فشل إعادة تعيين مساحة العمل", "workspace.reset.failed.title": "فشل إعادة تعيين مساحة العمل",
"workspace.reset.success.title": "تمت إعادة تعيين مساحة العمل", "workspace.reset.success.title": "تمت إعادة تعيين مساحة العمل",
"workspace.reset.success.description": "مساحة العمل تطابق الآن الفرع الافتراضي.", "workspace.reset.success.description": "مساحة العمل تطابق الآن الفرع الافتراضي.",
"workspace.error.stillPreparing": "مساحة العمل لا تزال قيد الإعداد",
"workspace.status.checking": "التحقق من التغييرات غير المدمجة...", "workspace.status.checking": "التحقق من التغييرات غير المدمجة...",
"workspace.status.error": "تعذر التحقق من حالة git.", "workspace.status.error": "تعذر التحقق من حالة git.",
"workspace.status.clean": "لم يتم اكتشاف تغييرات غير مدمجة.", "workspace.status.clean": "لم يتم اكتشاف تغييرات غير مدمجة.",
+51
View File
@@ -8,6 +8,7 @@ export const dict = {
"command.category.theme": "Tema", "command.category.theme": "Tema",
"command.category.language": "Idioma", "command.category.language": "Idioma",
"command.category.file": "Arquivo", "command.category.file": "Arquivo",
"command.category.context": "Contexto",
"command.category.terminal": "Terminal", "command.category.terminal": "Terminal",
"command.category.model": "Modelo", "command.category.model": "Modelo",
"command.category.mcp": "MCP", "command.category.mcp": "MCP",
@@ -42,7 +43,10 @@ export const dict = {
"command.session.new": "Nova sessão", "command.session.new": "Nova sessão",
"command.file.open": "Abrir arquivo", "command.file.open": "Abrir arquivo",
"command.file.open.description": "Buscar arquivos e comandos", "command.file.open.description": "Buscar arquivos e comandos",
"command.context.addSelection": "Adicionar seleção ao contexto",
"command.context.addSelection.description": "Adicionar as linhas selecionadas do arquivo atual",
"command.terminal.toggle": "Alternar terminal", "command.terminal.toggle": "Alternar terminal",
"command.fileTree.toggle": "Alternar árvore de arquivos",
"command.review.toggle": "Alternar revisão", "command.review.toggle": "Alternar revisão",
"command.terminal.new": "Novo terminal", "command.terminal.new": "Novo terminal",
"command.terminal.new.description": "Criar uma nova aba de terminal", "command.terminal.new.description": "Criar uma nova aba de terminal",
@@ -137,6 +141,8 @@ export const dict = {
"provider.connect.toast.connected.title": "{{provider}} conectado", "provider.connect.toast.connected.title": "{{provider}} conectado",
"provider.connect.toast.connected.description": "Modelos do {{provider}} agora estão disponíveis para uso.", "provider.connect.toast.connected.description": "Modelos do {{provider}} agora estão disponíveis para uso.",
"provider.disconnect.toast.disconnected.title": "{{provider}} desconectado",
"provider.disconnect.toast.disconnected.description": "Os modelos de {{provider}} não estão mais disponíveis.",
"model.tag.free": "Grátis", "model.tag.free": "Grátis",
"model.tag.latest": "Mais recente", "model.tag.latest": "Mais recente",
"model.provider.anthropic": "Anthropic", "model.provider.anthropic": "Anthropic",
@@ -159,6 +165,8 @@ export const dict = {
"common.loading": "Carregando", "common.loading": "Carregando",
"common.loading.ellipsis": "...", "common.loading.ellipsis": "...",
"common.cancel": "Cancelar", "common.cancel": "Cancelar",
"common.connect": "Conectar",
"common.disconnect": "Desconectar",
"common.submit": "Enviar", "common.submit": "Enviar",
"common.save": "Salvar", "common.save": "Salvar",
"common.saving": "Salvando...", "common.saving": "Salvando...",
@@ -167,6 +175,8 @@ export const dict = {
"prompt.placeholder.shell": "Digite comando do shell...", "prompt.placeholder.shell": "Digite comando do shell...",
"prompt.placeholder.normal": 'Pergunte qualquer coisa... "{{example}}"', "prompt.placeholder.normal": 'Pergunte qualquer coisa... "{{example}}"',
"prompt.placeholder.summarizeComments": "Resumir comentários…",
"prompt.placeholder.summarizeComment": "Resumir comentário…",
"prompt.mode.shell": "Shell", "prompt.mode.shell": "Shell",
"prompt.mode.shell.exit": "esc para sair", "prompt.mode.shell.exit": "esc para sair",
@@ -223,6 +233,8 @@ export const dict = {
"dialog.mcp.description": "{{enabled}} de {{total}} habilitados", "dialog.mcp.description": "{{enabled}} de {{total}} habilitados",
"dialog.mcp.empty": "Nenhum MCP configurado", "dialog.mcp.empty": "Nenhum MCP configurado",
"dialog.lsp.empty": "LSPs detectados automaticamente pelos tipos de arquivo",
"dialog.plugins.empty": "Plugins configurados em opencode.json",
"mcp.status.connected": "conectado", "mcp.status.connected": "conectado",
"mcp.status.failed": "falhou", "mcp.status.failed": "falhou",
"mcp.status.needs_auth": "precisa de autenticação", "mcp.status.needs_auth": "precisa de autenticação",
@@ -251,6 +263,12 @@ export const dict = {
"dialog.server.default.clear": "Limpar", "dialog.server.default.clear": "Limpar",
"dialog.server.action.remove": "Remover servidor", "dialog.server.action.remove": "Remover servidor",
"dialog.server.menu.edit": "Editar",
"dialog.server.menu.default": "Definir como padrão",
"dialog.server.menu.defaultRemove": "Remover padrão",
"dialog.server.menu.delete": "Excluir",
"dialog.server.current": "Servidor atual",
"dialog.server.status.default": "Padrão",
"dialog.project.edit.title": "Editar projeto", "dialog.project.edit.title": "Editar projeto",
"dialog.project.edit.name": "Nome", "dialog.project.edit.name": "Nome",
"dialog.project.edit.icon": "Ícone", "dialog.project.edit.icon": "Ícone",
@@ -312,6 +330,7 @@ export const dict = {
"language.ar": "العربية", "language.ar": "العربية",
"language.no": "Norsk", "language.no": "Norsk",
"language.br": "Português (Brasil)", "language.br": "Português (Brasil)",
"language.th": "ไทย",
"toast.language.title": "Idioma", "toast.language.title": "Idioma",
"toast.language.description": "Alterado para {{language}}", "toast.language.description": "Alterado para {{language}}",
@@ -329,6 +348,9 @@ export const dict = {
"toast.file.loadFailed.title": "Falha ao carregar arquivo", "toast.file.loadFailed.title": "Falha ao carregar arquivo",
"toast.file.listFailed.title": "Falha ao listar arquivos",
"toast.context.noLineSelection.title": "Nenhuma seleção de linhas",
"toast.context.noLineSelection.description": "Selecione primeiro um intervalo de linhas em uma aba de arquivo.",
"toast.session.share.copyFailed.title": "Falha ao copiar URL para a área de transferência", "toast.session.share.copyFailed.title": "Falha ao copiar URL para a área de transferência",
"toast.session.share.success.title": "Sessão compartilhada", "toast.session.share.success.title": "Sessão compartilhada",
"toast.session.share.success.description": "URL compartilhada copiada para a área de transferência!", "toast.session.share.success.description": "URL compartilhada copiada para a área de transferência!",
@@ -404,8 +426,13 @@ export const dict = {
"session.tab.context": "Contexto", "session.tab.context": "Contexto",
"session.panel.reviewAndFiles": "Revisão e arquivos", "session.panel.reviewAndFiles": "Revisão e arquivos",
"session.review.filesChanged": "{{count}} Arquivos Alterados", "session.review.filesChanged": "{{count}} Arquivos Alterados",
"session.review.change.one": "Alteração",
"session.review.change.other": "Alterações",
"session.review.loadingChanges": "Carregando alterações...", "session.review.loadingChanges": "Carregando alterações...",
"session.review.empty": "Nenhuma alteração nesta sessão ainda", "session.review.empty": "Nenhuma alteração nesta sessão ainda",
"session.review.noChanges": "Sem alterações",
"session.files.selectToOpen": "Selecione um arquivo para abrir",
"session.files.all": "Todos os arquivos",
"session.messages.renderEarlier": "Renderizar mensagens anteriores", "session.messages.renderEarlier": "Renderizar mensagens anteriores",
"session.messages.loadingEarlier": "Carregando mensagens anteriores...", "session.messages.loadingEarlier": "Carregando mensagens anteriores...",
"session.messages.loadEarlier": "Carregar mensagens anteriores", "session.messages.loadEarlier": "Carregar mensagens anteriores",
@@ -482,12 +509,15 @@ export const dict = {
"sidebar.project.recentSessions": "Sessões recentes", "sidebar.project.recentSessions": "Sessões recentes",
"sidebar.project.viewAllSessions": "Ver todas as sessões", "sidebar.project.viewAllSessions": "Ver todas as sessões",
"app.name.desktop": "OpenCode Desktop",
"settings.section.desktop": "Desktop", "settings.section.desktop": "Desktop",
"settings.section.server": "Servidor",
"settings.tab.general": "Geral", "settings.tab.general": "Geral",
"settings.tab.shortcuts": "Atalhos", "settings.tab.shortcuts": "Atalhos",
"settings.general.section.appearance": "Aparência", "settings.general.section.appearance": "Aparência",
"settings.general.section.notifications": "Notificações do sistema", "settings.general.section.notifications": "Notificações do sistema",
"settings.general.section.updates": "Atualizações",
"settings.general.section.sounds": "Efeitos sonoros", "settings.general.section.sounds": "Efeitos sonoros",
"settings.general.row.language.title": "Idioma", "settings.general.row.language.title": "Idioma",
@@ -498,12 +528,25 @@ export const dict = {
"settings.general.row.theme.description": "Personalize como o OpenCode é tematizado.", "settings.general.row.theme.description": "Personalize como o OpenCode é tematizado.",
"settings.general.row.font.title": "Fonte", "settings.general.row.font.title": "Fonte",
"settings.general.row.font.description": "Personalize a fonte monoespaçada usada em blocos de código", "settings.general.row.font.description": "Personalize a fonte monoespaçada usada em blocos de código",
"settings.general.row.releaseNotes.title": "Notas da versão",
"settings.general.row.releaseNotes.description": 'Mostrar pop-ups de "Novidades" após atualizações',
"settings.updates.row.startup.title": "Verificar atualizações ao iniciar",
"settings.updates.row.startup.description": "Verificar atualizações automaticamente quando o OpenCode iniciar",
"settings.updates.row.check.title": "Verificar atualizações",
"settings.updates.row.check.description": "Verificar atualizações manualmente e instalar se houver",
"settings.updates.action.checkNow": "Verificar agora",
"settings.updates.action.checking": "Verificando...",
"settings.updates.toast.latest.title": "Você está atualizado",
"settings.updates.toast.latest.description": "Você está usando a versão mais recente do OpenCode.",
"font.option.ibmPlexMono": "IBM Plex Mono", "font.option.ibmPlexMono": "IBM Plex Mono",
"font.option.cascadiaCode": "Cascadia Code", "font.option.cascadiaCode": "Cascadia Code",
"font.option.firaCode": "Fira Code", "font.option.firaCode": "Fira Code",
"font.option.hack": "Hack", "font.option.hack": "Hack",
"font.option.inconsolata": "Inconsolata", "font.option.inconsolata": "Inconsolata",
"font.option.intelOneMono": "Intel One Mono", "font.option.intelOneMono": "Intel One Mono",
"font.option.iosevka": "Iosevka",
"font.option.jetbrainsMono": "JetBrains Mono", "font.option.jetbrainsMono": "JetBrains Mono",
"font.option.mesloLgs": "Meslo LGS", "font.option.mesloLgs": "Meslo LGS",
"font.option.robotoMono": "Roboto Mono", "font.option.robotoMono": "Roboto Mono",
@@ -591,6 +634,13 @@ export const dict = {
"settings.providers.title": "Provedores", "settings.providers.title": "Provedores",
"settings.providers.description": "Configurações de provedores estarão disponíveis aqui.", "settings.providers.description": "Configurações de provedores estarão disponíveis aqui.",
"settings.providers.section.connected": "Provedores conectados",
"settings.providers.connected.empty": "Nenhum provedor conectado",
"settings.providers.section.popular": "Provedores populares",
"settings.providers.tag.environment": "Ambiente",
"settings.providers.tag.config": "Configuração",
"settings.providers.tag.custom": "Personalizado",
"settings.providers.tag.other": "Outro",
"settings.models.title": "Modelos", "settings.models.title": "Modelos",
"settings.models.description": "Configurações de modelos estarão disponíveis aqui.", "settings.models.description": "Configurações de modelos estarão disponíveis aqui.",
"settings.agents.title": "Agentes", "settings.agents.title": "Agentes",
@@ -658,6 +708,7 @@ export const dict = {
"workspace.reset.failed.title": "Falha ao redefinir espaço de trabalho", "workspace.reset.failed.title": "Falha ao redefinir espaço de trabalho",
"workspace.reset.success.title": "Espaço de trabalho redefinido", "workspace.reset.success.title": "Espaço de trabalho redefinido",
"workspace.reset.success.description": "Espaço de trabalho agora corresponde ao branch padrão.", "workspace.reset.success.description": "Espaço de trabalho agora corresponde ao branch padrão.",
"workspace.error.stillPreparing": "O espaço de trabalho ainda está sendo preparado",
"workspace.status.checking": "Verificando alterações não mescladas...", "workspace.status.checking": "Verificando alterações não mescladas...",
"workspace.status.error": "Não foi possível verificar o status do git.", "workspace.status.error": "Não foi possível verificar o status do git.",
"workspace.status.clean": "Nenhuma alteração não mesclada detectada.", "workspace.status.clean": "Nenhuma alteração não mesclada detectada.",
+125
View File
@@ -8,6 +8,7 @@ export const dict = {
"command.category.theme": "Tema", "command.category.theme": "Tema",
"command.category.language": "Sprog", "command.category.language": "Sprog",
"command.category.file": "Fil", "command.category.file": "Fil",
"command.category.context": "Kontekst",
"command.category.terminal": "Terminal", "command.category.terminal": "Terminal",
"command.category.model": "Model", "command.category.model": "Model",
"command.category.mcp": "MCP", "command.category.mcp": "MCP",
@@ -15,6 +16,7 @@ export const dict = {
"command.category.permissions": "Tilladelser", "command.category.permissions": "Tilladelser",
"command.category.workspace": "Arbejdsområde", "command.category.workspace": "Arbejdsområde",
"command.category.settings": "Indstillinger",
"theme.scheme.system": "System", "theme.scheme.system": "System",
"theme.scheme.light": "Lys", "theme.scheme.light": "Lys",
"theme.scheme.dark": "Mørk", "theme.scheme.dark": "Mørk",
@@ -23,6 +25,7 @@ export const dict = {
"command.project.open": "Åbn projekt", "command.project.open": "Åbn projekt",
"command.provider.connect": "Tilslut udbyder", "command.provider.connect": "Tilslut udbyder",
"command.server.switch": "Skift server", "command.server.switch": "Skift server",
"command.settings.open": "Åbn indstillinger",
"command.session.previous": "Forrige session", "command.session.previous": "Forrige session",
"command.session.next": "Næste session", "command.session.next": "Næste session",
"command.session.archive": "Arkivér session", "command.session.archive": "Arkivér session",
@@ -40,7 +43,10 @@ export const dict = {
"command.session.new": "Ny session", "command.session.new": "Ny session",
"command.file.open": "Åbn fil", "command.file.open": "Åbn fil",
"command.file.open.description": "Søg i filer og kommandoer", "command.file.open.description": "Søg i filer og kommandoer",
"command.context.addSelection": "Tilføj markering til kontekst",
"command.context.addSelection.description": "Tilføj markerede linjer fra den aktuelle fil",
"command.terminal.toggle": "Skift terminal", "command.terminal.toggle": "Skift terminal",
"command.fileTree.toggle": "Skift filtræ",
"command.review.toggle": "Skift gennemgang", "command.review.toggle": "Skift gennemgang",
"command.terminal.new": "Ny terminal", "command.terminal.new": "Ny terminal",
"command.terminal.new.description": "Opret en ny terminalfane", "command.terminal.new.description": "Opret en ny terminalfane",
@@ -117,6 +123,7 @@ export const dict = {
"provider.connect.opencodeZen.line2": "provider.connect.opencodeZen.line2":
"Med en enkelt API-nøgle får du adgang til modeller som Claude, GPT, Gemini, GLM og flere.", "Med en enkelt API-nøgle får du adgang til modeller som Claude, GPT, Gemini, GLM og flere.",
"provider.connect.opencodeZen.visit.prefix": "Besøg ", "provider.connect.opencodeZen.visit.prefix": "Besøg ",
"provider.connect.opencodeZen.visit.link": "opencode.ai/zen",
"provider.connect.opencodeZen.visit.suffix": " for at hente din API-nøgle.", "provider.connect.opencodeZen.visit.suffix": " for at hente din API-nøgle.",
"provider.connect.oauth.code.visit.prefix": "Besøg ", "provider.connect.oauth.code.visit.prefix": "Besøg ",
"provider.connect.oauth.code.visit.link": "dette link", "provider.connect.oauth.code.visit.link": "dette link",
@@ -134,13 +141,32 @@ export const dict = {
"provider.connect.toast.connected.title": "{{provider}} forbundet", "provider.connect.toast.connected.title": "{{provider}} forbundet",
"provider.connect.toast.connected.description": "{{provider}} modeller er nu tilgængelige.", "provider.connect.toast.connected.description": "{{provider}} modeller er nu tilgængelige.",
"provider.disconnect.toast.disconnected.title": "{{provider}} frakoblet",
"provider.disconnect.toast.disconnected.description": "Modeller fra {{provider}} er ikke længere tilgængelige.",
"model.tag.free": "Gratis", "model.tag.free": "Gratis",
"model.tag.latest": "Nyeste", "model.tag.latest": "Nyeste",
"model.provider.anthropic": "Anthropic",
"model.provider.openai": "OpenAI",
"model.provider.google": "Google",
"model.provider.xai": "xAI",
"model.provider.meta": "Meta",
"model.input.text": "tekst",
"model.input.image": "billede",
"model.input.audio": "lyd",
"model.input.video": "video",
"model.input.pdf": "pdf",
"model.tooltip.allows": "Tillader: {{inputs}}",
"model.tooltip.reasoning.allowed": "Tillader tænkning",
"model.tooltip.reasoning.none": "Ingen tænkning",
"model.tooltip.context": "Kontekstgrænse {{limit}}",
"common.search.placeholder": "Søg", "common.search.placeholder": "Søg",
"common.goBack": "Gå tilbage", "common.goBack": "Gå tilbage",
"common.loading": "Indlæser", "common.loading": "Indlæser",
"common.loading.ellipsis": "...",
"common.cancel": "Annuller", "common.cancel": "Annuller",
"common.connect": "Forbind",
"common.disconnect": "Frakobl",
"common.submit": "Indsend", "common.submit": "Indsend",
"common.save": "Gem", "common.save": "Gem",
"common.saving": "Gemmer...", "common.saving": "Gemmer...",
@@ -149,6 +175,8 @@ export const dict = {
"prompt.placeholder.shell": "Indtast shell-kommando...", "prompt.placeholder.shell": "Indtast shell-kommando...",
"prompt.placeholder.normal": 'Spørg om hvad som helst... "{{example}}"', "prompt.placeholder.normal": 'Spørg om hvad som helst... "{{example}}"',
"prompt.placeholder.summarizeComments": "Opsummér kommentarer…",
"prompt.placeholder.summarizeComment": "Opsummér kommentar…",
"prompt.mode.shell": "Shell", "prompt.mode.shell": "Shell",
"prompt.mode.shell.exit": "esc for at afslutte", "prompt.mode.shell.exit": "esc for at afslutte",
@@ -252,6 +280,9 @@ export const dict = {
"dialog.project.edit.color": "Farve", "dialog.project.edit.color": "Farve",
"dialog.project.edit.color.select": "Vælg farven {{color}}", "dialog.project.edit.color.select": "Vælg farven {{color}}",
"dialog.project.edit.worktree.startup": "Opstartsscript for arbejdsområde",
"dialog.project.edit.worktree.startup.description": "Køres efter oprettelse af et nyt arbejdsområde (worktree).",
"dialog.project.edit.worktree.startup.placeholder": "f.eks. bun install",
"context.breakdown.title": "Kontekstfordeling", "context.breakdown.title": "Kontekstfordeling",
"context.breakdown.note": "context.breakdown.note":
'Omtrentlig fordeling af input-tokens. "Andre" inkluderer værktøjsdefinitioner og overhead.', 'Omtrentlig fordeling af input-tokens. "Andre" inkluderer værktøjsdefinitioner og overhead.',
@@ -301,6 +332,7 @@ export const dict = {
"language.ar": "العربية", "language.ar": "العربية",
"language.no": "Norsk", "language.no": "Norsk",
"language.br": "Português (Brasil)", "language.br": "Português (Brasil)",
"language.th": "ไทย",
"toast.language.title": "Sprog", "toast.language.title": "Sprog",
"toast.language.description": "Skiftede til {{language}}", "toast.language.description": "Skiftede til {{language}}",
@@ -318,6 +350,9 @@ export const dict = {
"toast.file.loadFailed.title": "Kunne ikke indlæse fil", "toast.file.loadFailed.title": "Kunne ikke indlæse fil",
"toast.file.listFailed.title": "Kunne ikke liste filer",
"toast.context.noLineSelection.title": "Ingen linjevalg",
"toast.context.noLineSelection.description": "Vælg først et linjeinterval i en filfane.",
"toast.session.share.copyFailed.title": "Kunne ikke kopiere URL til udklipsholder", "toast.session.share.copyFailed.title": "Kunne ikke kopiere URL til udklipsholder",
"toast.session.share.success.title": "Session delt", "toast.session.share.success.title": "Session delt",
"toast.session.share.success.description": "Delings-URL kopieret til udklipsholder!", "toast.session.share.success.description": "Delings-URL kopieret til udklipsholder!",
@@ -392,13 +427,19 @@ export const dict = {
"session.tab.context": "Kontekst", "session.tab.context": "Kontekst",
"session.panel.reviewAndFiles": "Gennemgang og filer", "session.panel.reviewAndFiles": "Gennemgang og filer",
"session.review.filesChanged": "{{count}} Filer ændret", "session.review.filesChanged": "{{count}} Filer ændret",
"session.review.change.one": "Ændring",
"session.review.change.other": "Ændringer",
"session.review.loadingChanges": "Indlæser ændringer...", "session.review.loadingChanges": "Indlæser ændringer...",
"session.review.empty": "Ingen ændringer i denne session endnu", "session.review.empty": "Ingen ændringer i denne session endnu",
"session.review.noChanges": "Ingen ændringer",
"session.files.selectToOpen": "Vælg en fil at åbne",
"session.files.all": "Alle filer",
"session.messages.renderEarlier": "Vis tidligere beskeder", "session.messages.renderEarlier": "Vis tidligere beskeder",
"session.messages.loadingEarlier": "Indlæser tidligere beskeder...", "session.messages.loadingEarlier": "Indlæser tidligere beskeder...",
"session.messages.loadEarlier": "Indlæs tidligere beskeder", "session.messages.loadEarlier": "Indlæs tidligere beskeder",
"session.messages.loading": "Indlæser beskeder...", "session.messages.loading": "Indlæser beskeder...",
"session.messages.jumpToLatest": "Gå til seneste",
"session.context.addToContext": "Tilføj {{selection}} til kontekst", "session.context.addToContext": "Tilføj {{selection}} til kontekst",
"session.new.worktree.main": "Hovedgren", "session.new.worktree.main": "Hovedgren",
@@ -440,6 +481,8 @@ export const dict = {
"terminal.title.numbered": "Terminal {{number}}", "terminal.title.numbered": "Terminal {{number}}",
"terminal.close": "Luk terminal", "terminal.close": "Luk terminal",
"terminal.connectionLost.title": "Forbindelse mistet",
"terminal.connectionLost.description": "Terminalforbindelsen blev afbrudt. Dette kan ske, når serveren genstarter.",
"common.closeTab": "Luk fane", "common.closeTab": "Luk fane",
"common.dismiss": "Afvis", "common.dismiss": "Afvis",
"common.requestFailed": "Forespørgsel mislykkedes", "common.requestFailed": "Forespørgsel mislykkedes",
@@ -453,6 +496,8 @@ export const dict = {
"common.edit": "Rediger", "common.edit": "Rediger",
"common.loadMore": "Indlæs flere", "common.loadMore": "Indlæs flere",
"common.key.esc": "ESC",
"sidebar.menu.toggle": "Skift menu",
"sidebar.nav.projectsAndSessions": "Projekter og sessioner", "sidebar.nav.projectsAndSessions": "Projekter og sessioner",
"sidebar.settings": "Indstillinger", "sidebar.settings": "Indstillinger",
"sidebar.help": "Hjælp", "sidebar.help": "Hjælp",
@@ -464,12 +509,15 @@ export const dict = {
"sidebar.project.recentSessions": "Seneste sessioner", "sidebar.project.recentSessions": "Seneste sessioner",
"sidebar.project.viewAllSessions": "Vis alle sessioner", "sidebar.project.viewAllSessions": "Vis alle sessioner",
"app.name.desktop": "OpenCode Desktop",
"settings.section.desktop": "Desktop", "settings.section.desktop": "Desktop",
"settings.section.server": "Server",
"settings.tab.general": "Generelt", "settings.tab.general": "Generelt",
"settings.tab.shortcuts": "Genveje", "settings.tab.shortcuts": "Genveje",
"settings.general.section.appearance": "Udseende", "settings.general.section.appearance": "Udseende",
"settings.general.section.notifications": "Systemmeddelelser", "settings.general.section.notifications": "Systemmeddelelser",
"settings.general.section.updates": "Opdateringer",
"settings.general.section.sounds": "Lydeffekter", "settings.general.section.sounds": "Lydeffekter",
"settings.general.row.language.title": "Sprog", "settings.general.row.language.title": "Sprog",
@@ -481,6 +529,75 @@ export const dict = {
"settings.general.row.font.title": "Skrifttype", "settings.general.row.font.title": "Skrifttype",
"settings.general.row.font.description": "Tilpas mono-skrifttypen brugt i kodeblokke", "settings.general.row.font.description": "Tilpas mono-skrifttypen brugt i kodeblokke",
"settings.general.row.releaseNotes.title": "Udgivelsesnoter",
"settings.general.row.releaseNotes.description": 'Vis "Hvad er nyt"-popups efter opdateringer',
"settings.updates.row.startup.title": "Tjek for opdateringer ved opstart",
"settings.updates.row.startup.description": "Tjek automatisk for opdateringer, når OpenCode starter",
"settings.updates.row.check.title": "Tjek for opdateringer",
"settings.updates.row.check.description": "Tjek manuelt for opdateringer og installer, hvis tilgængelig",
"settings.updates.action.checkNow": "Tjek nu",
"settings.updates.action.checking": "Tjekker...",
"settings.updates.toast.latest.title": "Du er opdateret",
"settings.updates.toast.latest.description": "Du kører den nyeste version af OpenCode.",
"font.option.ibmPlexMono": "IBM Plex Mono",
"font.option.cascadiaCode": "Cascadia Code",
"font.option.firaCode": "Fira Code",
"font.option.hack": "Hack",
"font.option.inconsolata": "Inconsolata",
"font.option.intelOneMono": "Intel One Mono",
"font.option.iosevka": "Iosevka",
"font.option.jetbrainsMono": "JetBrains Mono",
"font.option.mesloLgs": "Meslo LGS",
"font.option.robotoMono": "Roboto Mono",
"font.option.sourceCodePro": "Source Code Pro",
"font.option.ubuntuMono": "Ubuntu Mono",
"sound.option.alert01": "Alarm 01",
"sound.option.alert02": "Alarm 02",
"sound.option.alert03": "Alarm 03",
"sound.option.alert04": "Alarm 04",
"sound.option.alert05": "Alarm 05",
"sound.option.alert06": "Alarm 06",
"sound.option.alert07": "Alarm 07",
"sound.option.alert08": "Alarm 08",
"sound.option.alert09": "Alarm 09",
"sound.option.alert10": "Alarm 10",
"sound.option.bipbop01": "Bip-bop 01",
"sound.option.bipbop02": "Bip-bop 02",
"sound.option.bipbop03": "Bip-bop 03",
"sound.option.bipbop04": "Bip-bop 04",
"sound.option.bipbop05": "Bip-bop 05",
"sound.option.bipbop06": "Bip-bop 06",
"sound.option.bipbop07": "Bip-bop 07",
"sound.option.bipbop08": "Bip-bop 08",
"sound.option.bipbop09": "Bip-bop 09",
"sound.option.bipbop10": "Bip-bop 10",
"sound.option.staplebops01": "Staplebops 01",
"sound.option.staplebops02": "Staplebops 02",
"sound.option.staplebops03": "Staplebops 03",
"sound.option.staplebops04": "Staplebops 04",
"sound.option.staplebops05": "Staplebops 05",
"sound.option.staplebops06": "Staplebops 06",
"sound.option.staplebops07": "Staplebops 07",
"sound.option.nope01": "Nej 01",
"sound.option.nope02": "Nej 02",
"sound.option.nope03": "Nej 03",
"sound.option.nope04": "Nej 04",
"sound.option.nope05": "Nej 05",
"sound.option.nope06": "Nej 06",
"sound.option.nope07": "Nej 07",
"sound.option.nope08": "Nej 08",
"sound.option.nope09": "Nej 09",
"sound.option.nope10": "Nej 10",
"sound.option.nope11": "Nej 11",
"sound.option.nope12": "Nej 12",
"sound.option.yup01": "Ja 01",
"sound.option.yup02": "Ja 02",
"sound.option.yup03": "Ja 03",
"sound.option.yup04": "Ja 04",
"sound.option.yup05": "Ja 05",
"sound.option.yup06": "Ja 06",
"settings.general.notifications.agent.title": "Agent", "settings.general.notifications.agent.title": "Agent",
"settings.general.notifications.agent.description": "settings.general.notifications.agent.description":
"Vis systemmeddelelse når agenten er færdig eller kræver opmærksomhed", "Vis systemmeddelelse når agenten er færdig eller kræver opmærksomhed",
@@ -516,6 +633,13 @@ export const dict = {
"settings.providers.title": "Udbydere", "settings.providers.title": "Udbydere",
"settings.providers.description": "Udbyderindstillinger vil kunne konfigureres her.", "settings.providers.description": "Udbyderindstillinger vil kunne konfigureres her.",
"settings.providers.section.connected": "Forbundne udbydere",
"settings.providers.connected.empty": "Ingen forbundne udbydere",
"settings.providers.section.popular": "Populære udbydere",
"settings.providers.tag.environment": "Miljø",
"settings.providers.tag.config": "Konfiguration",
"settings.providers.tag.custom": "Brugerdefineret",
"settings.providers.tag.other": "Andet",
"settings.models.title": "Modeller", "settings.models.title": "Modeller",
"settings.models.description": "Modelindstillinger vil kunne konfigureres her.", "settings.models.description": "Modelindstillinger vil kunne konfigureres her.",
"settings.agents.title": "Agenter", "settings.agents.title": "Agenter",
@@ -583,6 +707,7 @@ export const dict = {
"workspace.reset.failed.title": "Kunne ikke nulstille arbejdsområde", "workspace.reset.failed.title": "Kunne ikke nulstille arbejdsområde",
"workspace.reset.success.title": "Arbejdsområde nulstillet", "workspace.reset.success.title": "Arbejdsområde nulstillet",
"workspace.reset.success.description": "Arbejdsområdet matcher nu hovedgrenen.", "workspace.reset.success.description": "Arbejdsområdet matcher nu hovedgrenen.",
"workspace.error.stillPreparing": "Arbejdsområdet er stadig ved at blive klargjort",
"workspace.status.checking": "Tjekker for uflettede ændringer...", "workspace.status.checking": "Tjekker for uflettede ændringer...",
"workspace.status.error": "Kunne ikke bekræfte git-status.", "workspace.status.error": "Kunne ikke bekræfte git-status.",
"workspace.status.clean": "Ingen uflettede ændringer fundet.", "workspace.status.clean": "Ingen uflettede ændringer fundet.",
+127
View File
@@ -12,6 +12,7 @@ export const dict = {
"command.category.theme": "Thema", "command.category.theme": "Thema",
"command.category.language": "Sprache", "command.category.language": "Sprache",
"command.category.file": "Datei", "command.category.file": "Datei",
"command.category.context": "Kontext",
"command.category.terminal": "Terminal", "command.category.terminal": "Terminal",
"command.category.model": "Modell", "command.category.model": "Modell",
"command.category.mcp": "MCP", "command.category.mcp": "MCP",
@@ -19,6 +20,7 @@ export const dict = {
"command.category.permissions": "Berechtigungen", "command.category.permissions": "Berechtigungen",
"command.category.workspace": "Arbeitsbereich", "command.category.workspace": "Arbeitsbereich",
"command.category.settings": "Einstellungen",
"theme.scheme.system": "System", "theme.scheme.system": "System",
"theme.scheme.light": "Hell", "theme.scheme.light": "Hell",
"theme.scheme.dark": "Dunkel", "theme.scheme.dark": "Dunkel",
@@ -27,6 +29,7 @@ export const dict = {
"command.project.open": "Projekt öffnen", "command.project.open": "Projekt öffnen",
"command.provider.connect": "Anbieter verbinden", "command.provider.connect": "Anbieter verbinden",
"command.server.switch": "Server wechseln", "command.server.switch": "Server wechseln",
"command.settings.open": "Einstellungen öffnen",
"command.session.previous": "Vorherige Sitzung", "command.session.previous": "Vorherige Sitzung",
"command.session.next": "Nächste Sitzung", "command.session.next": "Nächste Sitzung",
"command.session.archive": "Sitzung archivieren", "command.session.archive": "Sitzung archivieren",
@@ -44,7 +47,10 @@ export const dict = {
"command.session.new": "Neue Sitzung", "command.session.new": "Neue Sitzung",
"command.file.open": "Datei öffnen", "command.file.open": "Datei öffnen",
"command.file.open.description": "Dateien und Befehle durchsuchen", "command.file.open.description": "Dateien und Befehle durchsuchen",
"command.context.addSelection": "Auswahl zum Kontext hinzufügen",
"command.context.addSelection.description": "Ausgewählte Zeilen aus der aktuellen Datei hinzufügen",
"command.terminal.toggle": "Terminal umschalten", "command.terminal.toggle": "Terminal umschalten",
"command.fileTree.toggle": "Dateibaum umschalten",
"command.review.toggle": "Überprüfung umschalten", "command.review.toggle": "Überprüfung umschalten",
"command.terminal.new": "Neues Terminal", "command.terminal.new": "Neues Terminal",
"command.terminal.new.description": "Neuen Terminal-Tab erstellen", "command.terminal.new.description": "Neuen Terminal-Tab erstellen",
@@ -121,6 +127,7 @@ export const dict = {
"provider.connect.opencodeZen.line2": "provider.connect.opencodeZen.line2":
"Mit einem einzigen API-Schlüssel erhalten Sie Zugriff auf Modelle wie Claude, GPT, Gemini, GLM und mehr.", "Mit einem einzigen API-Schlüssel erhalten Sie Zugriff auf Modelle wie Claude, GPT, Gemini, GLM und mehr.",
"provider.connect.opencodeZen.visit.prefix": "Besuchen Sie ", "provider.connect.opencodeZen.visit.prefix": "Besuchen Sie ",
"provider.connect.opencodeZen.visit.link": "opencode.ai/zen",
"provider.connect.opencodeZen.visit.suffix": ", um Ihren API-Schlüssel zu erhalten.", "provider.connect.opencodeZen.visit.suffix": ", um Ihren API-Schlüssel zu erhalten.",
"provider.connect.oauth.code.visit.prefix": "Besuchen Sie ", "provider.connect.oauth.code.visit.prefix": "Besuchen Sie ",
"provider.connect.oauth.code.visit.link": "diesen Link", "provider.connect.oauth.code.visit.link": "diesen Link",
@@ -138,13 +145,32 @@ export const dict = {
"provider.connect.toast.connected.title": "{{provider}} verbunden", "provider.connect.toast.connected.title": "{{provider}} verbunden",
"provider.connect.toast.connected.description": "{{provider}} Modelle sind jetzt verfügbar.", "provider.connect.toast.connected.description": "{{provider}} Modelle sind jetzt verfügbar.",
"provider.disconnect.toast.disconnected.title": "{{provider}} getrennt",
"provider.disconnect.toast.disconnected.description": "Die {{provider}}-Modelle sind nicht mehr verfügbar.",
"model.tag.free": "Kostenlos", "model.tag.free": "Kostenlos",
"model.tag.latest": "Neueste", "model.tag.latest": "Neueste",
"model.provider.anthropic": "Anthropic",
"model.provider.openai": "OpenAI",
"model.provider.google": "Google",
"model.provider.xai": "xAI",
"model.provider.meta": "Meta",
"model.input.text": "Text",
"model.input.image": "Bild",
"model.input.audio": "Audio",
"model.input.video": "Video",
"model.input.pdf": "pdf",
"model.tooltip.allows": "Erlaubt: {{inputs}}",
"model.tooltip.reasoning.allowed": "Erlaubt Reasoning",
"model.tooltip.reasoning.none": "Kein Reasoning",
"model.tooltip.context": "Kontextlimit {{limit}}",
"common.search.placeholder": "Suchen", "common.search.placeholder": "Suchen",
"common.goBack": "Zurück", "common.goBack": "Zurück",
"common.loading": "Laden", "common.loading": "Laden",
"common.loading.ellipsis": "...",
"common.cancel": "Abbrechen", "common.cancel": "Abbrechen",
"common.connect": "Verbinden",
"common.disconnect": "Trennen",
"common.submit": "Absenden", "common.submit": "Absenden",
"common.save": "Speichern", "common.save": "Speichern",
"common.saving": "Speichert...", "common.saving": "Speichert...",
@@ -153,6 +179,8 @@ export const dict = {
"prompt.placeholder.shell": "Shell-Befehl eingeben...", "prompt.placeholder.shell": "Shell-Befehl eingeben...",
"prompt.placeholder.normal": 'Fragen Sie alles... "{{example}}"', "prompt.placeholder.normal": 'Fragen Sie alles... "{{example}}"',
"prompt.placeholder.summarizeComments": "Kommentare zusammenfassen…",
"prompt.placeholder.summarizeComment": "Kommentar zusammenfassen…",
"prompt.mode.shell": "Shell", "prompt.mode.shell": "Shell",
"prompt.mode.shell.exit": "esc zum Verlassen", "prompt.mode.shell.exit": "esc zum Verlassen",
@@ -257,6 +285,10 @@ export const dict = {
"dialog.project.edit.color": "Farbe", "dialog.project.edit.color": "Farbe",
"dialog.project.edit.color.select": "{{color}}-Farbe auswählen", "dialog.project.edit.color.select": "{{color}}-Farbe auswählen",
"dialog.project.edit.worktree.startup": "Startup-Skript für Arbeitsbereich",
"dialog.project.edit.worktree.startup.description":
"Wird nach dem Erstellen eines neuen Arbeitsbereichs (Worktree) ausgeführt.",
"dialog.project.edit.worktree.startup.placeholder": "z. B. bun install",
"context.breakdown.title": "Kontext-Aufschlüsselung", "context.breakdown.title": "Kontext-Aufschlüsselung",
"context.breakdown.note": "context.breakdown.note":
'Ungefähre Aufschlüsselung der Eingabe-Token. "Andere" beinhaltet Werkzeugdefinitionen und Overhead.', 'Ungefähre Aufschlüsselung der Eingabe-Token. "Andere" beinhaltet Werkzeugdefinitionen und Overhead.',
@@ -306,6 +338,7 @@ export const dict = {
"language.ar": "العربية", "language.ar": "العربية",
"language.no": "Norsk", "language.no": "Norsk",
"language.br": "Português (Brasil)", "language.br": "Português (Brasil)",
"language.th": "ไทย",
"toast.language.title": "Sprache", "toast.language.title": "Sprache",
"toast.language.description": "Zu {{language}} gewechselt", "toast.language.description": "Zu {{language}} gewechselt",
@@ -323,6 +356,9 @@ export const dict = {
"toast.file.loadFailed.title": "Datei konnte nicht geladen werden", "toast.file.loadFailed.title": "Datei konnte nicht geladen werden",
"toast.file.listFailed.title": "Dateien konnten nicht aufgelistet werden",
"toast.context.noLineSelection.title": "Keine Zeilenauswahl",
"toast.context.noLineSelection.description": "Wählen Sie zuerst einen Zeilenbereich in einem Datei-Tab aus.",
"toast.session.share.copyFailed.title": "URL konnte nicht in die Zwischenablage kopiert werden", "toast.session.share.copyFailed.title": "URL konnte nicht in die Zwischenablage kopiert werden",
"toast.session.share.success.title": "Sitzung geteilt", "toast.session.share.success.title": "Sitzung geteilt",
"toast.session.share.success.description": "Teilen-URL in die Zwischenablage kopiert!", "toast.session.share.success.description": "Teilen-URL in die Zwischenablage kopiert!",
@@ -399,13 +435,19 @@ export const dict = {
"session.tab.context": "Kontext", "session.tab.context": "Kontext",
"session.panel.reviewAndFiles": "Überprüfung und Dateien", "session.panel.reviewAndFiles": "Überprüfung und Dateien",
"session.review.filesChanged": "{{count}} Dateien geändert", "session.review.filesChanged": "{{count}} Dateien geändert",
"session.review.change.one": "Änderung",
"session.review.change.other": "Änderungen",
"session.review.loadingChanges": "Lade Änderungen...", "session.review.loadingChanges": "Lade Änderungen...",
"session.review.empty": "Noch keine Änderungen in dieser Sitzung", "session.review.empty": "Noch keine Änderungen in dieser Sitzung",
"session.review.noChanges": "Keine Änderungen",
"session.files.selectToOpen": "Datei zum Öffnen auswählen",
"session.files.all": "Alle Dateien",
"session.messages.renderEarlier": "Frühere Nachrichten rendern", "session.messages.renderEarlier": "Frühere Nachrichten rendern",
"session.messages.loadingEarlier": "Lade frühere Nachrichten...", "session.messages.loadingEarlier": "Lade frühere Nachrichten...",
"session.messages.loadEarlier": "Frühere Nachrichten laden", "session.messages.loadEarlier": "Frühere Nachrichten laden",
"session.messages.loading": "Lade Nachrichten...", "session.messages.loading": "Lade Nachrichten...",
"session.messages.jumpToLatest": "Zum neuesten springen",
"session.context.addToContext": "{{selection}} zum Kontext hinzufügen", "session.context.addToContext": "{{selection}} zum Kontext hinzufügen",
"session.new.worktree.main": "Haupt-Branch", "session.new.worktree.main": "Haupt-Branch",
@@ -447,6 +489,9 @@ export const dict = {
"terminal.title.numbered": "Terminal {{number}}", "terminal.title.numbered": "Terminal {{number}}",
"terminal.close": "Terminal schließen", "terminal.close": "Terminal schließen",
"terminal.connectionLost.title": "Verbindung verloren",
"terminal.connectionLost.description":
"Die Terminalverbindung wurde unterbrochen. Das kann passieren, wenn der Server neu startet.",
"common.closeTab": "Tab schließen", "common.closeTab": "Tab schließen",
"common.dismiss": "Verwerfen", "common.dismiss": "Verwerfen",
"common.requestFailed": "Anfrage fehlgeschlagen", "common.requestFailed": "Anfrage fehlgeschlagen",
@@ -460,6 +505,8 @@ export const dict = {
"common.edit": "Bearbeiten", "common.edit": "Bearbeiten",
"common.loadMore": "Mehr laden", "common.loadMore": "Mehr laden",
"common.key.esc": "ESC",
"sidebar.menu.toggle": "Menü umschalten",
"sidebar.nav.projectsAndSessions": "Projekte und Sitzungen", "sidebar.nav.projectsAndSessions": "Projekte und Sitzungen",
"sidebar.settings": "Einstellungen", "sidebar.settings": "Einstellungen",
"sidebar.help": "Hilfe", "sidebar.help": "Hilfe",
@@ -472,12 +519,15 @@ export const dict = {
"sidebar.project.recentSessions": "Letzte Sitzungen", "sidebar.project.recentSessions": "Letzte Sitzungen",
"sidebar.project.viewAllSessions": "Alle Sitzungen anzeigen", "sidebar.project.viewAllSessions": "Alle Sitzungen anzeigen",
"app.name.desktop": "OpenCode Desktop",
"settings.section.desktop": "Desktop", "settings.section.desktop": "Desktop",
"settings.section.server": "Server",
"settings.tab.general": "Allgemein", "settings.tab.general": "Allgemein",
"settings.tab.shortcuts": "Tastenkombinationen", "settings.tab.shortcuts": "Tastenkombinationen",
"settings.general.section.appearance": "Erscheinungsbild", "settings.general.section.appearance": "Erscheinungsbild",
"settings.general.section.notifications": "Systembenachrichtigungen", "settings.general.section.notifications": "Systembenachrichtigungen",
"settings.general.section.updates": "Updates",
"settings.general.section.sounds": "Soundeffekte", "settings.general.section.sounds": "Soundeffekte",
"settings.general.row.language.title": "Sprache", "settings.general.row.language.title": "Sprache",
@@ -489,6 +539,75 @@ export const dict = {
"settings.general.row.font.title": "Schriftart", "settings.general.row.font.title": "Schriftart",
"settings.general.row.font.description": "Die in Codeblöcken verwendete Monospace-Schriftart anpassen", "settings.general.row.font.description": "Die in Codeblöcken verwendete Monospace-Schriftart anpassen",
"settings.general.row.releaseNotes.title": "Versionshinweise",
"settings.general.row.releaseNotes.description": '"Neuigkeiten"-Pop-ups nach Updates anzeigen',
"settings.updates.row.startup.title": "Beim Start nach Updates suchen",
"settings.updates.row.startup.description": "Beim Start von OpenCode automatisch nach Updates suchen",
"settings.updates.row.check.title": "Nach Updates suchen",
"settings.updates.row.check.description": "Manuell nach Updates suchen und installieren, wenn verfügbar",
"settings.updates.action.checkNow": "Jetzt prüfen",
"settings.updates.action.checking": "Wird geprüft...",
"settings.updates.toast.latest.title": "Du bist auf dem neuesten Stand",
"settings.updates.toast.latest.description": "Du verwendest die aktuelle Version von OpenCode.",
"font.option.ibmPlexMono": "IBM Plex Mono",
"font.option.cascadiaCode": "Cascadia Code",
"font.option.firaCode": "Fira Code",
"font.option.hack": "Hack",
"font.option.inconsolata": "Inconsolata",
"font.option.intelOneMono": "Intel One Mono",
"font.option.iosevka": "Iosevka",
"font.option.jetbrainsMono": "JetBrains Mono",
"font.option.mesloLgs": "Meslo LGS",
"font.option.robotoMono": "Roboto Mono",
"font.option.sourceCodePro": "Source Code Pro",
"font.option.ubuntuMono": "Ubuntu Mono",
"sound.option.alert01": "Alarm 01",
"sound.option.alert02": "Alarm 02",
"sound.option.alert03": "Alarm 03",
"sound.option.alert04": "Alarm 04",
"sound.option.alert05": "Alarm 05",
"sound.option.alert06": "Alarm 06",
"sound.option.alert07": "Alarm 07",
"sound.option.alert08": "Alarm 08",
"sound.option.alert09": "Alarm 09",
"sound.option.alert10": "Alarm 10",
"sound.option.bipbop01": "Bip-bop 01",
"sound.option.bipbop02": "Bip-bop 02",
"sound.option.bipbop03": "Bip-bop 03",
"sound.option.bipbop04": "Bip-bop 04",
"sound.option.bipbop05": "Bip-bop 05",
"sound.option.bipbop06": "Bip-bop 06",
"sound.option.bipbop07": "Bip-bop 07",
"sound.option.bipbop08": "Bip-bop 08",
"sound.option.bipbop09": "Bip-bop 09",
"sound.option.bipbop10": "Bip-bop 10",
"sound.option.staplebops01": "Staplebops 01",
"sound.option.staplebops02": "Staplebops 02",
"sound.option.staplebops03": "Staplebops 03",
"sound.option.staplebops04": "Staplebops 04",
"sound.option.staplebops05": "Staplebops 05",
"sound.option.staplebops06": "Staplebops 06",
"sound.option.staplebops07": "Staplebops 07",
"sound.option.nope01": "Nein 01",
"sound.option.nope02": "Nein 02",
"sound.option.nope03": "Nein 03",
"sound.option.nope04": "Nein 04",
"sound.option.nope05": "Nein 05",
"sound.option.nope06": "Nein 06",
"sound.option.nope07": "Nein 07",
"sound.option.nope08": "Nein 08",
"sound.option.nope09": "Nein 09",
"sound.option.nope10": "Nein 10",
"sound.option.nope11": "Nein 11",
"sound.option.nope12": "Nein 12",
"sound.option.yup01": "Ja 01",
"sound.option.yup02": "Ja 02",
"sound.option.yup03": "Ja 03",
"sound.option.yup04": "Ja 04",
"sound.option.yup05": "Ja 05",
"sound.option.yup06": "Ja 06",
"settings.general.notifications.agent.title": "Agent", "settings.general.notifications.agent.title": "Agent",
"settings.general.notifications.agent.description": "settings.general.notifications.agent.description":
"Systembenachrichtigung anzeigen, wenn der Agent fertig ist oder Aufmerksamkeit benötigt", "Systembenachrichtigung anzeigen, wenn der Agent fertig ist oder Aufmerksamkeit benötigt",
@@ -525,6 +644,13 @@ export const dict = {
"settings.providers.title": "Anbieter", "settings.providers.title": "Anbieter",
"settings.providers.description": "Anbietereinstellungen können hier konfiguriert werden.", "settings.providers.description": "Anbietereinstellungen können hier konfiguriert werden.",
"settings.providers.section.connected": "Verbundene Anbieter",
"settings.providers.connected.empty": "Keine verbundenen Anbieter",
"settings.providers.section.popular": "Beliebte Anbieter",
"settings.providers.tag.environment": "Umgebung",
"settings.providers.tag.config": "Konfiguration",
"settings.providers.tag.custom": "Benutzerdefiniert",
"settings.providers.tag.other": "Andere",
"settings.models.title": "Modelle", "settings.models.title": "Modelle",
"settings.models.description": "Modelleinstellungen können hier konfiguriert werden.", "settings.models.description": "Modelleinstellungen können hier konfiguriert werden.",
"settings.agents.title": "Agenten", "settings.agents.title": "Agenten",
@@ -592,6 +718,7 @@ export const dict = {
"workspace.reset.failed.title": "Arbeitsbereich konnte nicht zurückgesetzt werden", "workspace.reset.failed.title": "Arbeitsbereich konnte nicht zurückgesetzt werden",
"workspace.reset.success.title": "Arbeitsbereich zurückgesetzt", "workspace.reset.success.title": "Arbeitsbereich zurückgesetzt",
"workspace.reset.success.description": "Der Arbeitsbereich entspricht jetzt dem Standard-Branch.", "workspace.reset.success.description": "Der Arbeitsbereich entspricht jetzt dem Standard-Branch.",
"workspace.error.stillPreparing": "Arbeitsbereich wird noch vorbereitet",
"workspace.status.checking": "Suche nach nicht zusammengeführten Änderungen...", "workspace.status.checking": "Suche nach nicht zusammengeführten Änderungen...",
"workspace.status.error": "Git-Status konnte nicht überprüft werden.", "workspace.status.error": "Git-Status konnte nicht überprüft werden.",
"workspace.status.clean": "Keine nicht zusammengeführten Änderungen erkannt.", "workspace.status.clean": "Keine nicht zusammengeführten Änderungen erkannt.",
+43 -4
View File
@@ -8,6 +8,7 @@ export const dict = {
"command.category.theme": "Theme", "command.category.theme": "Theme",
"command.category.language": "Language", "command.category.language": "Language",
"command.category.file": "File", "command.category.file": "File",
"command.category.context": "Context",
"command.category.terminal": "Terminal", "command.category.terminal": "Terminal",
"command.category.model": "Model", "command.category.model": "Model",
"command.category.mcp": "MCP", "command.category.mcp": "MCP",
@@ -42,7 +43,10 @@ export const dict = {
"command.session.new": "New session", "command.session.new": "New session",
"command.file.open": "Open file", "command.file.open": "Open file",
"command.file.open.description": "Search files and commands", "command.file.open.description": "Search files and commands",
"command.context.addSelection": "Add selection to context",
"command.context.addSelection.description": "Add selected lines from the current file",
"command.terminal.toggle": "Toggle terminal", "command.terminal.toggle": "Toggle terminal",
"command.fileTree.toggle": "Toggle file tree",
"command.review.toggle": "Toggle review", "command.review.toggle": "Toggle review",
"command.terminal.new": "New terminal", "command.terminal.new": "New terminal",
"command.terminal.new.description": "Create a new terminal tab", "command.terminal.new.description": "Create a new terminal tab",
@@ -87,9 +91,13 @@ export const dict = {
"dialog.provider.group.popular": "Popular", "dialog.provider.group.popular": "Popular",
"dialog.provider.group.other": "Other", "dialog.provider.group.other": "Other",
"dialog.provider.tag.recommended": "Recommended", "dialog.provider.tag.recommended": "Recommended",
"dialog.provider.anthropic.note": "Connect with Claude Pro/Max or API key", "dialog.provider.opencode.note": "Curated models including Claude, GPT, Gemini and more",
"dialog.provider.openai.note": "Connect with ChatGPT Pro/Plus or API key", "dialog.provider.anthropic.note": "Direct access to Claude models, including Pro and Max",
"dialog.provider.copilot.note": "Connect with Copilot or API key", "dialog.provider.copilot.note": "Claude models for coding assistance",
"dialog.provider.openai.note": "GPT models for fast, capable general AI tasks",
"dialog.provider.google.note": "Gemini models for fast, structured responses",
"dialog.provider.openrouter.note": "Access all supported models from one provider",
"dialog.provider.vercel.note": "Unified access to AI models with smart routing",
"dialog.model.select.title": "Select model", "dialog.model.select.title": "Select model",
"dialog.model.search.placeholder": "Search models", "dialog.model.search.placeholder": "Search models",
@@ -158,7 +166,8 @@ export const dict = {
"model.tooltip.context": "Context limit {{limit}}", "model.tooltip.context": "Context limit {{limit}}",
"common.search.placeholder": "Search", "common.search.placeholder": "Search",
"common.goBack": "Go back", "common.goBack": "Back",
"common.goForward": "Forward",
"common.loading": "Loading", "common.loading": "Loading",
"common.loading.ellipsis": "...", "common.loading.ellipsis": "...",
"common.cancel": "Cancel", "common.cancel": "Cancel",
@@ -172,6 +181,8 @@ export const dict = {
"prompt.placeholder.shell": "Enter shell command...", "prompt.placeholder.shell": "Enter shell command...",
"prompt.placeholder.normal": 'Ask anything... "{{example}}"', "prompt.placeholder.normal": 'Ask anything... "{{example}}"',
"prompt.placeholder.summarizeComments": "Summarize comments…",
"prompt.placeholder.summarizeComment": "Summarize comment…",
"prompt.mode.shell": "Shell", "prompt.mode.shell": "Shell",
"prompt.mode.shell.exit": "esc to exit", "prompt.mode.shell.exit": "esc to exit",
@@ -326,6 +337,7 @@ export const dict = {
"language.ar": "العربية", "language.ar": "العربية",
"language.no": "Norsk", "language.no": "Norsk",
"language.br": "Português (Brasil)", "language.br": "Português (Brasil)",
"language.th": "ไทย",
"toast.language.title": "Language", "toast.language.title": "Language",
"toast.language.description": "Switched to {{language}}", "toast.language.description": "Switched to {{language}}",
@@ -342,6 +354,10 @@ export const dict = {
"toast.model.none.description": "Connect a provider to summarize this session", "toast.model.none.description": "Connect a provider to summarize this session",
"toast.file.loadFailed.title": "Failed to load file", "toast.file.loadFailed.title": "Failed to load file",
"toast.file.listFailed.title": "Failed to list files",
"toast.context.noLineSelection.title": "No line selection",
"toast.context.noLineSelection.description": "Select a line range in a file tab first.",
"toast.session.share.copyFailed.title": "Failed to copy URL to clipboard", "toast.session.share.copyFailed.title": "Failed to copy URL to clipboard",
"toast.session.share.success.title": "Session shared", "toast.session.share.success.title": "Session shared",
@@ -417,8 +433,15 @@ export const dict = {
"session.tab.context": "Context", "session.tab.context": "Context",
"session.panel.reviewAndFiles": "Review and files", "session.panel.reviewAndFiles": "Review and files",
"session.review.filesChanged": "{{count}} Files Changed", "session.review.filesChanged": "{{count}} Files Changed",
"session.review.change.one": "Change",
"session.review.change.other": "Changes",
"session.review.loadingChanges": "Loading changes...", "session.review.loadingChanges": "Loading changes...",
"session.review.empty": "No changes in this session yet", "session.review.empty": "No changes in this session yet",
"session.review.noChanges": "No changes",
"session.files.selectToOpen": "Select a file to open",
"session.files.all": "All files",
"session.messages.renderEarlier": "Render earlier messages", "session.messages.renderEarlier": "Render earlier messages",
"session.messages.loadingEarlier": "Loading earlier messages...", "session.messages.loadingEarlier": "Loading earlier messages...",
"session.messages.loadEarlier": "Load earlier messages", "session.messages.loadEarlier": "Load earlier messages",
@@ -495,6 +518,8 @@ export const dict = {
"sidebar.project.recentSessions": "Recent sessions", "sidebar.project.recentSessions": "Recent sessions",
"sidebar.project.viewAllSessions": "View all sessions", "sidebar.project.viewAllSessions": "View all sessions",
"app.name.desktop": "OpenCode Desktop",
"settings.section.desktop": "Desktop", "settings.section.desktop": "Desktop",
"settings.section.server": "Server", "settings.section.server": "Server",
"settings.tab.general": "General", "settings.tab.general": "General",
@@ -502,6 +527,7 @@ export const dict = {
"settings.general.section.appearance": "Appearance", "settings.general.section.appearance": "Appearance",
"settings.general.section.notifications": "System notifications", "settings.general.section.notifications": "System notifications",
"settings.general.section.updates": "Updates",
"settings.general.section.sounds": "Sound effects", "settings.general.section.sounds": "Sound effects",
"settings.general.row.language.title": "Language", "settings.general.row.language.title": "Language",
@@ -512,6 +538,18 @@ export const dict = {
"settings.general.row.theme.description": "Customise how OpenCode is themed.", "settings.general.row.theme.description": "Customise how OpenCode is themed.",
"settings.general.row.font.title": "Font", "settings.general.row.font.title": "Font",
"settings.general.row.font.description": "Customise the mono font used in code blocks", "settings.general.row.font.description": "Customise the mono font used in code blocks",
"settings.general.row.releaseNotes.title": "Release notes",
"settings.general.row.releaseNotes.description": "Show What's New popups after updates",
"settings.updates.row.startup.title": "Check for updates on startup",
"settings.updates.row.startup.description": "Automatically check for updates when OpenCode launches",
"settings.updates.row.check.title": "Check for updates",
"settings.updates.row.check.description": "Manually check for updates and install if available",
"settings.updates.action.checkNow": "Check now",
"settings.updates.action.checking": "Checking...",
"settings.updates.toast.latest.title": "You're up to date",
"settings.updates.toast.latest.description": "You're running the latest version of OpenCode.",
"font.option.ibmPlexMono": "IBM Plex Mono", "font.option.ibmPlexMono": "IBM Plex Mono",
"font.option.cascadiaCode": "Cascadia Code", "font.option.cascadiaCode": "Cascadia Code",
"font.option.firaCode": "Fira Code", "font.option.firaCode": "Fira Code",
@@ -678,6 +716,7 @@ export const dict = {
"workspace.reset.failed.title": "Failed to reset workspace", "workspace.reset.failed.title": "Failed to reset workspace",
"workspace.reset.success.title": "Workspace reset", "workspace.reset.success.title": "Workspace reset",
"workspace.reset.success.description": "Workspace now matches the default branch.", "workspace.reset.success.description": "Workspace now matches the default branch.",
"workspace.error.stillPreparing": "Workspace is still preparing",
"workspace.status.checking": "Checking for unmerged changes...", "workspace.status.checking": "Checking for unmerged changes...",
"workspace.status.error": "Unable to verify git status.", "workspace.status.error": "Unable to verify git status.",
"workspace.status.clean": "No unmerged changes detected.", "workspace.status.clean": "No unmerged changes detected.",
+128
View File
@@ -8,6 +8,7 @@ export const dict = {
"command.category.theme": "Tema", "command.category.theme": "Tema",
"command.category.language": "Idioma", "command.category.language": "Idioma",
"command.category.file": "Archivo", "command.category.file": "Archivo",
"command.category.context": "Contexto",
"command.category.terminal": "Terminal", "command.category.terminal": "Terminal",
"command.category.model": "Modelo", "command.category.model": "Modelo",
"command.category.mcp": "MCP", "command.category.mcp": "MCP",
@@ -15,6 +16,7 @@ export const dict = {
"command.category.permissions": "Permisos", "command.category.permissions": "Permisos",
"command.category.workspace": "Espacio de trabajo", "command.category.workspace": "Espacio de trabajo",
"command.category.settings": "Ajustes",
"theme.scheme.system": "Sistema", "theme.scheme.system": "Sistema",
"theme.scheme.light": "Claro", "theme.scheme.light": "Claro",
"theme.scheme.dark": "Oscuro", "theme.scheme.dark": "Oscuro",
@@ -23,6 +25,7 @@ export const dict = {
"command.project.open": "Abrir proyecto", "command.project.open": "Abrir proyecto",
"command.provider.connect": "Conectar proveedor", "command.provider.connect": "Conectar proveedor",
"command.server.switch": "Cambiar servidor", "command.server.switch": "Cambiar servidor",
"command.settings.open": "Abrir ajustes",
"command.session.previous": "Sesión anterior", "command.session.previous": "Sesión anterior",
"command.session.next": "Siguiente sesión", "command.session.next": "Siguiente sesión",
"command.session.archive": "Archivar sesión", "command.session.archive": "Archivar sesión",
@@ -40,7 +43,10 @@ export const dict = {
"command.session.new": "Nueva sesión", "command.session.new": "Nueva sesión",
"command.file.open": "Abrir archivo", "command.file.open": "Abrir archivo",
"command.file.open.description": "Buscar archivos y comandos", "command.file.open.description": "Buscar archivos y comandos",
"command.context.addSelection": "Añadir selección al contexto",
"command.context.addSelection.description": "Añadir las líneas seleccionadas del archivo actual",
"command.terminal.toggle": "Alternar terminal", "command.terminal.toggle": "Alternar terminal",
"command.fileTree.toggle": "Alternar árbol de archivos",
"command.review.toggle": "Alternar revisión", "command.review.toggle": "Alternar revisión",
"command.terminal.new": "Nueva terminal", "command.terminal.new": "Nueva terminal",
"command.terminal.new.description": "Crear una nueva pestaña de terminal", "command.terminal.new.description": "Crear una nueva pestaña de terminal",
@@ -117,6 +123,7 @@ export const dict = {
"provider.connect.opencodeZen.line2": "provider.connect.opencodeZen.line2":
"Con una sola clave API obtendrás acceso a modelos como Claude, GPT, Gemini, GLM y más.", "Con una sola clave API obtendrás acceso a modelos como Claude, GPT, Gemini, GLM y más.",
"provider.connect.opencodeZen.visit.prefix": "Visita ", "provider.connect.opencodeZen.visit.prefix": "Visita ",
"provider.connect.opencodeZen.visit.link": "opencode.ai/zen",
"provider.connect.opencodeZen.visit.suffix": " para obtener tu clave API.", "provider.connect.opencodeZen.visit.suffix": " para obtener tu clave API.",
"provider.connect.oauth.code.visit.prefix": "Visita ", "provider.connect.oauth.code.visit.prefix": "Visita ",
"provider.connect.oauth.code.visit.link": "este enlace", "provider.connect.oauth.code.visit.link": "este enlace",
@@ -134,13 +141,32 @@ export const dict = {
"provider.connect.toast.connected.title": "{{provider}} conectado", "provider.connect.toast.connected.title": "{{provider}} conectado",
"provider.connect.toast.connected.description": "Los modelos de {{provider}} ahora están disponibles para usar.", "provider.connect.toast.connected.description": "Los modelos de {{provider}} ahora están disponibles para usar.",
"provider.disconnect.toast.disconnected.title": "{{provider}} desconectado",
"provider.disconnect.toast.disconnected.description": "Los modelos de {{provider}} ya no están disponibles.",
"model.tag.free": "Gratis", "model.tag.free": "Gratis",
"model.tag.latest": "Último", "model.tag.latest": "Último",
"model.provider.anthropic": "Anthropic",
"model.provider.openai": "OpenAI",
"model.provider.google": "Google",
"model.provider.xai": "xAI",
"model.provider.meta": "Meta",
"model.input.text": "texto",
"model.input.image": "imagen",
"model.input.audio": "audio",
"model.input.video": "video",
"model.input.pdf": "pdf",
"model.tooltip.allows": "Permite: {{inputs}}",
"model.tooltip.reasoning.allowed": "Permite razonamiento",
"model.tooltip.reasoning.none": "Sin razonamiento",
"model.tooltip.context": "Límite de contexto {{limit}}",
"common.search.placeholder": "Buscar", "common.search.placeholder": "Buscar",
"common.goBack": "Volver", "common.goBack": "Volver",
"common.loading": "Cargando", "common.loading": "Cargando",
"common.loading.ellipsis": "...",
"common.cancel": "Cancelar", "common.cancel": "Cancelar",
"common.connect": "Conectar",
"common.disconnect": "Desconectar",
"common.submit": "Enviar", "common.submit": "Enviar",
"common.save": "Guardar", "common.save": "Guardar",
"common.saving": "Guardando...", "common.saving": "Guardando...",
@@ -149,6 +175,8 @@ export const dict = {
"prompt.placeholder.shell": "Introduce comando de shell...", "prompt.placeholder.shell": "Introduce comando de shell...",
"prompt.placeholder.normal": 'Pregunta cualquier cosa... "{{example}}"', "prompt.placeholder.normal": 'Pregunta cualquier cosa... "{{example}}"',
"prompt.placeholder.summarizeComments": "Resumir comentarios…",
"prompt.placeholder.summarizeComment": "Resumir comentario…",
"prompt.mode.shell": "Shell", "prompt.mode.shell": "Shell",
"prompt.mode.shell.exit": "esc para salir", "prompt.mode.shell.exit": "esc para salir",
@@ -252,6 +280,10 @@ export const dict = {
"dialog.project.edit.color": "Color", "dialog.project.edit.color": "Color",
"dialog.project.edit.color.select": "Seleccionar color {{color}}", "dialog.project.edit.color.select": "Seleccionar color {{color}}",
"dialog.project.edit.worktree.startup": "Script de inicio del espacio de trabajo",
"dialog.project.edit.worktree.startup.description":
"Se ejecuta después de crear un nuevo espacio de trabajo (árbol de trabajo).",
"dialog.project.edit.worktree.startup.placeholder": "p. ej. bun install",
"context.breakdown.title": "Desglose de Contexto", "context.breakdown.title": "Desglose de Contexto",
"context.breakdown.note": "context.breakdown.note":
'Desglose aproximado de tokens de entrada. "Otro" incluye definiciones de herramientas y sobrecarga.', 'Desglose aproximado de tokens de entrada. "Otro" incluye definiciones de herramientas y sobrecarga.',
@@ -301,6 +333,7 @@ export const dict = {
"language.ar": "العربية", "language.ar": "العربية",
"language.no": "Norsk", "language.no": "Norsk",
"language.br": "Português (Brasil)", "language.br": "Português (Brasil)",
"language.th": "ไทย",
"toast.language.title": "Idioma", "toast.language.title": "Idioma",
"toast.language.description": "Cambiado a {{language}}", "toast.language.description": "Cambiado a {{language}}",
@@ -318,6 +351,9 @@ export const dict = {
"toast.file.loadFailed.title": "Fallo al cargar archivo", "toast.file.loadFailed.title": "Fallo al cargar archivo",
"toast.file.listFailed.title": "Fallo al listar archivos",
"toast.context.noLineSelection.title": "Sin selección de líneas",
"toast.context.noLineSelection.description": "Primero selecciona un rango de líneas en una pestaña de archivo.",
"toast.session.share.copyFailed.title": "Fallo al copiar URL al portapapeles", "toast.session.share.copyFailed.title": "Fallo al copiar URL al portapapeles",
"toast.session.share.success.title": "Sesión compartida", "toast.session.share.success.title": "Sesión compartida",
"toast.session.share.success.description": "¡URL compartida copiada al portapapeles!", "toast.session.share.success.description": "¡URL compartida copiada al portapapeles!",
@@ -393,13 +429,19 @@ export const dict = {
"session.tab.context": "Contexto", "session.tab.context": "Contexto",
"session.panel.reviewAndFiles": "Revisión y archivos", "session.panel.reviewAndFiles": "Revisión y archivos",
"session.review.filesChanged": "{{count}} Archivos Cambiados", "session.review.filesChanged": "{{count}} Archivos Cambiados",
"session.review.change.one": "Cambio",
"session.review.change.other": "Cambios",
"session.review.loadingChanges": "Cargando cambios...", "session.review.loadingChanges": "Cargando cambios...",
"session.review.empty": "No hay cambios en esta sesión aún", "session.review.empty": "No hay cambios en esta sesión aún",
"session.review.noChanges": "Sin cambios",
"session.files.selectToOpen": "Selecciona un archivo para abrir",
"session.files.all": "Todos los archivos",
"session.messages.renderEarlier": "Renderizar mensajes anteriores", "session.messages.renderEarlier": "Renderizar mensajes anteriores",
"session.messages.loadingEarlier": "Cargando mensajes anteriores...", "session.messages.loadingEarlier": "Cargando mensajes anteriores...",
"session.messages.loadEarlier": "Cargar mensajes anteriores", "session.messages.loadEarlier": "Cargar mensajes anteriores",
"session.messages.loading": "Cargando mensajes...", "session.messages.loading": "Cargando mensajes...",
"session.messages.jumpToLatest": "Ir al último",
"session.context.addToContext": "Añadir {{selection}} al contexto", "session.context.addToContext": "Añadir {{selection}} al contexto",
"session.new.worktree.main": "Rama principal", "session.new.worktree.main": "Rama principal",
@@ -441,6 +483,9 @@ export const dict = {
"terminal.title.numbered": "Terminal {{number}}", "terminal.title.numbered": "Terminal {{number}}",
"terminal.close": "Cerrar terminal", "terminal.close": "Cerrar terminal",
"terminal.connectionLost.title": "Conexión perdida",
"terminal.connectionLost.description":
"La conexión del terminal se interrumpió. Esto puede ocurrir cuando el servidor se reinicia.",
"common.closeTab": "Cerrar pestaña", "common.closeTab": "Cerrar pestaña",
"common.dismiss": "Descartar", "common.dismiss": "Descartar",
"common.requestFailed": "Solicitud fallida", "common.requestFailed": "Solicitud fallida",
@@ -454,6 +499,8 @@ export const dict = {
"common.edit": "Editar", "common.edit": "Editar",
"common.loadMore": "Cargar más", "common.loadMore": "Cargar más",
"common.key.esc": "ESC",
"sidebar.menu.toggle": "Alternar menú",
"sidebar.nav.projectsAndSessions": "Proyectos y sesiones", "sidebar.nav.projectsAndSessions": "Proyectos y sesiones",
"sidebar.settings": "Ajustes", "sidebar.settings": "Ajustes",
"sidebar.help": "Ayuda", "sidebar.help": "Ayuda",
@@ -465,12 +512,15 @@ export const dict = {
"sidebar.project.recentSessions": "Sesiones recientes", "sidebar.project.recentSessions": "Sesiones recientes",
"sidebar.project.viewAllSessions": "Ver todas las sesiones", "sidebar.project.viewAllSessions": "Ver todas las sesiones",
"app.name.desktop": "OpenCode Desktop",
"settings.section.desktop": "Escritorio", "settings.section.desktop": "Escritorio",
"settings.section.server": "Servidor",
"settings.tab.general": "General", "settings.tab.general": "General",
"settings.tab.shortcuts": "Atajos", "settings.tab.shortcuts": "Atajos",
"settings.general.section.appearance": "Apariencia", "settings.general.section.appearance": "Apariencia",
"settings.general.section.notifications": "Notificaciones del sistema", "settings.general.section.notifications": "Notificaciones del sistema",
"settings.general.section.updates": "Actualizaciones",
"settings.general.section.sounds": "Efectos de sonido", "settings.general.section.sounds": "Efectos de sonido",
"settings.general.row.language.title": "Idioma", "settings.general.row.language.title": "Idioma",
@@ -482,6 +532,76 @@ export const dict = {
"settings.general.row.font.title": "Fuente", "settings.general.row.font.title": "Fuente",
"settings.general.row.font.description": "Personaliza la fuente mono usada en bloques de código", "settings.general.row.font.description": "Personaliza la fuente mono usada en bloques de código",
"settings.general.row.releaseNotes.title": "Notas de la versión",
"settings.general.row.releaseNotes.description":
'Mostrar ventanas emergentes de "Novedades" después de las actualizaciones',
"settings.updates.row.startup.title": "Buscar actualizaciones al iniciar",
"settings.updates.row.startup.description": "Buscar actualizaciones automáticamente cuando se inicia OpenCode",
"settings.updates.row.check.title": "Buscar actualizaciones",
"settings.updates.row.check.description": "Buscar actualizaciones manualmente e instalarlas si hay alguna",
"settings.updates.action.checkNow": "Buscar ahora",
"settings.updates.action.checking": "Buscando...",
"settings.updates.toast.latest.title": "Estás al día",
"settings.updates.toast.latest.description": "Estás usando la última versión de OpenCode.",
"font.option.ibmPlexMono": "IBM Plex Mono",
"font.option.cascadiaCode": "Cascadia Code",
"font.option.firaCode": "Fira Code",
"font.option.hack": "Hack",
"font.option.inconsolata": "Inconsolata",
"font.option.intelOneMono": "Intel One Mono",
"font.option.iosevka": "Iosevka",
"font.option.jetbrainsMono": "JetBrains Mono",
"font.option.mesloLgs": "Meslo LGS",
"font.option.robotoMono": "Roboto Mono",
"font.option.sourceCodePro": "Source Code Pro",
"font.option.ubuntuMono": "Ubuntu Mono",
"sound.option.alert01": "Alerta 01",
"sound.option.alert02": "Alerta 02",
"sound.option.alert03": "Alerta 03",
"sound.option.alert04": "Alerta 04",
"sound.option.alert05": "Alerta 05",
"sound.option.alert06": "Alerta 06",
"sound.option.alert07": "Alerta 07",
"sound.option.alert08": "Alerta 08",
"sound.option.alert09": "Alerta 09",
"sound.option.alert10": "Alerta 10",
"sound.option.bipbop01": "Bip-bop 01",
"sound.option.bipbop02": "Bip-bop 02",
"sound.option.bipbop03": "Bip-bop 03",
"sound.option.bipbop04": "Bip-bop 04",
"sound.option.bipbop05": "Bip-bop 05",
"sound.option.bipbop06": "Bip-bop 06",
"sound.option.bipbop07": "Bip-bop 07",
"sound.option.bipbop08": "Bip-bop 08",
"sound.option.bipbop09": "Bip-bop 09",
"sound.option.bipbop10": "Bip-bop 10",
"sound.option.staplebops01": "Staplebops 01",
"sound.option.staplebops02": "Staplebops 02",
"sound.option.staplebops03": "Staplebops 03",
"sound.option.staplebops04": "Staplebops 04",
"sound.option.staplebops05": "Staplebops 05",
"sound.option.staplebops06": "Staplebops 06",
"sound.option.staplebops07": "Staplebops 07",
"sound.option.nope01": "No 01",
"sound.option.nope02": "No 02",
"sound.option.nope03": "No 03",
"sound.option.nope04": "No 04",
"sound.option.nope05": "No 05",
"sound.option.nope06": "No 06",
"sound.option.nope07": "No 07",
"sound.option.nope08": "No 08",
"sound.option.nope09": "No 09",
"sound.option.nope10": "No 10",
"sound.option.nope11": "No 11",
"sound.option.nope12": "No 12",
"sound.option.yup01": "Sí 01",
"sound.option.yup02": "Sí 02",
"sound.option.yup03": "Sí 03",
"sound.option.yup04": "Sí 04",
"sound.option.yup05": "Sí 05",
"sound.option.yup06": "Sí 06",
"settings.general.notifications.agent.title": "Agente", "settings.general.notifications.agent.title": "Agente",
"settings.general.notifications.agent.description": "settings.general.notifications.agent.description":
"Mostrar notificación del sistema cuando el agente termine o necesite atención", "Mostrar notificación del sistema cuando el agente termine o necesite atención",
@@ -519,6 +639,13 @@ export const dict = {
"settings.providers.title": "Proveedores", "settings.providers.title": "Proveedores",
"settings.providers.description": "La configuración de proveedores estará disponible aquí.", "settings.providers.description": "La configuración de proveedores estará disponible aquí.",
"settings.providers.section.connected": "Proveedores conectados",
"settings.providers.connected.empty": "No hay proveedores conectados",
"settings.providers.section.popular": "Proveedores populares",
"settings.providers.tag.environment": "Entorno",
"settings.providers.tag.config": "Configuración",
"settings.providers.tag.custom": "Personalizado",
"settings.providers.tag.other": "Otro",
"settings.models.title": "Modelos", "settings.models.title": "Modelos",
"settings.models.description": "La configuración de modelos estará disponible aquí.", "settings.models.description": "La configuración de modelos estará disponible aquí.",
"settings.agents.title": "Agentes", "settings.agents.title": "Agentes",
@@ -586,6 +713,7 @@ export const dict = {
"workspace.reset.failed.title": "Fallo al restablecer espacio de trabajo", "workspace.reset.failed.title": "Fallo al restablecer espacio de trabajo",
"workspace.reset.success.title": "Espacio de trabajo restablecido", "workspace.reset.success.title": "Espacio de trabajo restablecido",
"workspace.reset.success.description": "El espacio de trabajo ahora coincide con la rama predeterminada.", "workspace.reset.success.description": "El espacio de trabajo ahora coincide con la rama predeterminada.",
"workspace.error.stillPreparing": "El espacio de trabajo aún se está preparando",
"workspace.status.checking": "Comprobando cambios no fusionados...", "workspace.status.checking": "Comprobando cambios no fusionados...",
"workspace.status.error": "No se pudo verificar el estado de git.", "workspace.status.error": "No se pudo verificar el estado de git.",
"workspace.status.clean": "No se detectaron cambios no fusionados.", "workspace.status.clean": "No se detectaron cambios no fusionados.",
+127
View File
@@ -8,6 +8,7 @@ export const dict = {
"command.category.theme": "Thème", "command.category.theme": "Thème",
"command.category.language": "Langue", "command.category.language": "Langue",
"command.category.file": "Fichier", "command.category.file": "Fichier",
"command.category.context": "Contexte",
"command.category.terminal": "Terminal", "command.category.terminal": "Terminal",
"command.category.model": "Modèle", "command.category.model": "Modèle",
"command.category.mcp": "MCP", "command.category.mcp": "MCP",
@@ -15,6 +16,7 @@ export const dict = {
"command.category.permissions": "Permissions", "command.category.permissions": "Permissions",
"command.category.workspace": "Espace de travail", "command.category.workspace": "Espace de travail",
"command.category.settings": "Paramètres",
"theme.scheme.system": "Système", "theme.scheme.system": "Système",
"theme.scheme.light": "Clair", "theme.scheme.light": "Clair",
"theme.scheme.dark": "Sombre", "theme.scheme.dark": "Sombre",
@@ -23,6 +25,7 @@ export const dict = {
"command.project.open": "Ouvrir un projet", "command.project.open": "Ouvrir un projet",
"command.provider.connect": "Connecter un fournisseur", "command.provider.connect": "Connecter un fournisseur",
"command.server.switch": "Changer de serveur", "command.server.switch": "Changer de serveur",
"command.settings.open": "Ouvrir les paramètres",
"command.session.previous": "Session précédente", "command.session.previous": "Session précédente",
"command.session.next": "Session suivante", "command.session.next": "Session suivante",
"command.session.archive": "Archiver la session", "command.session.archive": "Archiver la session",
@@ -40,7 +43,10 @@ export const dict = {
"command.session.new": "Nouvelle session", "command.session.new": "Nouvelle session",
"command.file.open": "Ouvrir un fichier", "command.file.open": "Ouvrir un fichier",
"command.file.open.description": "Rechercher des fichiers et des commandes", "command.file.open.description": "Rechercher des fichiers et des commandes",
"command.context.addSelection": "Ajouter la sélection au contexte",
"command.context.addSelection.description": "Ajouter les lignes sélectionnées du fichier actuel",
"command.terminal.toggle": "Basculer le terminal", "command.terminal.toggle": "Basculer le terminal",
"command.fileTree.toggle": "Basculer l'arborescence des fichiers",
"command.review.toggle": "Basculer la revue", "command.review.toggle": "Basculer la revue",
"command.terminal.new": "Nouveau terminal", "command.terminal.new": "Nouveau terminal",
"command.terminal.new.description": "Créer un nouvel onglet de terminal", "command.terminal.new.description": "Créer un nouvel onglet de terminal",
@@ -117,6 +123,7 @@ export const dict = {
"provider.connect.opencodeZen.line2": "provider.connect.opencodeZen.line2":
"Avec une seule clé API, vous aurez accès à des modèles tels que Claude, GPT, Gemini, GLM et plus encore.", "Avec une seule clé API, vous aurez accès à des modèles tels que Claude, GPT, Gemini, GLM et plus encore.",
"provider.connect.opencodeZen.visit.prefix": "Visitez ", "provider.connect.opencodeZen.visit.prefix": "Visitez ",
"provider.connect.opencodeZen.visit.link": "opencode.ai/zen",
"provider.connect.opencodeZen.visit.suffix": " pour récupérer votre clé API.", "provider.connect.opencodeZen.visit.suffix": " pour récupérer votre clé API.",
"provider.connect.oauth.code.visit.prefix": "Visitez ", "provider.connect.oauth.code.visit.prefix": "Visitez ",
"provider.connect.oauth.code.visit.link": "ce lien", "provider.connect.oauth.code.visit.link": "ce lien",
@@ -134,13 +141,32 @@ export const dict = {
"provider.connect.toast.connected.title": "{{provider}} connecté", "provider.connect.toast.connected.title": "{{provider}} connecté",
"provider.connect.toast.connected.description": "Les modèles {{provider}} sont maintenant disponibles.", "provider.connect.toast.connected.description": "Les modèles {{provider}} sont maintenant disponibles.",
"provider.disconnect.toast.disconnected.title": "{{provider}} déconnecté",
"provider.disconnect.toast.disconnected.description": "Les modèles {{provider}} ne sont plus disponibles.",
"model.tag.free": "Gratuit", "model.tag.free": "Gratuit",
"model.tag.latest": "Dernier", "model.tag.latest": "Dernier",
"model.provider.anthropic": "Anthropic",
"model.provider.openai": "OpenAI",
"model.provider.google": "Google",
"model.provider.xai": "xAI",
"model.provider.meta": "Meta",
"model.input.text": "texte",
"model.input.image": "image",
"model.input.audio": "audio",
"model.input.video": "vidéo",
"model.input.pdf": "pdf",
"model.tooltip.allows": "Autorise : {{inputs}}",
"model.tooltip.reasoning.allowed": "Autorise le raisonnement",
"model.tooltip.reasoning.none": "Sans raisonnement",
"model.tooltip.context": "Limite de contexte {{limit}}",
"common.search.placeholder": "Rechercher", "common.search.placeholder": "Rechercher",
"common.goBack": "Retour", "common.goBack": "Retour",
"common.loading": "Chargement", "common.loading": "Chargement",
"common.loading.ellipsis": "...",
"common.cancel": "Annuler", "common.cancel": "Annuler",
"common.connect": "Connecter",
"common.disconnect": "Déconnecter",
"common.submit": "Soumettre", "common.submit": "Soumettre",
"common.save": "Enregistrer", "common.save": "Enregistrer",
"common.saving": "Enregistrement...", "common.saving": "Enregistrement...",
@@ -149,6 +175,8 @@ export const dict = {
"prompt.placeholder.shell": "Entrez une commande shell...", "prompt.placeholder.shell": "Entrez une commande shell...",
"prompt.placeholder.normal": 'Demandez n\'importe quoi... "{{example}}"', "prompt.placeholder.normal": 'Demandez n\'importe quoi... "{{example}}"',
"prompt.placeholder.summarizeComments": "Résumer les commentaires…",
"prompt.placeholder.summarizeComment": "Résumer le commentaire…",
"prompt.mode.shell": "Shell", "prompt.mode.shell": "Shell",
"prompt.mode.shell.exit": "esc pour quitter", "prompt.mode.shell.exit": "esc pour quitter",
@@ -252,6 +280,10 @@ export const dict = {
"dialog.project.edit.color": "Couleur", "dialog.project.edit.color": "Couleur",
"dialog.project.edit.color.select": "Sélectionner la couleur {{color}}", "dialog.project.edit.color.select": "Sélectionner la couleur {{color}}",
"dialog.project.edit.worktree.startup": "Script de démarrage de l'espace de travail",
"dialog.project.edit.worktree.startup.description":
"S'exécute après la création d'un nouvel espace de travail (arbre de travail).",
"dialog.project.edit.worktree.startup.placeholder": "p. ex. bun install",
"context.breakdown.title": "Répartition du contexte", "context.breakdown.title": "Répartition du contexte",
"context.breakdown.note": "context.breakdown.note":
"Répartition approximative des jetons d'entrée. \"Autre\" inclut les définitions d'outils et les frais généraux.", "Répartition approximative des jetons d'entrée. \"Autre\" inclut les définitions d'outils et les frais généraux.",
@@ -301,6 +333,7 @@ export const dict = {
"language.ar": "العربية", "language.ar": "العربية",
"language.no": "Norsk", "language.no": "Norsk",
"language.br": "Português (Brasil)", "language.br": "Português (Brasil)",
"language.th": "ไทย",
"toast.language.title": "Langue", "toast.language.title": "Langue",
"toast.language.description": "Passé à {{language}}", "toast.language.description": "Passé à {{language}}",
@@ -320,6 +353,9 @@ export const dict = {
"toast.file.loadFailed.title": "Échec du chargement du fichier", "toast.file.loadFailed.title": "Échec du chargement du fichier",
"toast.file.listFailed.title": "Échec de la liste des fichiers",
"toast.context.noLineSelection.title": "Aucune sélection de lignes",
"toast.context.noLineSelection.description": "Sélectionnez d'abord une plage de lignes dans un onglet de fichier.",
"toast.session.share.copyFailed.title": "Échec de la copie de l'URL dans le presse-papiers", "toast.session.share.copyFailed.title": "Échec de la copie de l'URL dans le presse-papiers",
"toast.session.share.success.title": "Session partagée", "toast.session.share.success.title": "Session partagée",
"toast.session.share.success.description": "URL de partage copiée dans le presse-papiers !", "toast.session.share.success.description": "URL de partage copiée dans le presse-papiers !",
@@ -398,13 +434,19 @@ export const dict = {
"session.tab.context": "Contexte", "session.tab.context": "Contexte",
"session.panel.reviewAndFiles": "Revue et fichiers", "session.panel.reviewAndFiles": "Revue et fichiers",
"session.review.filesChanged": "{{count}} fichiers modifiés", "session.review.filesChanged": "{{count}} fichiers modifiés",
"session.review.change.one": "Modification",
"session.review.change.other": "Modifications",
"session.review.loadingChanges": "Chargement des modifications...", "session.review.loadingChanges": "Chargement des modifications...",
"session.review.empty": "Aucune modification dans cette session pour l'instant", "session.review.empty": "Aucune modification dans cette session pour l'instant",
"session.review.noChanges": "Aucune modification",
"session.files.selectToOpen": "Sélectionnez un fichier à ouvrir",
"session.files.all": "Tous les fichiers",
"session.messages.renderEarlier": "Afficher les messages précédents", "session.messages.renderEarlier": "Afficher les messages précédents",
"session.messages.loadingEarlier": "Chargement des messages précédents...", "session.messages.loadingEarlier": "Chargement des messages précédents...",
"session.messages.loadEarlier": "Charger les messages précédents", "session.messages.loadEarlier": "Charger les messages précédents",
"session.messages.loading": "Chargement des messages...", "session.messages.loading": "Chargement des messages...",
"session.messages.jumpToLatest": "Aller au dernier",
"session.context.addToContext": "Ajouter {{selection}} au contexte", "session.context.addToContext": "Ajouter {{selection}} au contexte",
"session.new.worktree.main": "Branche principale", "session.new.worktree.main": "Branche principale",
@@ -446,6 +488,9 @@ export const dict = {
"terminal.title.numbered": "Terminal {{number}}", "terminal.title.numbered": "Terminal {{number}}",
"terminal.close": "Fermer le terminal", "terminal.close": "Fermer le terminal",
"terminal.connectionLost.title": "Connexion perdue",
"terminal.connectionLost.description":
"La connexion au terminal a été interrompue. Cela peut arriver lorsque le serveur redémarre.",
"common.closeTab": "Fermer l'onglet", "common.closeTab": "Fermer l'onglet",
"common.dismiss": "Ignorer", "common.dismiss": "Ignorer",
"common.requestFailed": "La demande a échoué", "common.requestFailed": "La demande a échoué",
@@ -459,6 +504,8 @@ export const dict = {
"common.edit": "Modifier", "common.edit": "Modifier",
"common.loadMore": "Charger plus", "common.loadMore": "Charger plus",
"common.key.esc": "ESC",
"sidebar.menu.toggle": "Basculer le menu",
"sidebar.nav.projectsAndSessions": "Projets et sessions", "sidebar.nav.projectsAndSessions": "Projets et sessions",
"sidebar.settings": "Paramètres", "sidebar.settings": "Paramètres",
"sidebar.help": "Aide", "sidebar.help": "Aide",
@@ -472,12 +519,15 @@ export const dict = {
"sidebar.project.recentSessions": "Sessions récentes", "sidebar.project.recentSessions": "Sessions récentes",
"sidebar.project.viewAllSessions": "Voir toutes les sessions", "sidebar.project.viewAllSessions": "Voir toutes les sessions",
"app.name.desktop": "OpenCode Desktop",
"settings.section.desktop": "Bureau", "settings.section.desktop": "Bureau",
"settings.section.server": "Serveur",
"settings.tab.general": "Général", "settings.tab.general": "Général",
"settings.tab.shortcuts": "Raccourcis", "settings.tab.shortcuts": "Raccourcis",
"settings.general.section.appearance": "Apparence", "settings.general.section.appearance": "Apparence",
"settings.general.section.notifications": "Notifications système", "settings.general.section.notifications": "Notifications système",
"settings.general.section.updates": "Mises à jour",
"settings.general.section.sounds": "Effets sonores", "settings.general.section.sounds": "Effets sonores",
"settings.general.row.language.title": "Langue", "settings.general.row.language.title": "Langue",
@@ -489,6 +539,75 @@ export const dict = {
"settings.general.row.font.title": "Police", "settings.general.row.font.title": "Police",
"settings.general.row.font.description": "Personnaliser la police mono utilisée dans les blocs de code", "settings.general.row.font.description": "Personnaliser la police mono utilisée dans les blocs de code",
"settings.general.row.releaseNotes.title": "Notes de version",
"settings.general.row.releaseNotes.description": 'Afficher des pop-ups "Quoi de neuf" après les mises à jour',
"settings.updates.row.startup.title": "Vérifier les mises à jour au démarrage",
"settings.updates.row.startup.description": "Vérifier automatiquement les mises à jour au lancement d'OpenCode",
"settings.updates.row.check.title": "Vérifier les mises à jour",
"settings.updates.row.check.description": "Vérifier manuellement les mises à jour et installer si disponible",
"settings.updates.action.checkNow": "Vérifier maintenant",
"settings.updates.action.checking": "Vérification...",
"settings.updates.toast.latest.title": "Vous êtes à jour",
"settings.updates.toast.latest.description": "Vous utilisez la dernière version d'OpenCode.",
"font.option.ibmPlexMono": "IBM Plex Mono",
"font.option.cascadiaCode": "Cascadia Code",
"font.option.firaCode": "Fira Code",
"font.option.hack": "Hack",
"font.option.inconsolata": "Inconsolata",
"font.option.intelOneMono": "Intel One Mono",
"font.option.iosevka": "Iosevka",
"font.option.jetbrainsMono": "JetBrains Mono",
"font.option.mesloLgs": "Meslo LGS",
"font.option.robotoMono": "Roboto Mono",
"font.option.sourceCodePro": "Source Code Pro",
"font.option.ubuntuMono": "Ubuntu Mono",
"sound.option.alert01": "Alerte 01",
"sound.option.alert02": "Alerte 02",
"sound.option.alert03": "Alerte 03",
"sound.option.alert04": "Alerte 04",
"sound.option.alert05": "Alerte 05",
"sound.option.alert06": "Alerte 06",
"sound.option.alert07": "Alerte 07",
"sound.option.alert08": "Alerte 08",
"sound.option.alert09": "Alerte 09",
"sound.option.alert10": "Alerte 10",
"sound.option.bipbop01": "Bip-bop 01",
"sound.option.bipbop02": "Bip-bop 02",
"sound.option.bipbop03": "Bip-bop 03",
"sound.option.bipbop04": "Bip-bop 04",
"sound.option.bipbop05": "Bip-bop 05",
"sound.option.bipbop06": "Bip-bop 06",
"sound.option.bipbop07": "Bip-bop 07",
"sound.option.bipbop08": "Bip-bop 08",
"sound.option.bipbop09": "Bip-bop 09",
"sound.option.bipbop10": "Bip-bop 10",
"sound.option.staplebops01": "Staplebops 01",
"sound.option.staplebops02": "Staplebops 02",
"sound.option.staplebops03": "Staplebops 03",
"sound.option.staplebops04": "Staplebops 04",
"sound.option.staplebops05": "Staplebops 05",
"sound.option.staplebops06": "Staplebops 06",
"sound.option.staplebops07": "Staplebops 07",
"sound.option.nope01": "Non 01",
"sound.option.nope02": "Non 02",
"sound.option.nope03": "Non 03",
"sound.option.nope04": "Non 04",
"sound.option.nope05": "Non 05",
"sound.option.nope06": "Non 06",
"sound.option.nope07": "Non 07",
"sound.option.nope08": "Non 08",
"sound.option.nope09": "Non 09",
"sound.option.nope10": "Non 10",
"sound.option.nope11": "Non 11",
"sound.option.nope12": "Non 12",
"sound.option.yup01": "Oui 01",
"sound.option.yup02": "Oui 02",
"sound.option.yup03": "Oui 03",
"sound.option.yup04": "Oui 04",
"sound.option.yup05": "Oui 05",
"sound.option.yup06": "Oui 06",
"settings.general.notifications.agent.title": "Agent", "settings.general.notifications.agent.title": "Agent",
"settings.general.notifications.agent.description": "settings.general.notifications.agent.description":
"Afficher une notification système lorsque l'agent a terminé ou nécessite une attention", "Afficher une notification système lorsque l'agent a terminé ou nécessite une attention",
@@ -525,6 +644,13 @@ export const dict = {
"settings.providers.title": "Fournisseurs", "settings.providers.title": "Fournisseurs",
"settings.providers.description": "Les paramètres des fournisseurs seront configurables ici.", "settings.providers.description": "Les paramètres des fournisseurs seront configurables ici.",
"settings.providers.section.connected": "Fournisseurs connectés",
"settings.providers.connected.empty": "Aucun fournisseur connecté",
"settings.providers.section.popular": "Fournisseurs populaires",
"settings.providers.tag.environment": "Environnement",
"settings.providers.tag.config": "Configuration",
"settings.providers.tag.custom": "Personnalisé",
"settings.providers.tag.other": "Autre",
"settings.models.title": "Modèles", "settings.models.title": "Modèles",
"settings.models.description": "Les paramètres des modèles seront configurables ici.", "settings.models.description": "Les paramètres des modèles seront configurables ici.",
"settings.agents.title": "Agents", "settings.agents.title": "Agents",
@@ -593,6 +719,7 @@ export const dict = {
"workspace.reset.failed.title": "Échec de la réinitialisation de l'espace de travail", "workspace.reset.failed.title": "Échec de la réinitialisation de l'espace de travail",
"workspace.reset.success.title": "Espace de travail réinitialisé", "workspace.reset.success.title": "Espace de travail réinitialisé",
"workspace.reset.success.description": "L'espace de travail correspond maintenant à la branche par défaut.", "workspace.reset.success.description": "L'espace de travail correspond maintenant à la branche par défaut.",
"workspace.error.stillPreparing": "L'espace de travail est encore en cours de préparation",
"workspace.status.checking": "Vérification des modifications non fusionnées...", "workspace.status.checking": "Vérification des modifications non fusionnées...",
"workspace.status.error": "Impossible de vérifier le statut git.", "workspace.status.error": "Impossible de vérifier le statut git.",
"workspace.status.clean": "Aucune modification non fusionnée détectée.", "workspace.status.clean": "Aucune modification non fusionnée détectée.",
+127
View File
@@ -8,6 +8,7 @@ export const dict = {
"command.category.theme": "テーマ", "command.category.theme": "テーマ",
"command.category.language": "言語", "command.category.language": "言語",
"command.category.file": "ファイル", "command.category.file": "ファイル",
"command.category.context": "コンテキスト",
"command.category.terminal": "ターミナル", "command.category.terminal": "ターミナル",
"command.category.model": "モデル", "command.category.model": "モデル",
"command.category.mcp": "MCP", "command.category.mcp": "MCP",
@@ -15,6 +16,7 @@ export const dict = {
"command.category.permissions": "権限", "command.category.permissions": "権限",
"command.category.workspace": "ワークスペース", "command.category.workspace": "ワークスペース",
"command.category.settings": "設定",
"theme.scheme.system": "システム", "theme.scheme.system": "システム",
"theme.scheme.light": "ライト", "theme.scheme.light": "ライト",
"theme.scheme.dark": "ダーク", "theme.scheme.dark": "ダーク",
@@ -23,6 +25,7 @@ export const dict = {
"command.project.open": "プロジェクトを開く", "command.project.open": "プロジェクトを開く",
"command.provider.connect": "プロバイダーに接続", "command.provider.connect": "プロバイダーに接続",
"command.server.switch": "サーバーの切り替え", "command.server.switch": "サーバーの切り替え",
"command.settings.open": "設定を開く",
"command.session.previous": "前のセッション", "command.session.previous": "前のセッション",
"command.session.next": "次のセッション", "command.session.next": "次のセッション",
"command.session.archive": "セッションをアーカイブ", "command.session.archive": "セッションをアーカイブ",
@@ -40,7 +43,10 @@ export const dict = {
"command.session.new": "新しいセッション", "command.session.new": "新しいセッション",
"command.file.open": "ファイルを開く", "command.file.open": "ファイルを開く",
"command.file.open.description": "ファイルとコマンドを検索", "command.file.open.description": "ファイルとコマンドを検索",
"command.context.addSelection": "選択範囲をコンテキストに追加",
"command.context.addSelection.description": "現在のファイルから選択した行を追加",
"command.terminal.toggle": "ターミナルの切り替え", "command.terminal.toggle": "ターミナルの切り替え",
"command.fileTree.toggle": "ファイルツリーを切り替え",
"command.review.toggle": "レビューの切り替え", "command.review.toggle": "レビューの切り替え",
"command.terminal.new": "新しいターミナル", "command.terminal.new": "新しいターミナル",
"command.terminal.new.description": "新しいターミナルタブを作成", "command.terminal.new.description": "新しいターミナルタブを作成",
@@ -116,6 +122,7 @@ export const dict = {
"OpenCode Zenは、コーディングエージェント向けに最適化された信頼性の高いモデルへのアクセスを提供します。", "OpenCode Zenは、コーディングエージェント向けに最適化された信頼性の高いモデルへのアクセスを提供します。",
"provider.connect.opencodeZen.line2": "1つのAPIキーで、Claude、GPT、Gemini、GLMなどのモデルにアクセスできます。", "provider.connect.opencodeZen.line2": "1つのAPIキーで、Claude、GPT、Gemini、GLMなどのモデルにアクセスできます。",
"provider.connect.opencodeZen.visit.prefix": " ", "provider.connect.opencodeZen.visit.prefix": " ",
"provider.connect.opencodeZen.visit.link": "opencode.ai/zen",
"provider.connect.opencodeZen.visit.suffix": " にアクセスしてAPIキーを取得してください。", "provider.connect.opencodeZen.visit.suffix": " にアクセスしてAPIキーを取得してください。",
"provider.connect.oauth.code.visit.prefix": " ", "provider.connect.oauth.code.visit.prefix": " ",
"provider.connect.oauth.code.visit.link": "このリンク", "provider.connect.oauth.code.visit.link": "このリンク",
@@ -133,13 +140,32 @@ export const dict = {
"provider.connect.toast.connected.title": "{{provider}}が接続されました", "provider.connect.toast.connected.title": "{{provider}}が接続されました",
"provider.connect.toast.connected.description": "{{provider}}モデルが使用可能になりました。", "provider.connect.toast.connected.description": "{{provider}}モデルが使用可能になりました。",
"provider.disconnect.toast.disconnected.title": "{{provider}}が切断されました",
"provider.disconnect.toast.disconnected.description": "{{provider}}のモデルは利用できなくなりました。",
"model.tag.free": "無料", "model.tag.free": "無料",
"model.tag.latest": "最新", "model.tag.latest": "最新",
"model.provider.anthropic": "Anthropic",
"model.provider.openai": "OpenAI",
"model.provider.google": "Google",
"model.provider.xai": "xAI",
"model.provider.meta": "Meta",
"model.input.text": "テキスト",
"model.input.image": "画像",
"model.input.audio": "音声",
"model.input.video": "動画",
"model.input.pdf": "pdf",
"model.tooltip.allows": "対応: {{inputs}}",
"model.tooltip.reasoning.allowed": "推論を許可",
"model.tooltip.reasoning.none": "推論なし",
"model.tooltip.context": "コンテキスト上限 {{limit}}",
"common.search.placeholder": "検索", "common.search.placeholder": "検索",
"common.goBack": "戻る", "common.goBack": "戻る",
"common.loading": "読み込み中", "common.loading": "読み込み中",
"common.loading.ellipsis": "...",
"common.cancel": "キャンセル", "common.cancel": "キャンセル",
"common.connect": "接続",
"common.disconnect": "切断",
"common.submit": "送信", "common.submit": "送信",
"common.save": "保存", "common.save": "保存",
"common.saving": "保存中...", "common.saving": "保存中...",
@@ -148,6 +174,8 @@ export const dict = {
"prompt.placeholder.shell": "シェルコマンドを入力...", "prompt.placeholder.shell": "シェルコマンドを入力...",
"prompt.placeholder.normal": '何でも聞いてください... "{{example}}"', "prompt.placeholder.normal": '何でも聞いてください... "{{example}}"',
"prompt.placeholder.summarizeComments": "コメントを要約…",
"prompt.placeholder.summarizeComment": "コメントを要約…",
"prompt.mode.shell": "Shell", "prompt.mode.shell": "Shell",
"prompt.mode.shell.exit": "escで終了", "prompt.mode.shell.exit": "escで終了",
@@ -251,6 +279,10 @@ export const dict = {
"dialog.project.edit.color": "色", "dialog.project.edit.color": "色",
"dialog.project.edit.color.select": "{{color}}の色を選択", "dialog.project.edit.color.select": "{{color}}の色を選択",
"dialog.project.edit.worktree.startup": "ワークスペース起動スクリプト",
"dialog.project.edit.worktree.startup.description":
"新しいワークスペース (ワークツリー) を作成した後に実行されます。",
"dialog.project.edit.worktree.startup.placeholder": "例: bun install",
"context.breakdown.title": "コンテキストの内訳", "context.breakdown.title": "コンテキストの内訳",
"context.breakdown.note": '入力トークンのおおよその内訳です。"その他"にはツールの定義やオーバーヘッドが含まれます。', "context.breakdown.note": '入力トークンのおおよその内訳です。"その他"にはツールの定義やオーバーヘッドが含まれます。',
"context.breakdown.system": "システム", "context.breakdown.system": "システム",
@@ -299,6 +331,7 @@ export const dict = {
"language.ar": "العربية", "language.ar": "العربية",
"language.no": "Norsk", "language.no": "Norsk",
"language.br": "Português (Brasil)", "language.br": "Português (Brasil)",
"language.th": "ไทย",
"toast.language.title": "言語", "toast.language.title": "言語",
"toast.language.description": "{{language}}に切り替えました", "toast.language.description": "{{language}}に切り替えました",
@@ -316,6 +349,9 @@ export const dict = {
"toast.file.loadFailed.title": "ファイルの読み込みに失敗しました", "toast.file.loadFailed.title": "ファイルの読み込みに失敗しました",
"toast.file.listFailed.title": "ファイル一覧の取得に失敗しました",
"toast.context.noLineSelection.title": "行が選択されていません",
"toast.context.noLineSelection.description": "まずファイルタブで行範囲を選択してください。",
"toast.session.share.copyFailed.title": "URLのコピーに失敗しました", "toast.session.share.copyFailed.title": "URLのコピーに失敗しました",
"toast.session.share.success.title": "セッションを共有しました", "toast.session.share.success.title": "セッションを共有しました",
"toast.session.share.success.description": "共有URLをクリップボードにコピーしました!", "toast.session.share.success.description": "共有URLをクリップボードにコピーしました!",
@@ -390,13 +426,19 @@ export const dict = {
"session.tab.context": "コンテキスト", "session.tab.context": "コンテキスト",
"session.panel.reviewAndFiles": "レビューとファイル", "session.panel.reviewAndFiles": "レビューとファイル",
"session.review.filesChanged": "{{count}} ファイル変更", "session.review.filesChanged": "{{count}} ファイル変更",
"session.review.change.one": "変更",
"session.review.change.other": "変更",
"session.review.loadingChanges": "変更を読み込み中...", "session.review.loadingChanges": "変更を読み込み中...",
"session.review.empty": "このセッションでの変更はまだありません", "session.review.empty": "このセッションでの変更はまだありません",
"session.review.noChanges": "変更なし",
"session.files.selectToOpen": "開くファイルを選択",
"session.files.all": "すべてのファイル",
"session.messages.renderEarlier": "以前のメッセージを表示", "session.messages.renderEarlier": "以前のメッセージを表示",
"session.messages.loadingEarlier": "以前のメッセージを読み込み中...", "session.messages.loadingEarlier": "以前のメッセージを読み込み中...",
"session.messages.loadEarlier": "以前のメッセージを読み込む", "session.messages.loadEarlier": "以前のメッセージを読み込む",
"session.messages.loading": "メッセージを読み込み中...", "session.messages.loading": "メッセージを読み込み中...",
"session.messages.jumpToLatest": "最新へジャンプ",
"session.context.addToContext": "{{selection}}をコンテキストに追加", "session.context.addToContext": "{{selection}}をコンテキストに追加",
"session.new.worktree.main": "メインブランチ", "session.new.worktree.main": "メインブランチ",
@@ -438,6 +480,9 @@ export const dict = {
"terminal.title.numbered": "ターミナル {{number}}", "terminal.title.numbered": "ターミナル {{number}}",
"terminal.close": "ターミナルを閉じる", "terminal.close": "ターミナルを閉じる",
"terminal.connectionLost.title": "接続が失われました",
"terminal.connectionLost.description":
"ターミナルの接続が中断されました。これはサーバーが再起動したときに発生することがあります。",
"common.closeTab": "タブを閉じる", "common.closeTab": "タブを閉じる",
"common.dismiss": "閉じる", "common.dismiss": "閉じる",
"common.requestFailed": "リクエスト失敗", "common.requestFailed": "リクエスト失敗",
@@ -451,6 +496,8 @@ export const dict = {
"common.edit": "編集", "common.edit": "編集",
"common.loadMore": "さらに読み込む", "common.loadMore": "さらに読み込む",
"common.key.esc": "ESC",
"sidebar.menu.toggle": "メニューを切り替え",
"sidebar.nav.projectsAndSessions": "プロジェクトとセッション", "sidebar.nav.projectsAndSessions": "プロジェクトとセッション",
"sidebar.settings": "設定", "sidebar.settings": "設定",
"sidebar.help": "ヘルプ", "sidebar.help": "ヘルプ",
@@ -462,12 +509,15 @@ export const dict = {
"sidebar.project.recentSessions": "最近のセッション", "sidebar.project.recentSessions": "最近のセッション",
"sidebar.project.viewAllSessions": "すべてのセッションを表示", "sidebar.project.viewAllSessions": "すべてのセッションを表示",
"app.name.desktop": "OpenCode Desktop",
"settings.section.desktop": "デスクトップ", "settings.section.desktop": "デスクトップ",
"settings.section.server": "サーバー",
"settings.tab.general": "一般", "settings.tab.general": "一般",
"settings.tab.shortcuts": "ショートカット", "settings.tab.shortcuts": "ショートカット",
"settings.general.section.appearance": "外観", "settings.general.section.appearance": "外観",
"settings.general.section.notifications": "システム通知", "settings.general.section.notifications": "システム通知",
"settings.general.section.updates": "アップデート",
"settings.general.section.sounds": "効果音", "settings.general.section.sounds": "効果音",
"settings.general.row.language.title": "言語", "settings.general.row.language.title": "言語",
@@ -479,6 +529,75 @@ export const dict = {
"settings.general.row.font.title": "フォント", "settings.general.row.font.title": "フォント",
"settings.general.row.font.description": "コードブロックで使用する等幅フォントをカスタマイズします", "settings.general.row.font.description": "コードブロックで使用する等幅フォントをカスタマイズします",
"settings.general.row.releaseNotes.title": "リリースノート",
"settings.general.row.releaseNotes.description": "アップデート後に「新機能」ポップアップを表示",
"settings.updates.row.startup.title": "起動時にアップデートを確認",
"settings.updates.row.startup.description": "OpenCode の起動時に自動でアップデートを確認します",
"settings.updates.row.check.title": "アップデートを確認",
"settings.updates.row.check.description": "手動でアップデートを確認し、利用可能ならインストールします",
"settings.updates.action.checkNow": "今すぐ確認",
"settings.updates.action.checking": "確認中...",
"settings.updates.toast.latest.title": "最新です",
"settings.updates.toast.latest.description": "OpenCode は最新バージョンです。",
"font.option.ibmPlexMono": "IBM Plex Mono",
"font.option.cascadiaCode": "Cascadia Code",
"font.option.firaCode": "Fira Code",
"font.option.hack": "Hack",
"font.option.inconsolata": "Inconsolata",
"font.option.intelOneMono": "Intel One Mono",
"font.option.iosevka": "Iosevka",
"font.option.jetbrainsMono": "JetBrains Mono",
"font.option.mesloLgs": "Meslo LGS",
"font.option.robotoMono": "Roboto Mono",
"font.option.sourceCodePro": "Source Code Pro",
"font.option.ubuntuMono": "Ubuntu Mono",
"sound.option.alert01": "アラート 01",
"sound.option.alert02": "アラート 02",
"sound.option.alert03": "アラート 03",
"sound.option.alert04": "アラート 04",
"sound.option.alert05": "アラート 05",
"sound.option.alert06": "アラート 06",
"sound.option.alert07": "アラート 07",
"sound.option.alert08": "アラート 08",
"sound.option.alert09": "アラート 09",
"sound.option.alert10": "アラート 10",
"sound.option.bipbop01": "ビップボップ 01",
"sound.option.bipbop02": "ビップボップ 02",
"sound.option.bipbop03": "ビップボップ 03",
"sound.option.bipbop04": "ビップボップ 04",
"sound.option.bipbop05": "ビップボップ 05",
"sound.option.bipbop06": "ビップボップ 06",
"sound.option.bipbop07": "ビップボップ 07",
"sound.option.bipbop08": "ビップボップ 08",
"sound.option.bipbop09": "ビップボップ 09",
"sound.option.bipbop10": "ビップボップ 10",
"sound.option.staplebops01": "ステープルボップス 01",
"sound.option.staplebops02": "ステープルボップス 02",
"sound.option.staplebops03": "ステープルボップス 03",
"sound.option.staplebops04": "ステープルボップス 04",
"sound.option.staplebops05": "ステープルボップス 05",
"sound.option.staplebops06": "ステープルボップス 06",
"sound.option.staplebops07": "ステープルボップス 07",
"sound.option.nope01": "いいえ 01",
"sound.option.nope02": "いいえ 02",
"sound.option.nope03": "いいえ 03",
"sound.option.nope04": "いいえ 04",
"sound.option.nope05": "いいえ 05",
"sound.option.nope06": "いいえ 06",
"sound.option.nope07": "いいえ 07",
"sound.option.nope08": "いいえ 08",
"sound.option.nope09": "いいえ 09",
"sound.option.nope10": "いいえ 10",
"sound.option.nope11": "いいえ 11",
"sound.option.nope12": "いいえ 12",
"sound.option.yup01": "はい 01",
"sound.option.yup02": "はい 02",
"sound.option.yup03": "はい 03",
"sound.option.yup04": "はい 04",
"sound.option.yup05": "はい 05",
"sound.option.yup06": "はい 06",
"settings.general.notifications.agent.title": "エージェント", "settings.general.notifications.agent.title": "エージェント",
"settings.general.notifications.agent.description": "settings.general.notifications.agent.description":
"エージェントが完了したか、注意が必要な場合にシステム通知を表示します", "エージェントが完了したか、注意が必要な場合にシステム通知を表示します",
@@ -514,6 +633,13 @@ export const dict = {
"settings.providers.title": "プロバイダー", "settings.providers.title": "プロバイダー",
"settings.providers.description": "プロバイダー設定はここで構成できます。", "settings.providers.description": "プロバイダー設定はここで構成できます。",
"settings.providers.section.connected": "接続済みプロバイダー",
"settings.providers.connected.empty": "接続済みプロバイダーはありません",
"settings.providers.section.popular": "人気のプロバイダー",
"settings.providers.tag.environment": "環境",
"settings.providers.tag.config": "設定",
"settings.providers.tag.custom": "カスタム",
"settings.providers.tag.other": "その他",
"settings.models.title": "モデル", "settings.models.title": "モデル",
"settings.models.description": "モデル設定はここで構成できます。", "settings.models.description": "モデル設定はここで構成できます。",
"settings.agents.title": "エージェント", "settings.agents.title": "エージェント",
@@ -580,6 +706,7 @@ export const dict = {
"workspace.reset.failed.title": "ワークスペースのリセットに失敗しました", "workspace.reset.failed.title": "ワークスペースのリセットに失敗しました",
"workspace.reset.success.title": "ワークスペースをリセットしました", "workspace.reset.success.title": "ワークスペースをリセットしました",
"workspace.reset.success.description": "ワークスペースはデフォルトブランチと一致しています。", "workspace.reset.success.description": "ワークスペースはデフォルトブランチと一致しています。",
"workspace.error.stillPreparing": "ワークスペースはまだ準備中です",
"workspace.status.checking": "未マージの変更を確認中...", "workspace.status.checking": "未マージの変更を確認中...",
"workspace.status.error": "gitステータスを確認できません。", "workspace.status.error": "gitステータスを確認できません。",
"workspace.status.clean": "未マージの変更は検出されませんでした。", "workspace.status.clean": "未マージの変更は検出されませんでした。",
+126
View File
@@ -12,6 +12,7 @@ export const dict = {
"command.category.theme": "테마", "command.category.theme": "테마",
"command.category.language": "언어", "command.category.language": "언어",
"command.category.file": "파일", "command.category.file": "파일",
"command.category.context": "컨텍스트",
"command.category.terminal": "터미널", "command.category.terminal": "터미널",
"command.category.model": "모델", "command.category.model": "모델",
"command.category.mcp": "MCP", "command.category.mcp": "MCP",
@@ -19,6 +20,7 @@ export const dict = {
"command.category.permissions": "권한", "command.category.permissions": "권한",
"command.category.workspace": "작업 공간", "command.category.workspace": "작업 공간",
"command.category.settings": "설정",
"theme.scheme.system": "시스템", "theme.scheme.system": "시스템",
"theme.scheme.light": "라이트", "theme.scheme.light": "라이트",
"theme.scheme.dark": "다크", "theme.scheme.dark": "다크",
@@ -27,6 +29,7 @@ export const dict = {
"command.project.open": "프로젝트 열기", "command.project.open": "프로젝트 열기",
"command.provider.connect": "공급자 연결", "command.provider.connect": "공급자 연결",
"command.server.switch": "서버 전환", "command.server.switch": "서버 전환",
"command.settings.open": "설정 열기",
"command.session.previous": "이전 세션", "command.session.previous": "이전 세션",
"command.session.next": "다음 세션", "command.session.next": "다음 세션",
"command.session.archive": "세션 보관", "command.session.archive": "세션 보관",
@@ -44,7 +47,10 @@ export const dict = {
"command.session.new": "새 세션", "command.session.new": "새 세션",
"command.file.open": "파일 열기", "command.file.open": "파일 열기",
"command.file.open.description": "파일 및 명령어 검색", "command.file.open.description": "파일 및 명령어 검색",
"command.context.addSelection": "선택 영역을 컨텍스트에 추가",
"command.context.addSelection.description": "현재 파일에서 선택한 줄을 추가",
"command.terminal.toggle": "터미널 토글", "command.terminal.toggle": "터미널 토글",
"command.fileTree.toggle": "파일 트리 토글",
"command.review.toggle": "검토 토글", "command.review.toggle": "검토 토글",
"command.terminal.new": "새 터미널", "command.terminal.new": "새 터미널",
"command.terminal.new.description": "새 터미널 탭 생성", "command.terminal.new.description": "새 터미널 탭 생성",
@@ -120,6 +126,7 @@ export const dict = {
"OpenCode Zen은 코딩 에이전트를 위해 최적화된 신뢰할 수 있는 엄선된 모델에 대한 액세스를 제공합니다.", "OpenCode Zen은 코딩 에이전트를 위해 최적화된 신뢰할 수 있는 엄선된 모델에 대한 액세스를 제공합니다.",
"provider.connect.opencodeZen.line2": "단일 API 키로 Claude, GPT, Gemini, GLM 등 다양한 모델에 액세스할 수 있습니다.", "provider.connect.opencodeZen.line2": "단일 API 키로 Claude, GPT, Gemini, GLM 등 다양한 모델에 액세스할 수 있습니다.",
"provider.connect.opencodeZen.visit.prefix": "", "provider.connect.opencodeZen.visit.prefix": "",
"provider.connect.opencodeZen.visit.link": "opencode.ai/zen",
"provider.connect.opencodeZen.visit.suffix": "를 방문하여 API 키를 받으세요.", "provider.connect.opencodeZen.visit.suffix": "를 방문하여 API 키를 받으세요.",
"provider.connect.oauth.code.visit.prefix": "", "provider.connect.oauth.code.visit.prefix": "",
"provider.connect.oauth.code.visit.link": "이 링크", "provider.connect.oauth.code.visit.link": "이 링크",
@@ -137,13 +144,32 @@ export const dict = {
"provider.connect.toast.connected.title": "{{provider}} 연결됨", "provider.connect.toast.connected.title": "{{provider}} 연결됨",
"provider.connect.toast.connected.description": "이제 {{provider}} 모델을 사용할 수 있습니다.", "provider.connect.toast.connected.description": "이제 {{provider}} 모델을 사용할 수 있습니다.",
"provider.disconnect.toast.disconnected.title": "{{provider}} 연결 해제됨",
"provider.disconnect.toast.disconnected.description": "{{provider}} 모델을 더 이상 사용할 수 없습니다.",
"model.tag.free": "무료", "model.tag.free": "무료",
"model.tag.latest": "최신", "model.tag.latest": "최신",
"model.provider.anthropic": "Anthropic",
"model.provider.openai": "OpenAI",
"model.provider.google": "Google",
"model.provider.xai": "xAI",
"model.provider.meta": "Meta",
"model.input.text": "텍스트",
"model.input.image": "이미지",
"model.input.audio": "오디오",
"model.input.video": "비디오",
"model.input.pdf": "pdf",
"model.tooltip.allows": "지원: {{inputs}}",
"model.tooltip.reasoning.allowed": "추론 허용",
"model.tooltip.reasoning.none": "추론 없음",
"model.tooltip.context": "컨텍스트 제한 {{limit}}",
"common.search.placeholder": "검색", "common.search.placeholder": "검색",
"common.goBack": "뒤로 가기", "common.goBack": "뒤로 가기",
"common.loading": "로딩 중", "common.loading": "로딩 중",
"common.loading.ellipsis": "...",
"common.cancel": "취소", "common.cancel": "취소",
"common.connect": "연결",
"common.disconnect": "연결 해제",
"common.submit": "제출", "common.submit": "제출",
"common.save": "저장", "common.save": "저장",
"common.saving": "저장 중...", "common.saving": "저장 중...",
@@ -152,6 +178,8 @@ export const dict = {
"prompt.placeholder.shell": "셸 명령어 입력...", "prompt.placeholder.shell": "셸 명령어 입력...",
"prompt.placeholder.normal": '무엇이든 물어보세요... "{{example}}"', "prompt.placeholder.normal": '무엇이든 물어보세요... "{{example}}"',
"prompt.placeholder.summarizeComments": "댓글 요약…",
"prompt.placeholder.summarizeComment": "댓글 요약…",
"prompt.mode.shell": "셸", "prompt.mode.shell": "셸",
"prompt.mode.shell.exit": "종료하려면 esc", "prompt.mode.shell.exit": "종료하려면 esc",
@@ -255,6 +283,9 @@ export const dict = {
"dialog.project.edit.color": "색상", "dialog.project.edit.color": "색상",
"dialog.project.edit.color.select": "{{color}} 색상 선택", "dialog.project.edit.color.select": "{{color}} 색상 선택",
"dialog.project.edit.worktree.startup": "작업 공간 시작 스크립트",
"dialog.project.edit.worktree.startup.description": "새 작업 공간(작업 트리)을 만든 뒤 실행됩니다.",
"dialog.project.edit.worktree.startup.placeholder": "예: bun install",
"context.breakdown.title": "컨텍스트 분석", "context.breakdown.title": "컨텍스트 분석",
"context.breakdown.note": '입력 토큰의 대략적인 분석입니다. "기타"에는 도구 정의 및 오버헤드가 포함됩니다.', "context.breakdown.note": '입력 토큰의 대략적인 분석입니다. "기타"에는 도구 정의 및 오버헤드가 포함됩니다.',
"context.breakdown.system": "시스템", "context.breakdown.system": "시스템",
@@ -303,6 +334,7 @@ export const dict = {
"language.ar": "العربية", "language.ar": "العربية",
"language.no": "Norsk", "language.no": "Norsk",
"language.br": "Português (Brasil)", "language.br": "Português (Brasil)",
"language.th": "ไทย",
"toast.language.title": "언어", "toast.language.title": "언어",
"toast.language.description": "{{language}}(으)로 전환됨", "toast.language.description": "{{language}}(으)로 전환됨",
@@ -320,6 +352,9 @@ export const dict = {
"toast.file.loadFailed.title": "파일 로드 실패", "toast.file.loadFailed.title": "파일 로드 실패",
"toast.file.listFailed.title": "파일 목록을 불러오지 못했습니다",
"toast.context.noLineSelection.title": "줄 선택 없음",
"toast.context.noLineSelection.description": "먼저 파일 탭에서 줄 범위를 선택하세요.",
"toast.session.share.copyFailed.title": "URL 클립보드 복사 실패", "toast.session.share.copyFailed.title": "URL 클립보드 복사 실패",
"toast.session.share.success.title": "세션 공유됨", "toast.session.share.success.title": "세션 공유됨",
"toast.session.share.success.description": "공유 URL이 클립보드에 복사되었습니다!", "toast.session.share.success.description": "공유 URL이 클립보드에 복사되었습니다!",
@@ -393,13 +428,19 @@ export const dict = {
"session.tab.context": "컨텍스트", "session.tab.context": "컨텍스트",
"session.panel.reviewAndFiles": "검토 및 파일", "session.panel.reviewAndFiles": "검토 및 파일",
"session.review.filesChanged": "{{count}}개 파일 변경됨", "session.review.filesChanged": "{{count}}개 파일 변경됨",
"session.review.change.one": "변경",
"session.review.change.other": "변경",
"session.review.loadingChanges": "변경 사항 로드 중...", "session.review.loadingChanges": "변경 사항 로드 중...",
"session.review.empty": "이 세션에 변경 사항이 아직 없습니다", "session.review.empty": "이 세션에 변경 사항이 아직 없습니다",
"session.review.noChanges": "변경 없음",
"session.files.selectToOpen": "열 파일을 선택하세요",
"session.files.all": "모든 파일",
"session.messages.renderEarlier": "이전 메시지 렌더링", "session.messages.renderEarlier": "이전 메시지 렌더링",
"session.messages.loadingEarlier": "이전 메시지 로드 중...", "session.messages.loadingEarlier": "이전 메시지 로드 중...",
"session.messages.loadEarlier": "이전 메시지 로드", "session.messages.loadEarlier": "이전 메시지 로드",
"session.messages.loading": "메시지 로드 중...", "session.messages.loading": "메시지 로드 중...",
"session.messages.jumpToLatest": "최신으로 이동",
"session.context.addToContext": "컨텍스트에 {{selection}} 추가", "session.context.addToContext": "컨텍스트에 {{selection}} 추가",
"session.new.worktree.main": "메인 브랜치", "session.new.worktree.main": "메인 브랜치",
@@ -440,6 +481,9 @@ export const dict = {
"terminal.title.numbered": "터미널 {{number}}", "terminal.title.numbered": "터미널 {{number}}",
"terminal.close": "터미널 닫기", "terminal.close": "터미널 닫기",
"terminal.connectionLost.title": "연결 끊김",
"terminal.connectionLost.description":
"터미널 연결이 중단되었습니다. 서버가 재시작하면 이런 일이 발생할 수 있습니다.",
"common.closeTab": "탭 닫기", "common.closeTab": "탭 닫기",
"common.dismiss": "닫기", "common.dismiss": "닫기",
"common.requestFailed": "요청 실패", "common.requestFailed": "요청 실패",
@@ -453,6 +497,8 @@ export const dict = {
"common.edit": "편집", "common.edit": "편집",
"common.loadMore": "더 불러오기", "common.loadMore": "더 불러오기",
"common.key.esc": "ESC",
"sidebar.menu.toggle": "메뉴 토글",
"sidebar.nav.projectsAndSessions": "프로젝트 및 세션", "sidebar.nav.projectsAndSessions": "프로젝트 및 세션",
"sidebar.settings": "설정", "sidebar.settings": "설정",
"sidebar.help": "도움말", "sidebar.help": "도움말",
@@ -464,12 +510,15 @@ export const dict = {
"sidebar.project.recentSessions": "최근 세션", "sidebar.project.recentSessions": "최근 세션",
"sidebar.project.viewAllSessions": "모든 세션 보기", "sidebar.project.viewAllSessions": "모든 세션 보기",
"app.name.desktop": "OpenCode Desktop",
"settings.section.desktop": "데스크톱", "settings.section.desktop": "데스크톱",
"settings.section.server": "서버",
"settings.tab.general": "일반", "settings.tab.general": "일반",
"settings.tab.shortcuts": "단축키", "settings.tab.shortcuts": "단축키",
"settings.general.section.appearance": "모양", "settings.general.section.appearance": "모양",
"settings.general.section.notifications": "시스템 알림", "settings.general.section.notifications": "시스템 알림",
"settings.general.section.updates": "업데이트",
"settings.general.section.sounds": "효과음", "settings.general.section.sounds": "효과음",
"settings.general.row.language.title": "언어", "settings.general.row.language.title": "언어",
@@ -481,6 +530,75 @@ export const dict = {
"settings.general.row.font.title": "글꼴", "settings.general.row.font.title": "글꼴",
"settings.general.row.font.description": "코드 블록에 사용되는 고정폭 글꼴 사용자 지정", "settings.general.row.font.description": "코드 블록에 사용되는 고정폭 글꼴 사용자 지정",
"settings.general.row.releaseNotes.title": "릴리스 노트",
"settings.general.row.releaseNotes.description": "업데이트 후 '새 소식' 팝업 표시",
"settings.updates.row.startup.title": "시작 시 업데이트 확인",
"settings.updates.row.startup.description": "OpenCode를 실행할 때 업데이트를 자동으로 확인합니다",
"settings.updates.row.check.title": "업데이트 확인",
"settings.updates.row.check.description": "업데이트를 수동으로 확인하고, 사용 가능하면 설치합니다",
"settings.updates.action.checkNow": "지금 확인",
"settings.updates.action.checking": "확인 중...",
"settings.updates.toast.latest.title": "최신 상태입니다",
"settings.updates.toast.latest.description": "현재 최신 버전의 OpenCode를 사용 중입니다.",
"font.option.ibmPlexMono": "IBM Plex Mono",
"font.option.cascadiaCode": "Cascadia Code",
"font.option.firaCode": "Fira Code",
"font.option.hack": "Hack",
"font.option.inconsolata": "Inconsolata",
"font.option.intelOneMono": "Intel One Mono",
"font.option.iosevka": "Iosevka",
"font.option.jetbrainsMono": "JetBrains Mono",
"font.option.mesloLgs": "Meslo LGS",
"font.option.robotoMono": "Roboto Mono",
"font.option.sourceCodePro": "Source Code Pro",
"font.option.ubuntuMono": "Ubuntu Mono",
"sound.option.alert01": "알림 01",
"sound.option.alert02": "알림 02",
"sound.option.alert03": "알림 03",
"sound.option.alert04": "알림 04",
"sound.option.alert05": "알림 05",
"sound.option.alert06": "알림 06",
"sound.option.alert07": "알림 07",
"sound.option.alert08": "알림 08",
"sound.option.alert09": "알림 09",
"sound.option.alert10": "알림 10",
"sound.option.bipbop01": "빕-밥 01",
"sound.option.bipbop02": "빕-밥 02",
"sound.option.bipbop03": "빕-밥 03",
"sound.option.bipbop04": "빕-밥 04",
"sound.option.bipbop05": "빕-밥 05",
"sound.option.bipbop06": "빕-밥 06",
"sound.option.bipbop07": "빕-밥 07",
"sound.option.bipbop08": "빕-밥 08",
"sound.option.bipbop09": "빕-밥 09",
"sound.option.bipbop10": "빕-밥 10",
"sound.option.staplebops01": "스테이플밥스 01",
"sound.option.staplebops02": "스테이플밥스 02",
"sound.option.staplebops03": "스테이플밥스 03",
"sound.option.staplebops04": "스테이플밥스 04",
"sound.option.staplebops05": "스테이플밥스 05",
"sound.option.staplebops06": "스테이플밥스 06",
"sound.option.staplebops07": "스테이플밥스 07",
"sound.option.nope01": "아니오 01",
"sound.option.nope02": "아니오 02",
"sound.option.nope03": "아니오 03",
"sound.option.nope04": "아니오 04",
"sound.option.nope05": "아니오 05",
"sound.option.nope06": "아니오 06",
"sound.option.nope07": "아니오 07",
"sound.option.nope08": "아니오 08",
"sound.option.nope09": "아니오 09",
"sound.option.nope10": "아니오 10",
"sound.option.nope11": "아니오 11",
"sound.option.nope12": "아니오 12",
"sound.option.yup01": "네 01",
"sound.option.yup02": "네 02",
"sound.option.yup03": "네 03",
"sound.option.yup04": "네 04",
"sound.option.yup05": "네 05",
"sound.option.yup06": "네 06",
"settings.general.notifications.agent.title": "에이전트", "settings.general.notifications.agent.title": "에이전트",
"settings.general.notifications.agent.description": "에이전트가 완료되거나 주의가 필요할 때 시스템 알림 표시", "settings.general.notifications.agent.description": "에이전트가 완료되거나 주의가 필요할 때 시스템 알림 표시",
"settings.general.notifications.permissions.title": "권한", "settings.general.notifications.permissions.title": "권한",
@@ -515,6 +633,13 @@ export const dict = {
"settings.providers.title": "공급자", "settings.providers.title": "공급자",
"settings.providers.description": "공급자 설정은 여기서 구성할 수 있습니다.", "settings.providers.description": "공급자 설정은 여기서 구성할 수 있습니다.",
"settings.providers.section.connected": "연결된 공급자",
"settings.providers.connected.empty": "연결된 공급자 없음",
"settings.providers.section.popular": "인기 공급자",
"settings.providers.tag.environment": "환경",
"settings.providers.tag.config": "구성",
"settings.providers.tag.custom": "사용자 지정",
"settings.providers.tag.other": "기타",
"settings.models.title": "모델", "settings.models.title": "모델",
"settings.models.description": "모델 설정은 여기서 구성할 수 있습니다.", "settings.models.description": "모델 설정은 여기서 구성할 수 있습니다.",
"settings.agents.title": "에이전트", "settings.agents.title": "에이전트",
@@ -581,6 +706,7 @@ export const dict = {
"workspace.reset.failed.title": "작업 공간 재설정 실패", "workspace.reset.failed.title": "작업 공간 재설정 실패",
"workspace.reset.success.title": "작업 공간 재설정됨", "workspace.reset.success.title": "작업 공간 재설정됨",
"workspace.reset.success.description": "작업 공간이 이제 기본 브랜치와 일치합니다.", "workspace.reset.success.description": "작업 공간이 이제 기본 브랜치와 일치합니다.",
"workspace.error.stillPreparing": "작업 공간이 아직 준비 중입니다",
"workspace.status.checking": "병합되지 않은 변경 사항 확인 중...", "workspace.status.checking": "병합되지 않은 변경 사항 확인 중...",
"workspace.status.error": "Git 상태를 확인할 수 없습니다.", "workspace.status.error": "Git 상태를 확인할 수 없습니다.",
"workspace.status.clean": "병합되지 않은 변경 사항이 감지되지 않았습니다.", "workspace.status.clean": "병합되지 않은 변경 사항이 감지되지 않았습니다.",
+107
View File
@@ -11,6 +11,7 @@ export const dict = {
"command.category.theme": "Tema", "command.category.theme": "Tema",
"command.category.language": "Språk", "command.category.language": "Språk",
"command.category.file": "Fil", "command.category.file": "Fil",
"command.category.context": "Kontekst",
"command.category.terminal": "Terminal", "command.category.terminal": "Terminal",
"command.category.model": "Modell", "command.category.model": "Modell",
"command.category.mcp": "MCP", "command.category.mcp": "MCP",
@@ -45,7 +46,10 @@ export const dict = {
"command.session.new": "Ny sesjon", "command.session.new": "Ny sesjon",
"command.file.open": "Åpne fil", "command.file.open": "Åpne fil",
"command.file.open.description": "Søk i filer og kommandoer", "command.file.open.description": "Søk i filer og kommandoer",
"command.context.addSelection": "Legg til markering i kontekst",
"command.context.addSelection.description": "Legg til valgte linjer fra gjeldende fil",
"command.terminal.toggle": "Veksle terminal", "command.terminal.toggle": "Veksle terminal",
"command.fileTree.toggle": "Veksle filtre",
"command.review.toggle": "Veksle gjennomgang", "command.review.toggle": "Veksle gjennomgang",
"command.terminal.new": "Ny terminal", "command.terminal.new": "Ny terminal",
"command.terminal.new.description": "Opprett en ny terminalfane", "command.terminal.new.description": "Opprett en ny terminalfane",
@@ -140,6 +144,8 @@ export const dict = {
"provider.connect.toast.connected.title": "{{provider}} tilkoblet", "provider.connect.toast.connected.title": "{{provider}} tilkoblet",
"provider.connect.toast.connected.description": "{{provider}}-modeller er nå tilgjengelige.", "provider.connect.toast.connected.description": "{{provider}}-modeller er nå tilgjengelige.",
"provider.disconnect.toast.disconnected.title": "{{provider}} frakoblet",
"provider.disconnect.toast.disconnected.description": "Modeller fra {{provider}} er ikke lenger tilgjengelige.",
"model.tag.free": "Gratis", "model.tag.free": "Gratis",
"model.tag.latest": "Nyeste", "model.tag.latest": "Nyeste",
"model.provider.anthropic": "Anthropic", "model.provider.anthropic": "Anthropic",
@@ -162,6 +168,8 @@ export const dict = {
"common.loading": "Laster", "common.loading": "Laster",
"common.loading.ellipsis": "...", "common.loading.ellipsis": "...",
"common.cancel": "Avbryt", "common.cancel": "Avbryt",
"common.connect": "Koble til",
"common.disconnect": "Koble fra",
"common.submit": "Send inn", "common.submit": "Send inn",
"common.save": "Lagre", "common.save": "Lagre",
"common.saving": "Lagrer...", "common.saving": "Lagrer...",
@@ -170,6 +178,8 @@ export const dict = {
"prompt.placeholder.shell": "Skriv inn shell-kommando...", "prompt.placeholder.shell": "Skriv inn shell-kommando...",
"prompt.placeholder.normal": 'Spør om hva som helst... "{{example}}"', "prompt.placeholder.normal": 'Spør om hva som helst... "{{example}}"',
"prompt.placeholder.summarizeComments": "Oppsummer kommentarer…",
"prompt.placeholder.summarizeComment": "Oppsummer kommentar…",
"prompt.mode.shell": "Shell", "prompt.mode.shell": "Shell",
"prompt.mode.shell.exit": "ESC for å avslutte", "prompt.mode.shell.exit": "ESC for å avslutte",
@@ -273,6 +283,9 @@ export const dict = {
"dialog.project.edit.color": "Farge", "dialog.project.edit.color": "Farge",
"dialog.project.edit.color.select": "Velg fargen {{color}}", "dialog.project.edit.color.select": "Velg fargen {{color}}",
"dialog.project.edit.worktree.startup": "Oppstartsskript for arbeidsområde",
"dialog.project.edit.worktree.startup.description": "Kjører etter at et nytt arbeidsområde (worktree) er opprettet.",
"dialog.project.edit.worktree.startup.placeholder": "f.eks. bun install",
"context.breakdown.title": "Kontekstfordeling", "context.breakdown.title": "Kontekstfordeling",
"context.breakdown.note": 'Omtrentlig fordeling av input-tokens. "Annet" inkluderer verktøydefinisjoner og overhead.', "context.breakdown.note": 'Omtrentlig fordeling av input-tokens. "Annet" inkluderer verktøydefinisjoner og overhead.',
"context.breakdown.system": "System", "context.breakdown.system": "System",
@@ -321,6 +334,7 @@ export const dict = {
"language.ar": "العربية", "language.ar": "العربية",
"language.no": "Norsk", "language.no": "Norsk",
"language.br": "Português (Brasil)", "language.br": "Português (Brasil)",
"language.th": "ไทย",
"toast.language.title": "Språk", "toast.language.title": "Språk",
"toast.language.description": "Byttet til {{language}}", "toast.language.description": "Byttet til {{language}}",
@@ -338,6 +352,9 @@ export const dict = {
"toast.file.loadFailed.title": "Kunne ikke laste fil", "toast.file.loadFailed.title": "Kunne ikke laste fil",
"toast.file.listFailed.title": "Kunne ikke liste filer",
"toast.context.noLineSelection.title": "Ingen linjevalg",
"toast.context.noLineSelection.description": "Velg først et linjeområde i en filfane.",
"toast.session.share.copyFailed.title": "Kunne ikke kopiere URL til utklippstavlen", "toast.session.share.copyFailed.title": "Kunne ikke kopiere URL til utklippstavlen",
"toast.session.share.success.title": "Sesjon delt", "toast.session.share.success.title": "Sesjon delt",
"toast.session.share.success.description": "Delings-URL kopiert til utklippstavlen!", "toast.session.share.success.description": "Delings-URL kopiert til utklippstavlen!",
@@ -412,8 +429,13 @@ export const dict = {
"session.tab.context": "Kontekst", "session.tab.context": "Kontekst",
"session.panel.reviewAndFiles": "Gjennomgang og filer", "session.panel.reviewAndFiles": "Gjennomgang og filer",
"session.review.filesChanged": "{{count}} filer endret", "session.review.filesChanged": "{{count}} filer endret",
"session.review.change.one": "Endring",
"session.review.change.other": "Endringer",
"session.review.loadingChanges": "Laster endringer...", "session.review.loadingChanges": "Laster endringer...",
"session.review.empty": "Ingen endringer i denne sesjonen ennå", "session.review.empty": "Ingen endringer i denne sesjonen ennå",
"session.review.noChanges": "Ingen endringer",
"session.files.selectToOpen": "Velg en fil å åpne",
"session.files.all": "Alle filer",
"session.messages.renderEarlier": "Vis tidligere meldinger", "session.messages.renderEarlier": "Vis tidligere meldinger",
"session.messages.loadingEarlier": "Laster inn tidligere meldinger...", "session.messages.loadingEarlier": "Laster inn tidligere meldinger...",
"session.messages.loadEarlier": "Last inn tidligere meldinger", "session.messages.loadEarlier": "Last inn tidligere meldinger",
@@ -471,6 +493,7 @@ export const dict = {
"common.learnMore": "Lær mer", "common.learnMore": "Lær mer",
"common.rename": "Gi nytt navn", "common.rename": "Gi nytt navn",
"common.reset": "Tilbakestill", "common.reset": "Tilbakestill",
"common.archive": "Arkiver",
"common.delete": "Slett", "common.delete": "Slett",
"common.close": "Lukk", "common.close": "Lukk",
"common.edit": "Rediger", "common.edit": "Rediger",
@@ -489,12 +512,15 @@ export const dict = {
"sidebar.project.recentSessions": "Nylige sesjoner", "sidebar.project.recentSessions": "Nylige sesjoner",
"sidebar.project.viewAllSessions": "Vis alle sesjoner", "sidebar.project.viewAllSessions": "Vis alle sesjoner",
"app.name.desktop": "OpenCode Desktop",
"settings.section.desktop": "Skrivebord", "settings.section.desktop": "Skrivebord",
"settings.section.server": "Server",
"settings.tab.general": "Generelt", "settings.tab.general": "Generelt",
"settings.tab.shortcuts": "Snarveier", "settings.tab.shortcuts": "Snarveier",
"settings.general.section.appearance": "Utseende", "settings.general.section.appearance": "Utseende",
"settings.general.section.notifications": "Systemvarsler", "settings.general.section.notifications": "Systemvarsler",
"settings.general.section.updates": "Oppdateringer",
"settings.general.section.sounds": "Lydeffekter", "settings.general.section.sounds": "Lydeffekter",
"settings.general.row.language.title": "Språk", "settings.general.row.language.title": "Språk",
@@ -506,6 +532,75 @@ export const dict = {
"settings.general.row.font.title": "Skrift", "settings.general.row.font.title": "Skrift",
"settings.general.row.font.description": "Tilpass mono-skriften som brukes i kodeblokker", "settings.general.row.font.description": "Tilpass mono-skriften som brukes i kodeblokker",
"settings.general.row.releaseNotes.title": "Utgivelsesnotater",
"settings.general.row.releaseNotes.description": 'Vis "Hva er nytt"-vinduer etter oppdateringer',
"settings.updates.row.startup.title": "Se etter oppdateringer ved oppstart",
"settings.updates.row.startup.description": "Se automatisk etter oppdateringer når OpenCode starter",
"settings.updates.row.check.title": "Se etter oppdateringer",
"settings.updates.row.check.description": "Se etter oppdateringer manuelt og installer hvis tilgjengelig",
"settings.updates.action.checkNow": "Sjekk nå",
"settings.updates.action.checking": "Sjekker...",
"settings.updates.toast.latest.title": "Du er oppdatert",
"settings.updates.toast.latest.description": "Du bruker den nyeste versjonen av OpenCode.",
"font.option.ibmPlexMono": "IBM Plex Mono",
"font.option.cascadiaCode": "Cascadia Code",
"font.option.firaCode": "Fira Code",
"font.option.hack": "Hack",
"font.option.inconsolata": "Inconsolata",
"font.option.intelOneMono": "Intel One Mono",
"font.option.iosevka": "Iosevka",
"font.option.jetbrainsMono": "JetBrains Mono",
"font.option.mesloLgs": "Meslo LGS",
"font.option.robotoMono": "Roboto Mono",
"font.option.sourceCodePro": "Source Code Pro",
"font.option.ubuntuMono": "Ubuntu Mono",
"sound.option.alert01": "Varsel 01",
"sound.option.alert02": "Varsel 02",
"sound.option.alert03": "Varsel 03",
"sound.option.alert04": "Varsel 04",
"sound.option.alert05": "Varsel 05",
"sound.option.alert06": "Varsel 06",
"sound.option.alert07": "Varsel 07",
"sound.option.alert08": "Varsel 08",
"sound.option.alert09": "Varsel 09",
"sound.option.alert10": "Varsel 10",
"sound.option.bipbop01": "Bip-bop 01",
"sound.option.bipbop02": "Bip-bop 02",
"sound.option.bipbop03": "Bip-bop 03",
"sound.option.bipbop04": "Bip-bop 04",
"sound.option.bipbop05": "Bip-bop 05",
"sound.option.bipbop06": "Bip-bop 06",
"sound.option.bipbop07": "Bip-bop 07",
"sound.option.bipbop08": "Bip-bop 08",
"sound.option.bipbop09": "Bip-bop 09",
"sound.option.bipbop10": "Bip-bop 10",
"sound.option.staplebops01": "Staplebops 01",
"sound.option.staplebops02": "Staplebops 02",
"sound.option.staplebops03": "Staplebops 03",
"sound.option.staplebops04": "Staplebops 04",
"sound.option.staplebops05": "Staplebops 05",
"sound.option.staplebops06": "Staplebops 06",
"sound.option.staplebops07": "Staplebops 07",
"sound.option.nope01": "Nei 01",
"sound.option.nope02": "Nei 02",
"sound.option.nope03": "Nei 03",
"sound.option.nope04": "Nei 04",
"sound.option.nope05": "Nei 05",
"sound.option.nope06": "Nei 06",
"sound.option.nope07": "Nei 07",
"sound.option.nope08": "Nei 08",
"sound.option.nope09": "Nei 09",
"sound.option.nope10": "Nei 10",
"sound.option.nope11": "Nei 11",
"sound.option.nope12": "Nei 12",
"sound.option.yup01": "Ja 01",
"sound.option.yup02": "Ja 02",
"sound.option.yup03": "Ja 03",
"sound.option.yup04": "Ja 04",
"sound.option.yup05": "Ja 05",
"sound.option.yup06": "Ja 06",
"settings.general.notifications.agent.title": "Agent", "settings.general.notifications.agent.title": "Agent",
"settings.general.notifications.agent.description": "settings.general.notifications.agent.description":
"Vis systemvarsel når agenten er ferdig eller trenger oppmerksomhet", "Vis systemvarsel når agenten er ferdig eller trenger oppmerksomhet",
@@ -541,6 +636,13 @@ export const dict = {
"settings.providers.title": "Leverandører", "settings.providers.title": "Leverandører",
"settings.providers.description": "Leverandørinnstillinger vil kunne konfigureres her.", "settings.providers.description": "Leverandørinnstillinger vil kunne konfigureres her.",
"settings.providers.section.connected": "Tilkoblede leverandører",
"settings.providers.connected.empty": "Ingen tilkoblede leverandører",
"settings.providers.section.popular": "Populære leverandører",
"settings.providers.tag.environment": "Miljø",
"settings.providers.tag.config": "Konfigurasjon",
"settings.providers.tag.custom": "Tilpasset",
"settings.providers.tag.other": "Annet",
"settings.models.title": "Modeller", "settings.models.title": "Modeller",
"settings.models.description": "Modellinnstillinger vil kunne konfigureres her.", "settings.models.description": "Modellinnstillinger vil kunne konfigureres her.",
"settings.agents.title": "Agenter", "settings.agents.title": "Agenter",
@@ -593,6 +695,10 @@ export const dict = {
"settings.permissions.tool.doom_loop.title": "Doom Loop", "settings.permissions.tool.doom_loop.title": "Doom Loop",
"settings.permissions.tool.doom_loop.description": "Oppdager gjentatte verktøykall med identisk input", "settings.permissions.tool.doom_loop.description": "Oppdager gjentatte verktøykall med identisk input",
"session.delete.failed.title": "Kunne ikke slette sesjon",
"session.delete.title": "Slett sesjon",
"session.delete.confirm": 'Slette sesjonen "{{name}}"?',
"session.delete.button": "Slett sesjon",
"workspace.new": "Nytt arbeidsområde", "workspace.new": "Nytt arbeidsområde",
"workspace.type.local": "lokal", "workspace.type.local": "lokal",
"workspace.type.sandbox": "sandkasse", "workspace.type.sandbox": "sandkasse",
@@ -603,6 +709,7 @@ export const dict = {
"workspace.reset.failed.title": "Kunne ikke tilbakestille arbeidsområde", "workspace.reset.failed.title": "Kunne ikke tilbakestille arbeidsområde",
"workspace.reset.success.title": "Arbeidsområde tilbakestilt", "workspace.reset.success.title": "Arbeidsområde tilbakestilt",
"workspace.reset.success.description": "Arbeidsområdet samsvarer nå med standardgrenen.", "workspace.reset.success.description": "Arbeidsområdet samsvarer nå med standardgrenen.",
"workspace.error.stillPreparing": "Arbeidsområdet klargjøres fortsatt",
"workspace.status.checking": "Sjekker for ikke-sammenslåtte endringer...", "workspace.status.checking": "Sjekker for ikke-sammenslåtte endringer...",
"workspace.status.error": "Kunne ikke bekrefte git-status.", "workspace.status.error": "Kunne ikke bekrefte git-status.",
"workspace.status.clean": "Ingen ikke-sammenslåtte endringer oppdaget.", "workspace.status.clean": "Ingen ikke-sammenslåtte endringer oppdaget.",
+47
View File
@@ -8,6 +8,7 @@ export const dict = {
"command.category.theme": "Motyw", "command.category.theme": "Motyw",
"command.category.language": "Język", "command.category.language": "Język",
"command.category.file": "Plik", "command.category.file": "Plik",
"command.category.context": "Kontekst",
"command.category.terminal": "Terminal", "command.category.terminal": "Terminal",
"command.category.model": "Model", "command.category.model": "Model",
"command.category.mcp": "MCP", "command.category.mcp": "MCP",
@@ -42,7 +43,10 @@ export const dict = {
"command.session.new": "Nowa sesja", "command.session.new": "Nowa sesja",
"command.file.open": "Otwórz plik", "command.file.open": "Otwórz plik",
"command.file.open.description": "Szukaj plików i poleceń", "command.file.open.description": "Szukaj plików i poleceń",
"command.context.addSelection": "Dodaj zaznaczenie do kontekstu",
"command.context.addSelection.description": "Dodaj zaznaczone linie z bieżącego pliku",
"command.terminal.toggle": "Przełącz terminal", "command.terminal.toggle": "Przełącz terminal",
"command.fileTree.toggle": "Przełącz drzewo plików",
"command.review.toggle": "Przełącz przegląd", "command.review.toggle": "Przełącz przegląd",
"command.terminal.new": "Nowy terminal", "command.terminal.new": "Nowy terminal",
"command.terminal.new.description": "Utwórz nową kartę terminala", "command.terminal.new.description": "Utwórz nową kartę terminala",
@@ -137,6 +141,8 @@ export const dict = {
"provider.connect.toast.connected.title": "Połączono {{provider}}", "provider.connect.toast.connected.title": "Połączono {{provider}}",
"provider.connect.toast.connected.description": "Modele {{provider}} są teraz dostępne do użycia.", "provider.connect.toast.connected.description": "Modele {{provider}} są teraz dostępne do użycia.",
"provider.disconnect.toast.disconnected.title": "Rozłączono {{provider}}",
"provider.disconnect.toast.disconnected.description": "Modele {{provider}} nie są już dostępne.",
"model.tag.free": "Darmowy", "model.tag.free": "Darmowy",
"model.tag.latest": "Najnowszy", "model.tag.latest": "Najnowszy",
"model.provider.anthropic": "Anthropic", "model.provider.anthropic": "Anthropic",
@@ -159,6 +165,8 @@ export const dict = {
"common.loading": "Ładowanie", "common.loading": "Ładowanie",
"common.loading.ellipsis": "...", "common.loading.ellipsis": "...",
"common.cancel": "Anuluj", "common.cancel": "Anuluj",
"common.connect": "Połącz",
"common.disconnect": "Rozłącz",
"common.submit": "Prześlij", "common.submit": "Prześlij",
"common.save": "Zapisz", "common.save": "Zapisz",
"common.saving": "Zapisywanie...", "common.saving": "Zapisywanie...",
@@ -167,6 +175,8 @@ export const dict = {
"prompt.placeholder.shell": "Wpisz polecenie terminala...", "prompt.placeholder.shell": "Wpisz polecenie terminala...",
"prompt.placeholder.normal": 'Zapytaj o cokolwiek... "{{example}}"', "prompt.placeholder.normal": 'Zapytaj o cokolwiek... "{{example}}"',
"prompt.placeholder.summarizeComments": "Podsumuj komentarze…",
"prompt.placeholder.summarizeComment": "Podsumuj komentarz…",
"prompt.mode.shell": "Terminal", "prompt.mode.shell": "Terminal",
"prompt.mode.shell.exit": "esc aby wyjść", "prompt.mode.shell.exit": "esc aby wyjść",
@@ -270,6 +280,10 @@ export const dict = {
"dialog.project.edit.color": "Kolor", "dialog.project.edit.color": "Kolor",
"dialog.project.edit.color.select": "Wybierz kolor {{color}}", "dialog.project.edit.color.select": "Wybierz kolor {{color}}",
"dialog.project.edit.worktree.startup": "Skrypt uruchamiania przestrzeni roboczej",
"dialog.project.edit.worktree.startup.description":
"Uruchamiany po utworzeniu nowej przestrzeni roboczej (drzewa roboczego).",
"dialog.project.edit.worktree.startup.placeholder": "np. bun install",
"context.breakdown.title": "Podział kontekstu", "context.breakdown.title": "Podział kontekstu",
"context.breakdown.note": 'Przybliżony podział tokenów wejściowych. "Inne" obejmuje definicje narzędzi i narzut.', "context.breakdown.note": 'Przybliżony podział tokenów wejściowych. "Inne" obejmuje definicje narzędzi i narzut.',
"context.breakdown.system": "System", "context.breakdown.system": "System",
@@ -318,6 +332,7 @@ export const dict = {
"language.ar": "العربية", "language.ar": "العربية",
"language.no": "Norsk", "language.no": "Norsk",
"language.br": "Português (Brasil)", "language.br": "Português (Brasil)",
"language.th": "ไทย",
"toast.language.title": "Język", "toast.language.title": "Język",
"toast.language.description": "Przełączono na {{language}}", "toast.language.description": "Przełączono na {{language}}",
@@ -335,6 +350,9 @@ export const dict = {
"toast.file.loadFailed.title": "Nie udało się załadować pliku", "toast.file.loadFailed.title": "Nie udało się załadować pliku",
"toast.file.listFailed.title": "Nie udało się wyświetlić listy plików",
"toast.context.noLineSelection.title": "Brak zaznaczenia linii",
"toast.context.noLineSelection.description": "Najpierw wybierz zakres linii w zakładce pliku.",
"toast.session.share.copyFailed.title": "Nie udało się skopiować URL do schowka", "toast.session.share.copyFailed.title": "Nie udało się skopiować URL do schowka",
"toast.session.share.success.title": "Sesja udostępniona", "toast.session.share.success.title": "Sesja udostępniona",
"toast.session.share.success.description": "Link udostępniania skopiowany do schowka!", "toast.session.share.success.description": "Link udostępniania skopiowany do schowka!",
@@ -410,8 +428,13 @@ export const dict = {
"session.tab.context": "Kontekst", "session.tab.context": "Kontekst",
"session.panel.reviewAndFiles": "Przegląd i pliki", "session.panel.reviewAndFiles": "Przegląd i pliki",
"session.review.filesChanged": "Zmieniono {{count}} plików", "session.review.filesChanged": "Zmieniono {{count}} plików",
"session.review.change.one": "Zmiana",
"session.review.change.other": "Zmiany",
"session.review.loadingChanges": "Ładowanie zmian...", "session.review.loadingChanges": "Ładowanie zmian...",
"session.review.empty": "Brak zmian w tej sesji", "session.review.empty": "Brak zmian w tej sesji",
"session.review.noChanges": "Brak zmian",
"session.files.selectToOpen": "Wybierz plik do otwarcia",
"session.files.all": "Wszystkie pliki",
"session.messages.renderEarlier": "Renderuj wcześniejsze wiadomości", "session.messages.renderEarlier": "Renderuj wcześniejsze wiadomości",
"session.messages.loadingEarlier": "Ładowanie wcześniejszych wiadomości...", "session.messages.loadingEarlier": "Ładowanie wcześniejszych wiadomości...",
"session.messages.loadEarlier": "Załaduj wcześniejsze wiadomości", "session.messages.loadEarlier": "Załaduj wcześniejsze wiadomości",
@@ -488,12 +511,15 @@ export const dict = {
"sidebar.project.recentSessions": "Ostatnie sesje", "sidebar.project.recentSessions": "Ostatnie sesje",
"sidebar.project.viewAllSessions": "Zobacz wszystkie sesje", "sidebar.project.viewAllSessions": "Zobacz wszystkie sesje",
"app.name.desktop": "OpenCode Desktop",
"settings.section.desktop": "Pulpit", "settings.section.desktop": "Pulpit",
"settings.section.server": "Serwer",
"settings.tab.general": "Ogólne", "settings.tab.general": "Ogólne",
"settings.tab.shortcuts": "Skróty", "settings.tab.shortcuts": "Skróty",
"settings.general.section.appearance": "Wygląd", "settings.general.section.appearance": "Wygląd",
"settings.general.section.notifications": "Powiadomienia systemowe", "settings.general.section.notifications": "Powiadomienia systemowe",
"settings.general.section.updates": "Aktualizacje",
"settings.general.section.sounds": "Efekty dźwiękowe", "settings.general.section.sounds": "Efekty dźwiękowe",
"settings.general.row.language.title": "Język", "settings.general.row.language.title": "Język",
@@ -504,12 +530,25 @@ export const dict = {
"settings.general.row.theme.description": "Dostosuj motyw OpenCode.", "settings.general.row.theme.description": "Dostosuj motyw OpenCode.",
"settings.general.row.font.title": "Czcionka", "settings.general.row.font.title": "Czcionka",
"settings.general.row.font.description": "Dostosuj czcionkę mono używaną w blokach kodu", "settings.general.row.font.description": "Dostosuj czcionkę mono używaną w blokach kodu",
"settings.general.row.releaseNotes.title": "Informacje o wydaniu",
"settings.general.row.releaseNotes.description": 'Pokazuj wyskakujące okna "Co nowego" po aktualizacjach',
"settings.updates.row.startup.title": "Sprawdzaj aktualizacje przy uruchomieniu",
"settings.updates.row.startup.description": "Automatycznie sprawdzaj aktualizacje podczas uruchamiania OpenCode",
"settings.updates.row.check.title": "Sprawdź aktualizacje",
"settings.updates.row.check.description": "Ręcznie sprawdź aktualizacje i zainstaluj, jeśli są dostępne",
"settings.updates.action.checkNow": "Sprawdź teraz",
"settings.updates.action.checking": "Sprawdzanie...",
"settings.updates.toast.latest.title": "Masz najnowszą wersję",
"settings.updates.toast.latest.description": "Korzystasz z najnowszej wersji OpenCode.",
"font.option.ibmPlexMono": "IBM Plex Mono", "font.option.ibmPlexMono": "IBM Plex Mono",
"font.option.cascadiaCode": "Cascadia Code", "font.option.cascadiaCode": "Cascadia Code",
"font.option.firaCode": "Fira Code", "font.option.firaCode": "Fira Code",
"font.option.hack": "Hack", "font.option.hack": "Hack",
"font.option.inconsolata": "Inconsolata", "font.option.inconsolata": "Inconsolata",
"font.option.intelOneMono": "Intel One Mono", "font.option.intelOneMono": "Intel One Mono",
"font.option.iosevka": "Iosevka",
"font.option.jetbrainsMono": "JetBrains Mono", "font.option.jetbrainsMono": "JetBrains Mono",
"font.option.mesloLgs": "Meslo LGS", "font.option.mesloLgs": "Meslo LGS",
"font.option.robotoMono": "Roboto Mono", "font.option.robotoMono": "Roboto Mono",
@@ -597,6 +636,13 @@ export const dict = {
"settings.providers.title": "Dostawcy", "settings.providers.title": "Dostawcy",
"settings.providers.description": "Ustawienia dostawców będą tutaj konfigurowalne.", "settings.providers.description": "Ustawienia dostawców będą tutaj konfigurowalne.",
"settings.providers.section.connected": "Połączeni dostawcy",
"settings.providers.connected.empty": "Brak połączonych dostawców",
"settings.providers.section.popular": "Popularni dostawcy",
"settings.providers.tag.environment": "Środowisko",
"settings.providers.tag.config": "Konfiguracja",
"settings.providers.tag.custom": "Niestandardowe",
"settings.providers.tag.other": "Inne",
"settings.models.title": "Modele", "settings.models.title": "Modele",
"settings.models.description": "Ustawienia modeli będą tutaj konfigurowalne.", "settings.models.description": "Ustawienia modeli będą tutaj konfigurowalne.",
"settings.agents.title": "Agenci", "settings.agents.title": "Agenci",
@@ -663,6 +709,7 @@ export const dict = {
"workspace.reset.failed.title": "Nie udało się zresetować przestrzeni roboczej", "workspace.reset.failed.title": "Nie udało się zresetować przestrzeni roboczej",
"workspace.reset.success.title": "Przestrzeń robocza zresetowana", "workspace.reset.success.title": "Przestrzeń robocza zresetowana",
"workspace.reset.success.description": "Przestrzeń robocza odpowiada teraz domyślnej gałęzi.", "workspace.reset.success.description": "Przestrzeń robocza odpowiada teraz domyślnej gałęzi.",
"workspace.error.stillPreparing": "Przestrzeń robocza jest wciąż przygotowywana",
"workspace.status.checking": "Sprawdzanie niezscalonych zmian...", "workspace.status.checking": "Sprawdzanie niezscalonych zmian...",
"workspace.status.error": "Nie można zweryfikować statusu git.", "workspace.status.error": "Nie można zweryfikować statusu git.",
"workspace.status.clean": "Nie wykryto niezscalonych zmian.", "workspace.status.clean": "Nie wykryto niezscalonych zmian.",
+47
View File
@@ -8,6 +8,7 @@ export const dict = {
"command.category.theme": "Тема", "command.category.theme": "Тема",
"command.category.language": "Язык", "command.category.language": "Язык",
"command.category.file": "Файл", "command.category.file": "Файл",
"command.category.context": "Контекст",
"command.category.terminal": "Терминал", "command.category.terminal": "Терминал",
"command.category.model": "Модель", "command.category.model": "Модель",
"command.category.mcp": "MCP", "command.category.mcp": "MCP",
@@ -42,7 +43,10 @@ export const dict = {
"command.session.new": "Новая сессия", "command.session.new": "Новая сессия",
"command.file.open": "Открыть файл", "command.file.open": "Открыть файл",
"command.file.open.description": "Поиск файлов и команд", "command.file.open.description": "Поиск файлов и команд",
"command.context.addSelection": "Добавить выделение в контекст",
"command.context.addSelection.description": "Добавить выбранные строки из текущего файла",
"command.terminal.toggle": "Переключить терминал", "command.terminal.toggle": "Переключить терминал",
"command.fileTree.toggle": "Переключить дерево файлов",
"command.review.toggle": "Переключить обзор", "command.review.toggle": "Переключить обзор",
"command.terminal.new": "Новый терминал", "command.terminal.new": "Новый терминал",
"command.terminal.new.description": "Создать новую вкладку терминала", "command.terminal.new.description": "Создать новую вкладку терминала",
@@ -137,6 +141,8 @@ export const dict = {
"provider.connect.toast.connected.title": "{{provider}} подключён", "provider.connect.toast.connected.title": "{{provider}} подключён",
"provider.connect.toast.connected.description": "Модели {{provider}} теперь доступны.", "provider.connect.toast.connected.description": "Модели {{provider}} теперь доступны.",
"provider.disconnect.toast.disconnected.title": "{{provider}} отключён",
"provider.disconnect.toast.disconnected.description": "Модели {{provider}} больше недоступны.",
"model.tag.free": "Бесплатно", "model.tag.free": "Бесплатно",
"model.tag.latest": "Последняя", "model.tag.latest": "Последняя",
"model.provider.anthropic": "Anthropic", "model.provider.anthropic": "Anthropic",
@@ -159,6 +165,8 @@ export const dict = {
"common.loading": "Загрузка", "common.loading": "Загрузка",
"common.loading.ellipsis": "...", "common.loading.ellipsis": "...",
"common.cancel": "Отмена", "common.cancel": "Отмена",
"common.connect": "Подключить",
"common.disconnect": "Отключить",
"common.submit": "Отправить", "common.submit": "Отправить",
"common.save": "Сохранить", "common.save": "Сохранить",
"common.saving": "Сохранение...", "common.saving": "Сохранение...",
@@ -167,6 +175,8 @@ export const dict = {
"prompt.placeholder.shell": "Введите команду оболочки...", "prompt.placeholder.shell": "Введите команду оболочки...",
"prompt.placeholder.normal": 'Спросите что угодно... "{{example}}"', "prompt.placeholder.normal": 'Спросите что угодно... "{{example}}"',
"prompt.placeholder.summarizeComments": "Суммировать комментарии…",
"prompt.placeholder.summarizeComment": "Суммировать комментарий…",
"prompt.mode.shell": "Оболочка", "prompt.mode.shell": "Оболочка",
"prompt.mode.shell.exit": "esc для выхода", "prompt.mode.shell.exit": "esc для выхода",
@@ -270,6 +280,10 @@ export const dict = {
"dialog.project.edit.color": "Цвет", "dialog.project.edit.color": "Цвет",
"dialog.project.edit.color.select": "Выбрать цвет {{color}}", "dialog.project.edit.color.select": "Выбрать цвет {{color}}",
"dialog.project.edit.worktree.startup": "Скрипт запуска рабочего пространства",
"dialog.project.edit.worktree.startup.description":
"Запускается после создания нового рабочего пространства (worktree).",
"dialog.project.edit.worktree.startup.placeholder": "например, bun install",
"context.breakdown.title": "Разбивка контекста", "context.breakdown.title": "Разбивка контекста",
"context.breakdown.note": "context.breakdown.note":
'Приблизительная разбивка входных токенов. "Другое" включает определения инструментов и накладные расходы.', 'Приблизительная разбивка входных токенов. "Другое" включает определения инструментов и накладные расходы.',
@@ -319,6 +333,7 @@ export const dict = {
"language.ar": "العربية", "language.ar": "العربية",
"language.no": "Norsk", "language.no": "Norsk",
"language.br": "Português (Brasil)", "language.br": "Português (Brasil)",
"language.th": "ไทย",
"toast.language.title": "Язык", "toast.language.title": "Язык",
"toast.language.description": "Переключено на {{language}}", "toast.language.description": "Переключено на {{language}}",
@@ -336,6 +351,9 @@ export const dict = {
"toast.file.loadFailed.title": "Не удалось загрузить файл", "toast.file.loadFailed.title": "Не удалось загрузить файл",
"toast.file.listFailed.title": "Не удалось получить список файлов",
"toast.context.noLineSelection.title": "Нет выделения строк",
"toast.context.noLineSelection.description": "Сначала выберите диапазон строк во вкладке файла.",
"toast.session.share.copyFailed.title": "Не удалось скопировать URL в буфер обмена", "toast.session.share.copyFailed.title": "Не удалось скопировать URL в буфер обмена",
"toast.session.share.success.title": "Сессия опубликована", "toast.session.share.success.title": "Сессия опубликована",
"toast.session.share.success.description": "URL скопирован в буфер обмена!", "toast.session.share.success.description": "URL скопирован в буфер обмена!",
@@ -412,8 +430,13 @@ export const dict = {
"session.tab.context": "Контекст", "session.tab.context": "Контекст",
"session.panel.reviewAndFiles": "Обзор и файлы", "session.panel.reviewAndFiles": "Обзор и файлы",
"session.review.filesChanged": "{{count}} файлов изменено", "session.review.filesChanged": "{{count}} файлов изменено",
"session.review.change.one": "Изменение",
"session.review.change.other": "Изменения",
"session.review.loadingChanges": "Загрузка изменений...", "session.review.loadingChanges": "Загрузка изменений...",
"session.review.empty": "Изменений в этой сессии пока нет", "session.review.empty": "Изменений в этой сессии пока нет",
"session.review.noChanges": "Нет изменений",
"session.files.selectToOpen": "Выберите файл, чтобы открыть",
"session.files.all": "Все файлы",
"session.messages.renderEarlier": "Показать предыдущие сообщения", "session.messages.renderEarlier": "Показать предыдущие сообщения",
"session.messages.loadingEarlier": "Загрузка предыдущих сообщений...", "session.messages.loadingEarlier": "Загрузка предыдущих сообщений...",
"session.messages.loadEarlier": "Загрузить предыдущие сообщения", "session.messages.loadEarlier": "Загрузить предыдущие сообщения",
@@ -491,12 +514,15 @@ export const dict = {
"sidebar.project.recentSessions": "Недавние сессии", "sidebar.project.recentSessions": "Недавние сессии",
"sidebar.project.viewAllSessions": "Посмотреть все сессии", "sidebar.project.viewAllSessions": "Посмотреть все сессии",
"app.name.desktop": "OpenCode Desktop",
"settings.section.desktop": "Приложение", "settings.section.desktop": "Приложение",
"settings.section.server": "Сервер",
"settings.tab.general": "Основные", "settings.tab.general": "Основные",
"settings.tab.shortcuts": "Горячие клавиши", "settings.tab.shortcuts": "Горячие клавиши",
"settings.general.section.appearance": "Внешний вид", "settings.general.section.appearance": "Внешний вид",
"settings.general.section.notifications": "Системные уведомления", "settings.general.section.notifications": "Системные уведомления",
"settings.general.section.updates": "Обновления",
"settings.general.section.sounds": "Звуковые эффекты", "settings.general.section.sounds": "Звуковые эффекты",
"settings.general.row.language.title": "Язык", "settings.general.row.language.title": "Язык",
@@ -507,12 +533,25 @@ export const dict = {
"settings.general.row.theme.description": "Настройте оформление OpenCode.", "settings.general.row.theme.description": "Настройте оформление OpenCode.",
"settings.general.row.font.title": "Шрифт", "settings.general.row.font.title": "Шрифт",
"settings.general.row.font.description": "Настройте моноширинный шрифт для блоков кода", "settings.general.row.font.description": "Настройте моноширинный шрифт для блоков кода",
"settings.general.row.releaseNotes.title": "Примечания к выпуску",
"settings.general.row.releaseNotes.description": 'Показывать всплывающие окна "Что нового" после обновлений',
"settings.updates.row.startup.title": "Проверять обновления при запуске",
"settings.updates.row.startup.description": "Автоматически проверять обновления при запуске OpenCode",
"settings.updates.row.check.title": "Проверить обновления",
"settings.updates.row.check.description": "Проверить обновления вручную и установить, если доступны",
"settings.updates.action.checkNow": "Проверить сейчас",
"settings.updates.action.checking": "Проверка...",
"settings.updates.toast.latest.title": "У вас последняя версия",
"settings.updates.toast.latest.description": "Вы используете последнюю версию OpenCode.",
"font.option.ibmPlexMono": "IBM Plex Mono", "font.option.ibmPlexMono": "IBM Plex Mono",
"font.option.cascadiaCode": "Cascadia Code", "font.option.cascadiaCode": "Cascadia Code",
"font.option.firaCode": "Fira Code", "font.option.firaCode": "Fira Code",
"font.option.hack": "Hack", "font.option.hack": "Hack",
"font.option.inconsolata": "Inconsolata", "font.option.inconsolata": "Inconsolata",
"font.option.intelOneMono": "Intel One Mono", "font.option.intelOneMono": "Intel One Mono",
"font.option.iosevka": "Iosevka",
"font.option.jetbrainsMono": "JetBrains Mono", "font.option.jetbrainsMono": "JetBrains Mono",
"font.option.mesloLgs": "Meslo LGS", "font.option.mesloLgs": "Meslo LGS",
"font.option.robotoMono": "Roboto Mono", "font.option.robotoMono": "Roboto Mono",
@@ -600,6 +639,13 @@ export const dict = {
"settings.providers.title": "Провайдеры", "settings.providers.title": "Провайдеры",
"settings.providers.description": "Настройки провайдеров будут доступны здесь.", "settings.providers.description": "Настройки провайдеров будут доступны здесь.",
"settings.providers.section.connected": "Подключённые провайдеры",
"settings.providers.connected.empty": "Нет подключённых провайдеров",
"settings.providers.section.popular": "Популярные провайдеры",
"settings.providers.tag.environment": "Среда",
"settings.providers.tag.config": "Конфигурация",
"settings.providers.tag.custom": "Пользовательский",
"settings.providers.tag.other": "Другое",
"settings.models.title": "Модели", "settings.models.title": "Модели",
"settings.models.description": "Настройки моделей будут доступны здесь.", "settings.models.description": "Настройки моделей будут доступны здесь.",
"settings.agents.title": "Агенты", "settings.agents.title": "Агенты",
@@ -667,6 +713,7 @@ export const dict = {
"workspace.reset.failed.title": "Не удалось сбросить рабочее пространство", "workspace.reset.failed.title": "Не удалось сбросить рабочее пространство",
"workspace.reset.success.title": "Рабочее пространство сброшено", "workspace.reset.success.title": "Рабочее пространство сброшено",
"workspace.reset.success.description": "Рабочее пространство теперь соответствует ветке по умолчанию.", "workspace.reset.success.description": "Рабочее пространство теперь соответствует ветке по умолчанию.",
"workspace.error.stillPreparing": "Рабочее пространство всё ещё готовится",
"workspace.status.checking": "Проверка наличия неслитых изменений...", "workspace.status.checking": "Проверка наличия неслитых изменений...",
"workspace.status.error": "Не удалось проверить статус git.", "workspace.status.error": "Не удалось проверить статус git.",
"workspace.status.clean": "Неслитые изменения не обнаружены.", "workspace.status.clean": "Неслитые изменения не обнаружены.",
+718
View File
@@ -0,0 +1,718 @@
export const dict = {
"command.category.suggested": "แนะนำ",
"command.category.view": "มุมมอง",
"command.category.project": "โปรเจกต์",
"command.category.provider": "ผู้ให้บริการ",
"command.category.server": "เซิร์ฟเวอร์",
"command.category.session": "เซสชัน",
"command.category.theme": "ธีม",
"command.category.language": "ภาษา",
"command.category.file": "ไฟล์",
"command.category.context": "บริบท",
"command.category.terminal": "เทอร์มินัล",
"command.category.model": "โมเดล",
"command.category.mcp": "MCP",
"command.category.agent": "เอเจนต์",
"command.category.permissions": "สิทธิ์",
"command.category.workspace": "พื้นที่ทำงาน",
"command.category.settings": "การตั้งค่า",
"theme.scheme.system": "ระบบ",
"theme.scheme.light": "สว่าง",
"theme.scheme.dark": "มืด",
"command.sidebar.toggle": "สลับแถบข้าง",
"command.project.open": "เปิดโปรเจกต์",
"command.provider.connect": "เชื่อมต่อผู้ให้บริการ",
"command.server.switch": "สลับเซิร์ฟเวอร์",
"command.settings.open": "เปิดการตั้งค่า",
"command.session.previous": "เซสชันก่อนหน้า",
"command.session.next": "เซสชันถัดไป",
"command.session.archive": "จัดเก็บเซสชัน",
"command.palette": "คำสั่งค้นหา",
"command.theme.cycle": "เปลี่ยนธีม",
"command.theme.set": "ใช้ธีม: {{theme}}",
"command.theme.scheme.cycle": "เปลี่ยนโทนสี",
"command.theme.scheme.set": "ใช้โทนสี: {{scheme}}",
"command.language.cycle": "เปลี่ยนภาษา",
"command.language.set": "ใช้ภาษา: {{language}}",
"command.session.new": "เซสชันใหม่",
"command.file.open": "เปิดไฟล์",
"command.file.open.description": "ค้นหาไฟล์และคำสั่ง",
"command.context.addSelection": "เพิ่มส่วนที่เลือกไปยังบริบท",
"command.context.addSelection.description": "เพิ่มบรรทัดที่เลือกจากไฟล์ปัจจุบัน",
"command.terminal.toggle": "สลับเทอร์มินัล",
"command.fileTree.toggle": "สลับต้นไม้ไฟล์",
"command.review.toggle": "สลับการตรวจสอบ",
"command.terminal.new": "เทอร์มินัลใหม่",
"command.terminal.new.description": "สร้างแท็บเทอร์มินัลใหม่",
"command.steps.toggle": "สลับขั้นตอน",
"command.steps.toggle.description": "แสดงหรือซ่อนขั้นตอนสำหรับข้อความปัจจุบัน",
"command.message.previous": "ข้อความก่อนหน้า",
"command.message.previous.description": "ไปที่ข้อความผู้ใช้ก่อนหน้า",
"command.message.next": "ข้อความถัดไป",
"command.message.next.description": "ไปที่ข้อความผู้ใช้ถัดไป",
"command.model.choose": "เลือกโมเดล",
"command.model.choose.description": "เลือกโมเดลอื่น",
"command.mcp.toggle": "สลับ MCPs",
"command.mcp.toggle.description": "สลับ MCPs",
"command.agent.cycle": "เปลี่ยนเอเจนต์",
"command.agent.cycle.description": "สลับไปยังเอเจนต์ถัดไป",
"command.agent.cycle.reverse": "เปลี่ยนเอเจนต์ย้อนกลับ",
"command.agent.cycle.reverse.description": "สลับไปยังเอเจนต์ก่อนหน้า",
"command.model.variant.cycle": "เปลี่ยนความพยายามในการคิด",
"command.model.variant.cycle.description": "สลับไปยังระดับความพยายามถัดไป",
"command.permissions.autoaccept.enable": "ยอมรับการแก้ไขโดยอัตโนมัติ",
"command.permissions.autoaccept.disable": "หยุดยอมรับการแก้ไขโดยอัตโนมัติ",
"command.session.undo": "ยกเลิก",
"command.session.undo.description": "ยกเลิกข้อความล่าสุด",
"command.session.redo": "ทำซ้ำ",
"command.session.redo.description": "ทำซ้ำข้อความที่ถูกยกเลิกล่าสุด",
"command.session.compact": "บีบอัดเซสชัน",
"command.session.compact.description": "สรุปเซสชันเพื่อลดขนาดบริบท",
"command.session.fork": "แตกแขนงจากข้อความ",
"command.session.fork.description": "สร้างเซสชันใหม่จากข้อความก่อนหน้า",
"command.session.share": "แชร์เซสชัน",
"command.session.share.description": "แชร์เซสชันนี้และคัดลอก URL ไปยังคลิปบอร์ด",
"command.session.unshare": "ยกเลิกการแชร์เซสชัน",
"command.session.unshare.description": "หยุดการแชร์เซสชันนี้",
"palette.search.placeholder": "ค้นหาไฟล์และคำสั่ง",
"palette.empty": "ไม่พบผลลัพธ์",
"palette.group.commands": "คำสั่ง",
"palette.group.files": "ไฟล์",
"dialog.provider.search.placeholder": "ค้นหาผู้ให้บริการ",
"dialog.provider.empty": "ไม่พบผู้ให้บริการ",
"dialog.provider.group.popular": "ยอดนิยม",
"dialog.provider.group.other": "อื่น ๆ",
"dialog.provider.tag.recommended": "แนะนำ",
"dialog.provider.opencode.note": "โมเดลที่คัดสรร รวมถึง Claude, GPT, Gemini และอื่น ๆ",
"dialog.provider.anthropic.note": "เข้าถึงโมเดล Claude โดยตรง รวมถึง Pro และ Max",
"dialog.provider.copilot.note": "โมเดล Claude สำหรับการช่วยเหลือในการเขียนโค้ด",
"dialog.provider.openai.note": "โมเดล GPT สำหรับงาน AI ทั่วไปที่รวดเร็วและมีความสามารถ",
"dialog.provider.google.note": "โมเดล Gemini สำหรับการตอบสนองที่รวดเร็วและมีโครงสร้าง",
"dialog.provider.openrouter.note": "เข้าถึงโมเดลที่รองรับทั้งหมดจากผู้ให้บริการเดียว",
"dialog.provider.vercel.note": "การเข้าถึงโมเดล AI แบบรวมด้วยการกำหนดเส้นทางอัจฉริยะ",
"dialog.model.select.title": "เลือกโมเดล",
"dialog.model.search.placeholder": "ค้นหาโมเดล",
"dialog.model.empty": "ไม่พบผลลัพธ์โมเดล",
"dialog.model.manage": "จัดการโมเดล",
"dialog.model.manage.description": "ปรับแต่งโมเดลที่จะปรากฏในตัวเลือกโมเดล",
"dialog.model.unpaid.freeModels.title": "โมเดลฟรีที่จัดหาให้โดย OpenCode",
"dialog.model.unpaid.addMore.title": "เพิ่มโมเดลเพิ่มเติมจากผู้ให้บริการยอดนิยม",
"dialog.provider.viewAll": "แสดงผู้ให้บริการเพิ่มเติม",
"provider.connect.title": "เชื่อมต่อ {{provider}}",
"provider.connect.title.anthropicProMax": "เข้าสู่ระบบด้วย Claude Pro/Max",
"provider.connect.selectMethod": "เลือกวิธีการเข้าสู่ระบบสำหรับ {{provider}}",
"provider.connect.method.apiKey": "คีย์ API",
"provider.connect.status.inProgress": "กำลังอนุญาต...",
"provider.connect.status.waiting": "รอการอนุญาต...",
"provider.connect.status.failed": "การอนุญาตล้มเหลว: {{error}}",
"provider.connect.apiKey.description":
"ป้อนคีย์ API ของ {{provider}} เพื่อเชื่อมต่อบัญชีและใช้โมเดล {{provider}} ใน OpenCode",
"provider.connect.apiKey.label": "คีย์ API ของ {{provider}}",
"provider.connect.apiKey.placeholder": "คีย์ API",
"provider.connect.apiKey.required": "ต้องใช้คีย์ API",
"provider.connect.opencodeZen.line1":
"OpenCode Zen ให้คุณเข้าถึงชุดโมเดลที่เชื่อถือได้และปรับแต่งแล้วสำหรับเอเจนต์การเขียนโค้ด",
"provider.connect.opencodeZen.line2":
"ด้วยคีย์ API เดียวคุณจะได้รับการเข้าถึงโมเดล เช่น Claude, GPT, Gemini, GLM และอื่น ๆ",
"provider.connect.opencodeZen.visit.prefix": "เยี่ยมชม ",
"provider.connect.opencodeZen.visit.link": "opencode.ai/zen",
"provider.connect.opencodeZen.visit.suffix": " เพื่อรวบรวมคีย์ API ของคุณ",
"provider.connect.oauth.code.visit.prefix": "เยี่ยมชม ",
"provider.connect.oauth.code.visit.link": "ลิงก์นี้",
"provider.connect.oauth.code.visit.suffix":
" เพื่อรวบรวมรหัสการอนุญาตของคุณเพื่อเชื่อมต่อบัญชีและใช้โมเดล {{provider}} ใน OpenCode",
"provider.connect.oauth.code.label": "รหัสการอนุญาต {{method}}",
"provider.connect.oauth.code.placeholder": "รหัสการอนุญาต",
"provider.connect.oauth.code.required": "ต้องใช้รหัสการอนุญาต",
"provider.connect.oauth.code.invalid": "รหัสการอนุญาตไม่ถูกต้อง",
"provider.connect.oauth.auto.visit.prefix": "เยี่ยมชม ",
"provider.connect.oauth.auto.visit.link": "ลิงก์นี้",
"provider.connect.oauth.auto.visit.suffix":
" และป้อนรหัสด้านล่างเพื่อเชื่อมต่อบัญชีและใช้โมเดล {{provider}} ใน OpenCode",
"provider.connect.oauth.auto.confirmationCode": "รหัสยืนยัน",
"provider.connect.toast.connected.title": "{{provider}} ที่เชื่อมต่อแล้ว",
"provider.connect.toast.connected.description": "โมเดล {{provider}} พร้อมใช้งานแล้ว",
"provider.disconnect.toast.disconnected.title": "{{provider}} ที่ยกเลิกการเชื่อมต่อแล้ว",
"provider.disconnect.toast.disconnected.description": "โมเดล {{provider}} ไม่พร้อมใช้งานอีกต่อไป",
"model.tag.free": "ฟรี",
"model.tag.latest": "ล่าสุด",
"model.provider.anthropic": "Anthropic",
"model.provider.openai": "OpenAI",
"model.provider.google": "Google",
"model.provider.xai": "xAI",
"model.provider.meta": "Meta",
"model.input.text": "ข้อความ",
"model.input.image": "รูปภาพ",
"model.input.audio": "เสียง",
"model.input.video": "วิดีโอ",
"model.input.pdf": "pdf",
"model.tooltip.allows": "อนุญาต: {{inputs}}",
"model.tooltip.reasoning.allowed": "อนุญาตการใช้เหตุผล",
"model.tooltip.reasoning.none": "ไม่มีการใช้เหตุผล",
"model.tooltip.context": "ขีดจำกัดบริบท {{limit}}",
"common.search.placeholder": "ค้นหา",
"common.goBack": "ย้อนกลับ",
"common.loading": "กำลังโหลด",
"common.loading.ellipsis": "...",
"common.cancel": "ยกเลิก",
"common.connect": "เชื่อมต่อ",
"common.disconnect": "ยกเลิกการเชื่อมต่อ",
"common.submit": "ส่ง",
"common.save": "บันทึก",
"common.saving": "กำลังบันทึก...",
"common.default": "ค่าเริ่มต้น",
"common.attachment": "ไฟล์แนบ",
"prompt.placeholder.shell": "ป้อนคำสั่งเชลล์...",
"prompt.placeholder.normal": 'ถามอะไรก็ได้... "{{example}}"',
"prompt.placeholder.summarizeComments": "สรุปความคิดเห็น…",
"prompt.placeholder.summarizeComment": "สรุปความคิดเห็น…",
"prompt.mode.shell": "เชลล์",
"prompt.mode.shell.exit": "กด esc เพื่อออก",
"prompt.example.1": "แก้ไข TODO ในโค้ดเบส",
"prompt.example.2": "เทคโนโลยีของโปรเจกต์นี้คืออะไร?",
"prompt.example.3": "แก้ไขการทดสอบที่เสีย",
"prompt.example.4": "อธิบายวิธีการทำงานของการตรวจสอบสิทธิ์",
"prompt.example.5": "ค้นหาและแก้ไขช่องโหว่ความปลอดภัย",
"prompt.example.6": "เพิ่มการทดสอบหน่วยสำหรับบริการผู้ใช้",
"prompt.example.7": "ปรับโครงสร้างฟังก์ชันนี้ให้อ่านง่ายขึ้น",
"prompt.example.8": "ข้อผิดพลาดนี้หมายความว่าอะไร?",
"prompt.example.9": "ช่วยฉันดีบักปัญหานี้",
"prompt.example.10": "สร้างเอกสาร API",
"prompt.example.11": "ปรับปรุงการสืบค้นฐานข้อมูล",
"prompt.example.12": "เพิ่มการตรวจสอบข้อมูลนำเข้า",
"prompt.example.13": "สร้างคอมโพเนนต์ใหม่สำหรับ...",
"prompt.example.14": "ฉันจะทำให้โปรเจกต์นี้ทำงานได้อย่างไร?",
"prompt.example.15": "ตรวจสอบโค้ดของฉันเพื่อแนวทางปฏิบัติที่ดีที่สุด",
"prompt.example.16": "เพิ่มการจัดการข้อผิดพลาดในฟังก์ชันนี้",
"prompt.example.17": "อธิบายรูปแบบ regex นี้",
"prompt.example.18": "แปลงสิ่งนี้เป็น TypeScript",
"prompt.example.19": "เพิ่มการบันทึกทั่วทั้งโค้ดเบส",
"prompt.example.20": "มีการพึ่งพาอะไรที่ล้าสมัยอยู่?",
"prompt.example.21": "ช่วยฉันเขียนสคริปต์การย้ายข้อมูล",
"prompt.example.22": "ใช้งานแคชสำหรับจุดสิ้นสุดนี้",
"prompt.example.23": "เพิ่มการแบ่งหน้าในรายการนี้",
"prompt.example.24": "สร้างคำสั่ง CLI สำหรับ...",
"prompt.example.25": "ตัวแปรสภาพแวดล้อมทำงานอย่างไรที่นี่?",
"prompt.popover.emptyResults": "ไม่พบผลลัพธ์ที่ตรงกัน",
"prompt.popover.emptyCommands": "ไม่พบคำสั่งที่ตรงกัน",
"prompt.dropzone.label": "วางรูปภาพหรือ PDF ที่นี่",
"prompt.slash.badge.custom": "กำหนดเอง",
"prompt.context.active": "ใช้งานอยู่",
"prompt.context.includeActiveFile": "รวมไฟล์ที่ใช้งานอยู่",
"prompt.context.removeActiveFile": "เอาไฟล์ที่ใช้งานอยู่ออกจากบริบท",
"prompt.context.removeFile": "เอาไฟล์ออกจากบริบท",
"prompt.action.attachFile": "แนบไฟล์",
"prompt.attachment.remove": "เอาไฟล์แนบออก",
"prompt.action.send": "ส่ง",
"prompt.action.stop": "หยุด",
"prompt.toast.pasteUnsupported.title": "การวางไม่รองรับ",
"prompt.toast.pasteUnsupported.description": "สามารถวางรูปภาพหรือ PDF เท่านั้น",
"prompt.toast.modelAgentRequired.title": "เลือกเอเจนต์และโมเดล",
"prompt.toast.modelAgentRequired.description": "เลือกเอเจนต์และโมเดลก่อนส่งพร้อมท์",
"prompt.toast.worktreeCreateFailed.title": "ไม่สามารถสร้าง worktree",
"prompt.toast.sessionCreateFailed.title": "ไม่สามารถสร้างเซสชัน",
"prompt.toast.shellSendFailed.title": "ไม่สามารถส่งคำสั่งเชลล์",
"prompt.toast.commandSendFailed.title": "ไม่สามารถส่งคำสั่ง",
"prompt.toast.promptSendFailed.title": "ไม่สามารถส่งพร้อมท์",
"dialog.mcp.title": "MCPs",
"dialog.mcp.description": "{{enabled}} จาก {{total}} ที่เปิดใช้งาน",
"dialog.mcp.empty": "ไม่มี MCP ที่กำหนดค่า",
"dialog.lsp.empty": "LSPs ตรวจจับอัตโนมัติจากประเภทไฟล์",
"dialog.plugins.empty": "ปลั๊กอินที่กำหนดค่าใน opencode.json",
"mcp.status.connected": "เชื่อมต่อแล้ว",
"mcp.status.failed": "ล้มเหลว",
"mcp.status.needs_auth": "ต้องการการตรวจสอบสิทธิ์",
"mcp.status.disabled": "ปิดใช้งาน",
"dialog.fork.empty": "ไม่มีข้อความให้แตกแขนง",
"dialog.directory.search.placeholder": "ค้นหาโฟลเดอร์",
"dialog.directory.empty": "ไม่พบโฟลเดอร์",
"dialog.server.title": "เซิร์ฟเวอร์",
"dialog.server.description": "สลับเซิร์ฟเวอร์ OpenCode ที่แอปนี้เชื่อมต่อด้วย",
"dialog.server.search.placeholder": "ค้นหาเซิร์ฟเวอร์",
"dialog.server.empty": "ยังไม่มีเซิร์ฟเวอร์",
"dialog.server.add.title": "เพิ่มเซิร์ฟเวอร์",
"dialog.server.add.url": "URL เซิร์ฟเวอร์",
"dialog.server.add.placeholder": "http://localhost:4096",
"dialog.server.add.error": "ไม่สามารถเชื่อมต่อกับเซิร์ฟเวอร์",
"dialog.server.add.checking": "กำลังตรวจสอบ...",
"dialog.server.add.button": "เพิ่มเซิร์ฟเวอร์",
"dialog.server.default.title": "เซิร์ฟเวอร์เริ่มต้น",
"dialog.server.default.description":
"เชื่อมต่อกับเซิร์ฟเวอร์นี้เมื่อเปิดแอปแทนการเริ่มเซิร์ฟเวอร์ในเครื่อง ต้องรีสตาร์ท",
"dialog.server.default.none": "ไม่ได้เลือกเซิร์ฟเวอร์",
"dialog.server.default.set": "ตั้งเซิร์ฟเวอร์ปัจจุบันเป็นค่าเริ่มต้น",
"dialog.server.default.clear": "ล้าง",
"dialog.server.action.remove": "เอาเซิร์ฟเวอร์ออก",
"dialog.server.menu.edit": "แก้ไข",
"dialog.server.menu.default": "ตั้งเป็นค่าเริ่มต้น",
"dialog.server.menu.defaultRemove": "เอาค่าเริ่มต้นออก",
"dialog.server.menu.delete": "ลบ",
"dialog.server.current": "เซิร์ฟเวอร์ปัจจุบัน",
"dialog.server.status.default": "ค่าเริ่มต้น",
"dialog.project.edit.title": "แก้ไขโปรเจกต์",
"dialog.project.edit.name": "ชื่อ",
"dialog.project.edit.icon": "ไอคอน",
"dialog.project.edit.icon.alt": "ไอคอนโปรเจกต์",
"dialog.project.edit.icon.hint": "คลิกหรือลากรูปภาพ",
"dialog.project.edit.icon.recommended": "แนะนำ: 128x128px",
"dialog.project.edit.color": "สี",
"dialog.project.edit.color.select": "เลือกสี {{color}}",
"dialog.project.edit.worktree.startup": "สคริปต์เริ่มต้นพื้นที่ทำงาน",
"dialog.project.edit.worktree.startup.description": "ทำงานหลังจากสร้างพื้นที่ทำงานใหม่ (worktree)",
"dialog.project.edit.worktree.startup.placeholder": "เช่น bun install",
"context.breakdown.title": "การแบ่งบริบท",
"context.breakdown.note": 'การแบ่งโดยประมาณของโทเค็นนำเข้า "อื่น ๆ" รวมถึงคำนิยามเครื่องมือและโอเวอร์เฮด',
"context.breakdown.system": "ระบบ",
"context.breakdown.user": "ผู้ใช้",
"context.breakdown.assistant": "ผู้ช่วย",
"context.breakdown.tool": "การเรียกเครื่องมือ",
"context.breakdown.other": "อื่น ๆ",
"context.systemPrompt.title": "พร้อมท์ระบบ",
"context.rawMessages.title": "ข้อความดิบ",
"context.stats.session": "เซสชัน",
"context.stats.messages": "ข้อความ",
"context.stats.provider": "ผู้ให้บริการ",
"context.stats.model": "โมเดล",
"context.stats.limit": "ขีดจำกัดบริบท",
"context.stats.totalTokens": "โทเค็นทั้งหมด",
"context.stats.usage": "การใช้งาน",
"context.stats.inputTokens": "โทเค็นนำเข้า",
"context.stats.outputTokens": "โทเค็นส่งออก",
"context.stats.reasoningTokens": "โทเค็นการใช้เหตุผล",
"context.stats.cacheTokens": "โทเค็นแคช (อ่าน/เขียน)",
"context.stats.userMessages": "ข้อความผู้ใช้",
"context.stats.assistantMessages": "ข้อความผู้ช่วย",
"context.stats.totalCost": "ต้นทุนทั้งหมด",
"context.stats.sessionCreated": "สร้างเซสชันเมื่อ",
"context.stats.lastActivity": "กิจกรรมล่าสุด",
"context.usage.tokens": "โทเค็น",
"context.usage.usage": "การใช้งาน",
"context.usage.cost": "ต้นทุน",
"context.usage.clickToView": "คลิกเพื่อดูบริบท",
"context.usage.view": "ดูการใช้บริบท",
"language.en": "อังกฤษ",
"language.zh": "จีนตัวย่อ",
"language.zht": "จีนตัวเต็ม",
"language.ko": "เกาหลี",
"language.de": "เยอรมัน",
"language.es": "สเปน",
"language.fr": "ฝรั่งเศส",
"language.da": "เดนมาร์ก",
"language.ja": "ญี่ปุ่น",
"language.pl": "โปแลนด์",
"language.ru": "รัสเซีย",
"language.ar": "อาหรับ",
"language.no": "นอร์เวย์",
"language.br": "โปรตุเกส (บราซิล)",
"language.th": "ไทย",
"toast.language.title": "ภาษา",
"toast.language.description": "สลับไปที่ {{language}}",
"toast.theme.title": "สลับธีมแล้ว",
"toast.scheme.title": "โทนสี",
"toast.permissions.autoaccept.on.title": "กำลังยอมรับการแก้ไขโดยอัตโนมัติ",
"toast.permissions.autoaccept.on.description": "สิทธิ์การแก้ไขและเขียนจะได้รับการอนุมัติโดยอัตโนมัติ",
"toast.permissions.autoaccept.off.title": "หยุดยอมรับการแก้ไขโดยอัตโนมัติ",
"toast.permissions.autoaccept.off.description": "สิทธิ์การแก้ไขและเขียนจะต้องได้รับการอนุมัติ",
"toast.model.none.title": "ไม่ได้เลือกโมเดล",
"toast.model.none.description": "เชื่อมต่อผู้ให้บริการเพื่อสรุปเซสชันนี้",
"toast.file.loadFailed.title": "ไม่สามารถโหลดไฟล์",
"toast.file.listFailed.title": "ไม่สามารถแสดงรายการไฟล์",
"toast.context.noLineSelection.title": "ไม่มีการเลือกบรรทัด",
"toast.context.noLineSelection.description": "เลือกช่วงบรรทัดในแท็บไฟล์ก่อน",
"toast.session.share.copyFailed.title": "ไม่สามารถคัดลอก URL ไปยังคลิปบอร์ด",
"toast.session.share.success.title": "แชร์เซสชันแล้ว",
"toast.session.share.success.description": "คัดลอก URL แชร์ไปยังคลิปบอร์ดแล้ว!",
"toast.session.share.failed.title": "ไม่สามารถแชร์เซสชัน",
"toast.session.share.failed.description": "เกิดข้อผิดพลาดระหว่างการแชร์เซสชัน",
"toast.session.unshare.success.title": "ยกเลิกการแชร์เซสชันแล้ว",
"toast.session.unshare.success.description": "ยกเลิกการแชร์เซสชันสำเร็จ!",
"toast.session.unshare.failed.title": "ไม่สามารถยกเลิกการแชร์เซสชัน",
"toast.session.unshare.failed.description": "เกิดข้อผิดพลาดระหว่างการยกเลิกการแชร์เซสชัน",
"toast.session.listFailed.title": "ไม่สามารถโหลดเซสชันสำหรับ {{project}}",
"toast.update.title": "มีการอัปเดต",
"toast.update.description": "เวอร์ชันใหม่ของ OpenCode ({{version}}) พร้อมใช้งานสำหรับติดตั้ง",
"toast.update.action.installRestart": "ติดตั้งและรีสตาร์ท",
"toast.update.action.notYet": "ยังไม่",
"error.page.title": "เกิดข้อผิดพลาด",
"error.page.description": "เกิดข้อผิดพลาดระหว่างการโหลดแอปพลิเคชัน",
"error.page.details.label": "รายละเอียดข้อผิดพลาด",
"error.page.action.restart": "รีสตาร์ท",
"error.page.action.checking": "กำลังตรวจสอบ...",
"error.page.action.checkUpdates": "ตรวจสอบการอัปเดต",
"error.page.action.updateTo": "อัปเดตเป็น {{version}}",
"error.page.report.prefix": "โปรดรายงานข้อผิดพลาดนี้ให้ทีม OpenCode",
"error.page.report.discord": "บน Discord",
"error.page.version": "เวอร์ชัน: {{version}}",
"error.dev.rootNotFound": "ไม่พบองค์ประกอบรูท คุณลืมเพิ่มใน index.html หรือบางทีแอตทริบิวต์ id อาจสะกดผิด?",
"error.globalSync.connectFailed": "ไม่สามารถเชื่อมต่อกับเซิร์ฟเวอร์ มีเซิร์ฟเวอร์ทำงานอยู่ที่ `{{url}}` หรือไม่?",
"error.chain.unknown": "ข้อผิดพลาดที่ไม่รู้จัก",
"error.chain.causedBy": "สาเหตุ:",
"error.chain.apiError": "ข้อผิดพลาด API",
"error.chain.status": "สถานะ: {{status}}",
"error.chain.retryable": "สามารถลองใหม่: {{retryable}}",
"error.chain.responseBody": "เนื้อหาการตอบสนอง:\n{{body}}",
"error.chain.didYouMean": "คุณหมายถึง: {{suggestions}}",
"error.chain.modelNotFound": "ไม่พบโมเดล: {{provider}}/{{model}}",
"error.chain.checkConfig": "ตรวจสอบการกำหนดค่าของคุณ (opencode.json) ชื่อผู้ให้บริการ/โมเดล",
"error.chain.mcpFailed": 'เซิร์ฟเวอร์ MCP "{{name}}" ล้มเหลว โปรดทราบว่า OpenCode ยังไม่รองรับการตรวจสอบสิทธิ์ MCP',
"error.chain.providerAuthFailed": "การตรวจสอบสิทธิ์ผู้ให้บริการล้มเหลว ({{provider}}): {{message}}",
"error.chain.providerInitFailed": 'ไม่สามารถเริ่มต้นผู้ให้บริการ "{{provider}}" ตรวจสอบข้อมูลรับรองและการกำหนดค่า',
"error.chain.configJsonInvalid": "ไฟล์กำหนดค่าที่ {{path}} ไม่ใช่ JSON(C) ที่ถูกต้อง",
"error.chain.configJsonInvalidWithMessage": "ไฟล์กำหนดค่าที่ {{path}} ไม่ใช่ JSON(C) ที่ถูกต้อง: {{message}}",
"error.chain.configDirectoryTypo":
'ไดเรกทอรี "{{dir}}" ใน {{path}} ไม่ถูกต้อง เปลี่ยนชื่อไดเรกทอรีเป็น "{{suggestion}}" หรือเอาออก นี่เป็นการสะกดผิดทั่วไป',
"error.chain.configFrontmatterError": "ไม่สามารถแยกวิเคราะห์ frontmatter ใน {{path}}:\n{{message}}",
"error.chain.configInvalid": "ไฟล์กำหนดค่าที่ {{path}} ไม่ถูกต้อง",
"error.chain.configInvalidWithMessage": "ไฟล์กำหนดค่าที่ {{path}} ไม่ถูกต้อง: {{message}}",
"notification.permission.title": "ต้องการสิทธิ์",
"notification.permission.description": "{{sessionTitle}} ใน {{projectName}} ต้องการสิทธิ์",
"notification.question.title": "คำถาม",
"notification.question.description": "{{sessionTitle}} ใน {{projectName}} มีคำถาม",
"notification.action.goToSession": "ไปที่เซสชัน",
"notification.session.responseReady.title": "การตอบสนองพร้อม",
"notification.session.error.title": "ข้อผิดพลาดเซสชัน",
"notification.session.error.fallbackDescription": "เกิดข้อผิดพลาด",
"home.recentProjects": "โปรเจกต์ล่าสุด",
"home.empty.title": "ไม่มีโปรเจกต์ล่าสุด",
"home.empty.description": "เริ่มต้นโดยเปิดโปรเจกต์ในเครื่อง",
"session.tab.session": "เซสชัน",
"session.tab.review": "ตรวจสอบ",
"session.tab.context": "บริบท",
"session.panel.reviewAndFiles": "ตรวจสอบและไฟล์",
"session.review.filesChanged": "{{count}} ไฟล์ที่เปลี่ยนแปลง",
"session.review.change.one": "การเปลี่ยนแปลง",
"session.review.change.other": "การเปลี่ยนแปลง",
"session.review.loadingChanges": "กำลังโหลดการเปลี่ยนแปลง...",
"session.review.empty": "ยังไม่มีการเปลี่ยนแปลงในเซสชันนี้",
"session.review.noChanges": "ไม่มีการเปลี่ยนแปลง",
"session.files.selectToOpen": "เลือกไฟล์เพื่อเปิด",
"session.files.all": "ไฟล์ทั้งหมด",
"session.messages.renderEarlier": "แสดงข้อความก่อนหน้า",
"session.messages.loadingEarlier": "กำลังโหลดข้อความก่อนหน้า...",
"session.messages.loadEarlier": "โหลดข้อความก่อนหน้า",
"session.messages.loading": "กำลังโหลดข้อความ...",
"session.messages.jumpToLatest": "ไปที่ล่าสุด",
"session.context.addToContext": "เพิ่ม {{selection}} ไปยังบริบท",
"session.new.worktree.main": "สาขาหลัก",
"session.new.worktree.mainWithBranch": "สาขาหลัก ({{branch}})",
"session.new.worktree.create": "สร้าง worktree ใหม่",
"session.new.lastModified": "แก้ไขล่าสุด",
"session.header.search.placeholder": "ค้นหา {{project}}",
"session.header.searchFiles": "ค้นหาไฟล์",
"status.popover.trigger": "สถานะ",
"status.popover.ariaLabel": "การกำหนดค่าเซิร์ฟเวอร์",
"status.popover.tab.servers": "เซิร์ฟเวอร์",
"status.popover.tab.mcp": "MCP",
"status.popover.tab.lsp": "LSP",
"status.popover.tab.plugins": "ปลั๊กอิน",
"status.popover.action.manageServers": "จัดการเซิร์ฟเวอร์",
"session.share.popover.title": "เผยแพร่บนเว็บ",
"session.share.popover.description.shared": "เซสชันนี้เป็นสาธารณะบนเว็บ สามารถเข้าถึงได้โดยผู้ที่มีลิงก์",
"session.share.popover.description.unshared": "แชร์เซสชันสาธารณะบนเว็บ จะเข้าถึงได้โดยผู้ที่มีลิงก์",
"session.share.action.share": "แชร์",
"session.share.action.publish": "เผยแพร่",
"session.share.action.publishing": "กำลังเผยแพร่...",
"session.share.action.unpublish": "ยกเลิกการเผยแพร่",
"session.share.action.unpublishing": "กำลังยกเลิกการเผยแพร่...",
"session.share.action.view": "ดู",
"session.share.copy.copied": "คัดลอกแล้ว",
"session.share.copy.copyLink": "คัดลอกลิงก์",
"lsp.tooltip.none": "ไม่มีเซิร์ฟเวอร์ LSP",
"lsp.label.connected": "{{count}} LSP",
"prompt.loading": "กำลังโหลดพร้อมท์...",
"terminal.loading": "กำลังโหลดเทอร์มินัล...",
"terminal.title": "เทอร์มินัล",
"terminal.title.numbered": "เทอร์มินัล {{number}}",
"terminal.close": "ปิดเทอร์มินัล",
"terminal.connectionLost.title": "การเชื่อมต่อขาดหาย",
"terminal.connectionLost.description": "การเชื่อมต่อเทอร์มินัลถูกขัดจังหวะ อาจเกิดขึ้นเมื่อเซิร์ฟเวอร์รีสตาร์ท",
"common.closeTab": "ปิดแท็บ",
"common.dismiss": "ปิด",
"common.requestFailed": "คำขอล้มเหลว",
"common.moreOptions": "ตัวเลือกเพิ่มเติม",
"common.learnMore": "เรียนรู้เพิ่มเติม",
"common.rename": "เปลี่ยนชื่อ",
"common.reset": "รีเซ็ต",
"common.archive": "จัดเก็บ",
"common.delete": "ลบ",
"common.close": "ปิด",
"common.edit": "แก้ไข",
"common.loadMore": "โหลดเพิ่มเติม",
"common.key.esc": "ESC",
"sidebar.menu.toggle": "สลับเมนู",
"sidebar.nav.projectsAndSessions": "โปรเจกต์และเซสชัน",
"sidebar.settings": "การตั้งค่า",
"sidebar.help": "ช่วยเหลือ",
"sidebar.workspaces.enable": "เปิดใช้งานพื้นที่ทำงาน",
"sidebar.workspaces.disable": "ปิดใช้งานพื้นที่ทำงาน",
"sidebar.gettingStarted.title": "เริ่มต้นใช้งาน",
"sidebar.gettingStarted.line1": "OpenCode รวมถึงโมเดลฟรีเพื่อให้คุณเริ่มต้นได้ทันที",
"sidebar.gettingStarted.line2": "เชื่อมต่อผู้ให้บริการใด ๆ เพื่อใช้โมเดล รวมถึง Claude, GPT, Gemini ฯลฯ",
"sidebar.project.recentSessions": "เซสชันล่าสุด",
"sidebar.project.viewAllSessions": "ดูเซสชันทั้งหมด",
"app.name.desktop": "OpenCode Desktop",
"settings.section.desktop": "เดสก์ท็อป",
"settings.section.server": "เซิร์ฟเวอร์",
"settings.tab.general": "ทั่วไป",
"settings.tab.shortcuts": "ทางลัด",
"settings.general.section.appearance": "รูปลักษณ์",
"settings.general.section.notifications": "การแจ้งเตือนระบบ",
"settings.general.section.updates": "การอัปเดต",
"settings.general.section.sounds": "เสียงเอฟเฟกต์",
"settings.general.row.language.title": "ภาษา",
"settings.general.row.language.description": "เปลี่ยนภาษาที่แสดงสำหรับ OpenCode",
"settings.general.row.appearance.title": "รูปลักษณ์",
"settings.general.row.appearance.description": "ปรับแต่งวิธีการที่ OpenCode มีลักษณะบนอุปกรณ์ของคุณ",
"settings.general.row.theme.title": "ธีม",
"settings.general.row.theme.description": "ปรับแต่งวิธีการที่ OpenCode มีธีม",
"settings.general.row.font.title": "ฟอนต์",
"settings.general.row.font.description": "ปรับแต่งฟอนต์โมโนที่ใช้ในบล็อกโค้ด",
"settings.general.row.releaseNotes.title": "บันทึกการอัปเดต",
"settings.general.row.releaseNotes.description": "แสดงป๊อปอัพ What's New หลังจากอัปเดต",
"font.option.ibmPlexMono": "IBM Plex Mono",
"font.option.cascadiaCode": "Cascadia Code",
"font.option.firaCode": "Fira Code",
"font.option.hack": "Hack",
"font.option.inconsolata": "Inconsolata",
"font.option.intelOneMono": "Intel One Mono",
"font.option.iosevka": "Iosevka",
"font.option.jetbrainsMono": "JetBrains Mono",
"font.option.mesloLgs": "Meslo LGS",
"font.option.robotoMono": "Roboto Mono",
"font.option.sourceCodePro": "Source Code Pro",
"font.option.ubuntuMono": "Ubuntu Mono",
"sound.option.alert01": "เสียงเตือน 01",
"sound.option.alert02": "เสียงเตือน 02",
"sound.option.alert03": "เสียงเตือน 03",
"sound.option.alert04": "เสียงเตือน 04",
"sound.option.alert05": "เสียงเตือน 05",
"sound.option.alert06": "เสียงเตือน 06",
"sound.option.alert07": "เสียงเตือน 07",
"sound.option.alert08": "เสียงเตือน 08",
"sound.option.alert09": "เสียงเตือน 09",
"sound.option.alert10": "เสียงเตือน 10",
"sound.option.bipbop01": "Bip-bop 01",
"sound.option.bipbop02": "Bip-bop 02",
"sound.option.bipbop03": "Bip-bop 03",
"sound.option.bipbop04": "Bip-bop 04",
"sound.option.bipbop05": "Bip-bop 05",
"sound.option.bipbop06": "Bip-bop 06",
"sound.option.bipbop07": "Bip-bop 07",
"sound.option.bipbop08": "Bip-bop 08",
"sound.option.bipbop09": "Bip-bop 09",
"sound.option.bipbop10": "Bip-bop 10",
"sound.option.staplebops01": "Staplebops 01",
"sound.option.staplebops02": "Staplebops 02",
"sound.option.staplebops03": "Staplebops 03",
"sound.option.staplebops04": "Staplebops 04",
"sound.option.staplebops05": "Staplebops 05",
"sound.option.staplebops06": "Staplebops 06",
"sound.option.staplebops07": "Staplebops 07",
"sound.option.nope01": "Nope 01",
"sound.option.nope02": "Nope 02",
"sound.option.nope03": "Nope 03",
"sound.option.nope04": "Nope 04",
"sound.option.nope05": "Nope 05",
"sound.option.nope06": "Nope 06",
"sound.option.nope07": "Nope 07",
"sound.option.nope08": "Nope 08",
"sound.option.nope09": "Nope 09",
"sound.option.nope10": "Nope 10",
"sound.option.nope11": "Nope 11",
"sound.option.nope12": "Nope 12",
"sound.option.yup01": "Yup 01",
"sound.option.yup02": "Yup 02",
"sound.option.yup03": "Yup 03",
"sound.option.yup04": "Yup 04",
"sound.option.yup05": "Yup 05",
"sound.option.yup06": "Yup 06",
"settings.general.notifications.agent.title": "เอเจนต์",
"settings.general.notifications.agent.description": "แสดงการแจ้งเตือนระบบเมื่อเอเจนต์เสร็จสิ้นหรือต้องการความสนใจ",
"settings.general.notifications.permissions.title": "สิทธิ์",
"settings.general.notifications.permissions.description": "แสดงการแจ้งเตือนระบบเมื่อต้องการสิทธิ์",
"settings.general.notifications.errors.title": "ข้อผิดพลาด",
"settings.general.notifications.errors.description": "แสดงการแจ้งเตือนระบบเมื่อเกิดข้อผิดพลาด",
"settings.general.sounds.agent.title": "เอเจนต์",
"settings.general.sounds.agent.description": "เล่นเสียงเมื่อเอเจนต์เสร็จสิ้นหรือต้องการความสนใจ",
"settings.general.sounds.permissions.title": "สิทธิ์",
"settings.general.sounds.permissions.description": "เล่นเสียงเมื่อต้องการสิทธิ์",
"settings.general.sounds.errors.title": "ข้อผิดพลาด",
"settings.general.sounds.errors.description": "เล่นเสียงเมื่อเกิดข้อผิดพลาด",
"settings.shortcuts.title": "ทางลัดแป้นพิมพ์",
"settings.shortcuts.reset.button": "รีเซ็ตเป็นค่าเริ่มต้น",
"settings.shortcuts.reset.toast.title": "รีเซ็ตทางลัดแล้ว",
"settings.shortcuts.reset.toast.description": "รีเซ็ตทางลัดแป้นพิมพ์เป็นค่าเริ่มต้นแล้ว",
"settings.shortcuts.conflict.title": "ทางลัดใช้งานอยู่แล้ว",
"settings.shortcuts.conflict.description": "{{keybind}} ถูกกำหนดให้กับ {{titles}} แล้ว",
"settings.shortcuts.unassigned": "ไม่ได้กำหนด",
"settings.shortcuts.pressKeys": "กดปุ่ม",
"settings.shortcuts.search.placeholder": "ค้นหาทางลัด",
"settings.shortcuts.search.empty": "ไม่พบทางลัด",
"settings.shortcuts.group.general": "ทั่วไป",
"settings.shortcuts.group.session": "เซสชัน",
"settings.shortcuts.group.navigation": "การนำทาง",
"settings.shortcuts.group.modelAndAgent": "โมเดลและเอเจนต์",
"settings.shortcuts.group.terminal": "เทอร์มินัล",
"settings.shortcuts.group.prompt": "พร้อมท์",
"settings.providers.title": "ผู้ให้บริการ",
"settings.providers.description": "การตั้งค่าผู้ให้บริการจะสามารถกำหนดค่าได้ที่นี่",
"settings.providers.section.connected": "ผู้ให้บริการที่เชื่อมต่อ",
"settings.providers.connected.empty": "ไม่มีผู้ให้บริการที่เชื่อมต่อ",
"settings.providers.section.popular": "ผู้ให้บริการยอดนิยม",
"settings.providers.tag.environment": "สภาพแวดล้อม",
"settings.providers.tag.config": "กำหนดค่า",
"settings.providers.tag.custom": "กำหนดเอง",
"settings.providers.tag.other": "อื่น ๆ",
"settings.models.title": "โมเดล",
"settings.models.description": "การตั้งค่าโมเดลจะสามารถกำหนดค่าได้ที่นี่",
"settings.agents.title": "เอเจนต์",
"settings.agents.description": "การตั้งค่าเอเจนต์จะสามารถกำหนดค่าได้ที่นี่",
"settings.commands.title": "คำสั่ง",
"settings.commands.description": "การตั้งค่าคำสั่งจะสามารถกำหนดค่าได้ที่นี่",
"settings.mcp.title": "MCP",
"settings.mcp.description": "การตั้งค่า MCP จะสามารถกำหนดค่าได้ที่นี่",
"settings.permissions.title": "สิทธิ์",
"settings.permissions.description": "ควบคุมเครื่องมือที่เซิร์ฟเวอร์สามารถใช้โดยค่าเริ่มต้น",
"settings.permissions.section.tools": "เครื่องมือ",
"settings.permissions.toast.updateFailed.title": "ไม่สามารถอัปเดตสิทธิ์",
"settings.permissions.action.allow": "อนุญาต",
"settings.permissions.action.ask": "ถาม",
"settings.permissions.action.deny": "ปฏิเสธ",
"settings.permissions.tool.read.title": "อ่าน",
"settings.permissions.tool.read.description": "อ่านไฟล์ (ตรงกับเส้นทางไฟล์)",
"settings.permissions.tool.edit.title": "แก้ไข",
"settings.permissions.tool.edit.description": "แก้ไขไฟล์ รวมถึงการแก้ไข เขียน แพตช์ และแก้ไขหลายรายการ",
"settings.permissions.tool.glob.title": "Glob",
"settings.permissions.tool.glob.description": "จับคู่ไฟล์โดยใช้รูปแบบ glob",
"settings.permissions.tool.grep.title": "Grep",
"settings.permissions.tool.grep.description": "ค้นหาเนื้อหาไฟล์โดยใช้นิพจน์ทั่วไป",
"settings.permissions.tool.list.title": "รายการ",
"settings.permissions.tool.list.description": "แสดงรายการไฟล์ภายในไดเรกทอรี",
"settings.permissions.tool.bash.title": "Bash",
"settings.permissions.tool.bash.description": "เรียกใช้คำสั่งเชลล์",
"settings.permissions.tool.task.title": "งาน",
"settings.permissions.tool.task.description": "เปิดเอเจนต์ย่อย",
"settings.permissions.tool.skill.title": "ทักษะ",
"settings.permissions.tool.skill.description": "โหลดทักษะตามชื่อ",
"settings.permissions.tool.lsp.title": "LSP",
"settings.permissions.tool.lsp.description": "เรียกใช้การสืบค้นเซิร์ฟเวอร์ภาษา",
"settings.permissions.tool.todoread.title": "อ่านรายการงาน",
"settings.permissions.tool.todoread.description": "อ่านรายการงาน",
"settings.permissions.tool.todowrite.title": "เขียนรายการงาน",
"settings.permissions.tool.todowrite.description": "อัปเดตรายการงาน",
"settings.permissions.tool.webfetch.title": "ดึงข้อมูลจากเว็บ",
"settings.permissions.tool.webfetch.description": "ดึงเนื้อหาจาก URL",
"settings.permissions.tool.websearch.title": "ค้นหาเว็บ",
"settings.permissions.tool.websearch.description": "ค้นหาบนเว็บ",
"settings.permissions.tool.codesearch.title": "ค้นหาโค้ด",
"settings.permissions.tool.codesearch.description": "ค้นหาโค้ดบนเว็บ",
"settings.permissions.tool.external_directory.title": "ไดเรกทอรีภายนอก",
"settings.permissions.tool.external_directory.description": "เข้าถึงไฟล์นอกไดเรกทอรีโปรเจกต์",
"settings.permissions.tool.doom_loop.title": "Doom Loop",
"settings.permissions.tool.doom_loop.description": "ตรวจจับการเรียกเครื่องมือซ้ำด้วยข้อมูลนำเข้าเหมือนกัน",
"session.delete.failed.title": "ไม่สามารถลบเซสชัน",
"session.delete.title": "ลบเซสชัน",
"session.delete.confirm": 'ลบเซสชัน "{{name}}" หรือไม่?',
"session.delete.button": "ลบเซสชัน",
"workspace.new": "พื้นที่ทำงานใหม่",
"workspace.type.local": "ในเครื่อง",
"workspace.type.sandbox": "แซนด์บ็อกซ์",
"workspace.create.failed.title": "ไม่สามารถสร้างพื้นที่ทำงาน",
"workspace.delete.failed.title": "ไม่สามารถลบพื้นที่ทำงาน",
"workspace.resetting.title": "กำลังรีเซ็ตพื้นที่ทำงาน",
"workspace.resetting.description": "อาจใช้เวลาประมาณหนึ่งนาที",
"workspace.reset.failed.title": "ไม่สามารถรีเซ็ตพื้นที่ทำงาน",
"workspace.reset.success.title": "รีเซ็ตพื้นที่ทำงานแล้ว",
"workspace.reset.success.description": "พื้นที่ทำงานตรงกับสาขาเริ่มต้นแล้ว",
"workspace.error.stillPreparing": "พื้นที่ทำงานกำลังเตรียมอยู่",
"workspace.status.checking": "กำลังตรวจสอบการเปลี่ยนแปลงที่ไม่ได้ผสาน...",
"workspace.status.error": "ไม่สามารถตรวจสอบสถานะ git",
"workspace.status.clean": "ไม่ตรวจพบการเปลี่ยนแปลงที่ไม่ได้ผสาน",
"workspace.status.dirty": "ตรวจพบการเปลี่ยนแปลงที่ไม่ได้ผสานในพื้นที่ทำงานนี้",
"workspace.delete.title": "ลบพื้นที่ทำงาน",
"workspace.delete.confirm": 'ลบพื้นที่ทำงาน "{{name}}" หรือไม่?',
"workspace.delete.button": "ลบพื้นที่ทำงาน",
"workspace.reset.title": "รีเซ็ตพื้นที่ทำงาน",
"workspace.reset.confirm": 'รีเซ็ตพื้นที่ทำงาน "{{name}}" หรือไม่?',
"workspace.reset.button": "รีเซ็ตพื้นที่ทำงาน",
"workspace.reset.archived.none": "ไม่มีเซสชันที่ใช้งานอยู่จะถูกจัดเก็บ",
"workspace.reset.archived.one": "1 เซสชันจะถูกจัดเก็บ",
"workspace.reset.archived.many": "{{count}} เซสชันจะถูกจัดเก็บ",
"workspace.reset.note": "สิ่งนี้จะรีเซ็ตพื้นที่ทำงานให้ตรงกับสาขาเริ่มต้น",
}
+154 -26
View File
@@ -12,6 +12,7 @@ export const dict = {
"command.category.theme": "主题", "command.category.theme": "主题",
"command.category.language": "语言", "command.category.language": "语言",
"command.category.file": "文件", "command.category.file": "文件",
"command.category.context": "上下文",
"command.category.terminal": "终端", "command.category.terminal": "终端",
"command.category.model": "模型", "command.category.model": "模型",
"command.category.mcp": "MCP", "command.category.mcp": "MCP",
@@ -19,6 +20,7 @@ export const dict = {
"command.category.permissions": "权限", "command.category.permissions": "权限",
"command.category.workspace": "工作区", "command.category.workspace": "工作区",
"command.category.settings": "设置",
"theme.scheme.system": "系统", "theme.scheme.system": "系统",
"theme.scheme.light": "浅色", "theme.scheme.light": "浅色",
"theme.scheme.dark": "深色", "theme.scheme.dark": "深色",
@@ -27,6 +29,7 @@ export const dict = {
"command.project.open": "打开项目", "command.project.open": "打开项目",
"command.provider.connect": "连接提供商", "command.provider.connect": "连接提供商",
"command.server.switch": "切换服务器", "command.server.switch": "切换服务器",
"command.settings.open": "打开设置",
"command.session.previous": "上一个会话", "command.session.previous": "上一个会话",
"command.session.next": "下一个会话", "command.session.next": "下一个会话",
"command.session.archive": "归档会话", "command.session.archive": "归档会话",
@@ -34,17 +37,20 @@ export const dict = {
"command.palette": "命令面板", "command.palette": "命令面板",
"command.theme.cycle": "切换主题", "command.theme.cycle": "切换主题",
"command.theme.set": "使用主题: {{theme}}", "command.theme.set": "使用主题{{theme}}",
"command.theme.scheme.cycle": "切换配色方案", "command.theme.scheme.cycle": "切换配色方案",
"command.theme.scheme.set": "使用配色方案: {{scheme}}", "command.theme.scheme.set": "使用配色方案{{scheme}}",
"command.language.cycle": "切换语言", "command.language.cycle": "切换语言",
"command.language.set": "使用语言: {{language}}", "command.language.set": "使用语言{{language}}",
"command.session.new": "新建会话", "command.session.new": "新建会话",
"command.file.open": "打开文件", "command.file.open": "打开文件",
"command.file.open.description": "搜索文件和命令", "command.file.open.description": "搜索文件和命令",
"command.context.addSelection": "将所选内容添加到上下文",
"command.context.addSelection.description": "添加当前文件中选中的行",
"command.terminal.toggle": "切换终端", "command.terminal.toggle": "切换终端",
"command.fileTree.toggle": "切换文件树",
"command.review.toggle": "切换审查", "command.review.toggle": "切换审查",
"command.terminal.new": "新建终端", "command.terminal.new": "新建终端",
"command.terminal.new.description": "创建新的终端标签页", "command.terminal.new.description": "创建新的终端标签页",
@@ -92,6 +98,10 @@ export const dict = {
"dialog.provider.anthropic.note": "使用 Claude Pro/Max 或 API 密钥连接", "dialog.provider.anthropic.note": "使用 Claude Pro/Max 或 API 密钥连接",
"dialog.provider.openai.note": "使用 ChatGPT Pro/Plus 或 API 密钥连接", "dialog.provider.openai.note": "使用 ChatGPT Pro/Plus 或 API 密钥连接",
"dialog.provider.copilot.note": "使用 Copilot 或 API 密钥连接", "dialog.provider.copilot.note": "使用 Copilot 或 API 密钥连接",
"dialog.provider.opencode.note": "使用 OpenCode Zen 或 API 密钥连接",
"dialog.provider.google.note": "使用 Google 账号或 API 密钥连接",
"dialog.provider.openrouter.note": "使用 OpenRouter 账号或 API 密钥连接",
"dialog.provider.vercel.note": "使用 Vercel 账号或 API 密钥连接",
"dialog.model.select.title": "选择模型", "dialog.model.select.title": "选择模型",
"dialog.model.search.placeholder": "搜索模型", "dialog.model.search.placeholder": "搜索模型",
@@ -110,7 +120,7 @@ export const dict = {
"provider.connect.method.apiKey": "API 密钥", "provider.connect.method.apiKey": "API 密钥",
"provider.connect.status.inProgress": "正在授权...", "provider.connect.status.inProgress": "正在授权...",
"provider.connect.status.waiting": "等待授权...", "provider.connect.status.waiting": "等待授权...",
"provider.connect.status.failed": "授权失败: {{error}}", "provider.connect.status.failed": "授权失败{{error}}",
"provider.connect.apiKey.description": "provider.connect.apiKey.description":
"输入你的 {{provider}} API 密钥以连接帐户,并在 OpenCode 中使用 {{provider}} 模型。", "输入你的 {{provider}} API 密钥以连接帐户,并在 OpenCode 中使用 {{provider}} 模型。",
"provider.connect.apiKey.label": "{{provider}} API 密钥", "provider.connect.apiKey.label": "{{provider}} API 密钥",
@@ -119,6 +129,7 @@ export const dict = {
"provider.connect.opencodeZen.line1": "OpenCode Zen 为你提供一组精选的可靠优化模型,用于代码智能体。", "provider.connect.opencodeZen.line1": "OpenCode Zen 为你提供一组精选的可靠优化模型,用于代码智能体。",
"provider.connect.opencodeZen.line2": "只需一个 API 密钥,你就能使用 Claude、GPT、Gemini、GLM 等模型。", "provider.connect.opencodeZen.line2": "只需一个 API 密钥,你就能使用 Claude、GPT、Gemini、GLM 等模型。",
"provider.connect.opencodeZen.visit.prefix": "访问 ", "provider.connect.opencodeZen.visit.prefix": "访问 ",
"provider.connect.opencodeZen.visit.link": "opencode.ai/zen",
"provider.connect.opencodeZen.visit.suffix": " 获取你的 API 密钥。", "provider.connect.opencodeZen.visit.suffix": " 获取你的 API 密钥。",
"provider.connect.oauth.code.visit.prefix": "访问 ", "provider.connect.oauth.code.visit.prefix": "访问 ",
"provider.connect.oauth.code.visit.link": "此链接", "provider.connect.oauth.code.visit.link": "此链接",
@@ -134,13 +145,32 @@ export const dict = {
"provider.connect.toast.connected.title": "{{provider}} 已连接", "provider.connect.toast.connected.title": "{{provider}} 已连接",
"provider.connect.toast.connected.description": "现在可以使用 {{provider}} 模型了。", "provider.connect.toast.connected.description": "现在可以使用 {{provider}} 模型了。",
"provider.disconnect.toast.disconnected.title": "{{provider}} 已断开连接",
"provider.disconnect.toast.disconnected.description": "{{provider}} 模型已不再可用。",
"model.tag.free": "免费", "model.tag.free": "免费",
"model.tag.latest": "最新", "model.tag.latest": "最新",
"model.provider.anthropic": "Anthropic",
"model.provider.openai": "OpenAI",
"model.provider.google": "Google",
"model.provider.xai": "xAI",
"model.provider.meta": "Meta",
"model.input.text": "文本",
"model.input.image": "图像",
"model.input.audio": "音频",
"model.input.video": "视频",
"model.input.pdf": "pdf",
"model.tooltip.allows": "支持:{{inputs}}",
"model.tooltip.reasoning.allowed": "支持推理",
"model.tooltip.reasoning.none": "不支持推理",
"model.tooltip.context": "上下文上限 {{limit}}",
"common.search.placeholder": "搜索", "common.search.placeholder": "搜索",
"common.goBack": "返回", "common.goBack": "返回",
"common.loading": "加载中", "common.loading": "加载中",
"common.loading.ellipsis": "...",
"common.cancel": "取消", "common.cancel": "取消",
"common.connect": "连接",
"common.disconnect": "断开连接",
"common.submit": "提交", "common.submit": "提交",
"common.save": "保存", "common.save": "保存",
"common.saving": "保存中...", "common.saving": "保存中...",
@@ -149,34 +179,36 @@ export const dict = {
"prompt.placeholder.shell": "输入 shell 命令...", "prompt.placeholder.shell": "输入 shell 命令...",
"prompt.placeholder.normal": '随便问点什么... "{{example}}"', "prompt.placeholder.normal": '随便问点什么... "{{example}}"',
"prompt.placeholder.summarizeComments": "总结评论…",
"prompt.placeholder.summarizeComment": "总结该评论…",
"prompt.mode.shell": "Shell", "prompt.mode.shell": "Shell",
"prompt.mode.shell.exit": "按 esc 退出", "prompt.mode.shell.exit": "按 esc 退出",
"prompt.example.1": "修复代码库中的一个 TODO", "prompt.example.1": "修复代码库中的一个 TODO",
"prompt.example.2": "这个项目的技术栈是什么?", "prompt.example.2": "这个项目的技术栈是什么",
"prompt.example.3": "修复失败的测试", "prompt.example.3": "修复失败的测试",
"prompt.example.4": "解释认证是如何工作的", "prompt.example.4": "解释认证是如何工作的",
"prompt.example.5": "查找并修复安全漏洞", "prompt.example.5": "查找并修复安全漏洞",
"prompt.example.6": "为用户服务添加单元测试", "prompt.example.6": "为用户服务添加单元测试",
"prompt.example.7": "重构这个函数,让它更易读", "prompt.example.7": "重构这个函数,让它更易读",
"prompt.example.8": "这个错误是什么意思?", "prompt.example.8": "这个错误是什么意思",
"prompt.example.9": "帮我调试这个问题", "prompt.example.9": "帮我调试这个问题",
"prompt.example.10": "生成 API 文档", "prompt.example.10": "生成 API 文档",
"prompt.example.11": "优化数据库查询", "prompt.example.11": "优化数据库查询",
"prompt.example.12": "添加输入校验", "prompt.example.12": "添加输入校验",
"prompt.example.13": "创建一个新的组件用于...", "prompt.example.13": "创建一个新的组件用于...",
"prompt.example.14": "我该如何部署这个项目?", "prompt.example.14": "我该如何部署这个项目",
"prompt.example.15": "审查我的代码并给出最佳实践建议", "prompt.example.15": "审查我的代码并给出最佳实践建议",
"prompt.example.16": "为这个函数添加错误处理", "prompt.example.16": "为这个函数添加错误处理",
"prompt.example.17": "解释这个正则表达式", "prompt.example.17": "解释这个正则表达式",
"prompt.example.18": "把它转换成 TypeScript", "prompt.example.18": "把它转换成 TypeScript",
"prompt.example.19": "在整个代码库中添加日志", "prompt.example.19": "在整个代码库中添加日志",
"prompt.example.20": "哪些依赖已经过期?", "prompt.example.20": "哪些依赖已经过期",
"prompt.example.21": "帮我写一个迁移脚本", "prompt.example.21": "帮我写一个迁移脚本",
"prompt.example.22": "为这个接口实现缓存", "prompt.example.22": "为这个接口实现缓存",
"prompt.example.23": "给这个列表添加分页", "prompt.example.23": "给这个列表添加分页",
"prompt.example.24": "创建一个 CLI 命令用于...", "prompt.example.24": "创建一个 CLI 命令用于...",
"prompt.example.25": "这里的环境变量是怎么工作的?", "prompt.example.25": "这里的环境变量是怎么工作的",
"prompt.popover.emptyResults": "没有匹配的结果", "prompt.popover.emptyResults": "没有匹配的结果",
"prompt.popover.emptyCommands": "没有匹配的命令", "prompt.popover.emptyCommands": "没有匹配的命令",
@@ -251,6 +283,9 @@ export const dict = {
"dialog.project.edit.color": "颜色", "dialog.project.edit.color": "颜色",
"dialog.project.edit.color.select": "选择{{color}}颜色", "dialog.project.edit.color.select": "选择{{color}}颜色",
"dialog.project.edit.worktree.startup": "工作区启动脚本",
"dialog.project.edit.worktree.startup.description": "在创建新的工作区 (worktree) 后运行。",
"dialog.project.edit.worktree.startup.placeholder": "例如 bun install",
"context.breakdown.title": "上下文拆分", "context.breakdown.title": "上下文拆分",
"context.breakdown.note": "输入 token 的大致拆分。“其他”包含工具定义和开销。", "context.breakdown.note": "输入 token 的大致拆分。“其他”包含工具定义和开销。",
"context.breakdown.system": "系统", "context.breakdown.system": "系统",
@@ -299,6 +334,7 @@ export const dict = {
"language.ar": "العربية", "language.ar": "العربية",
"language.no": "Norsk", "language.no": "Norsk",
"language.br": "Português (Brasil)", "language.br": "Português (Brasil)",
"language.th": "ไทย",
"toast.language.title": "语言", "toast.language.title": "语言",
"toast.language.description": "已切换到{{language}}", "toast.language.description": "已切换到{{language}}",
@@ -316,6 +352,9 @@ export const dict = {
"toast.file.loadFailed.title": "加载文件失败", "toast.file.loadFailed.title": "加载文件失败",
"toast.file.listFailed.title": "列出文件失败",
"toast.context.noLineSelection.title": "未选择行",
"toast.context.noLineSelection.description": "请先在文件标签中选择行范围。",
"toast.session.share.copyFailed.title": "无法复制链接到剪贴板", "toast.session.share.copyFailed.title": "无法复制链接到剪贴板",
"toast.session.share.success.title": "会话已分享", "toast.session.share.success.title": "会话已分享",
"toast.session.share.success.description": "分享链接已复制到剪贴板", "toast.session.share.success.description": "分享链接已复制到剪贴板",
@@ -343,31 +382,31 @@ export const dict = {
"error.page.action.updateTo": "更新到 {{version}}", "error.page.action.updateTo": "更新到 {{version}}",
"error.page.report.prefix": "请将此错误报告给 OpenCode 团队", "error.page.report.prefix": "请将此错误报告给 OpenCode 团队",
"error.page.report.discord": "在 Discord 上", "error.page.report.discord": "在 Discord 上",
"error.page.version": "版本: {{version}}", "error.page.version": "版本{{version}}",
"error.dev.rootNotFound": "未找到根元素。你是不是忘了把它添加到 index.html? 或者 id 属性拼写错了?", "error.dev.rootNotFound": "未找到根元素。你是不是忘了把它添加到 index.html或者 id 属性拼写错了",
"error.globalSync.connectFailed": "无法连接到服务器。是否有服务器正在 `{{url}}` 运行?", "error.globalSync.connectFailed": "无法连接到服务器。是否有服务器正在 `{{url}}` 运行",
"error.chain.unknown": "未知错误", "error.chain.unknown": "未知错误",
"error.chain.causedBy": "原因:", "error.chain.causedBy": "原因",
"error.chain.apiError": "API 错误", "error.chain.apiError": "API 错误",
"error.chain.status": "状态: {{status}}", "error.chain.status": "状态{{status}}",
"error.chain.retryable": "可重试: {{retryable}}", "error.chain.retryable": "可重试{{retryable}}",
"error.chain.responseBody": "响应内容:\n{{body}}", "error.chain.responseBody": "响应内容\n{{body}}",
"error.chain.didYouMean": "你是不是想输入: {{suggestions}}", "error.chain.didYouMean": "你是不是想输入{{suggestions}}",
"error.chain.modelNotFound": "未找到模型: {{provider}}/{{model}}", "error.chain.modelNotFound": "未找到模型{{provider}}/{{model}}",
"error.chain.checkConfig": "请检查你的配置 (opencode.json) 中的 provider/model 名称", "error.chain.checkConfig": "请检查你的配置 (opencode.json) 中的 provider/model 名称",
"error.chain.mcpFailed": 'MCP 服务器 "{{name}}" 启动失败。注意: OpenCode 暂不支持 MCP 认证。', "error.chain.mcpFailed": 'MCP 服务器 "{{name}}" 启动失败。注意: OpenCode 暂不支持 MCP 认证。',
"error.chain.providerAuthFailed": "提供商认证失败 ({{provider}}): {{message}}", "error.chain.providerAuthFailed": "提供商认证失败{{provider}}):{{message}}",
"error.chain.providerInitFailed": '无法初始化提供商 "{{provider}}"。请检查凭据和配置。', "error.chain.providerInitFailed": '无法初始化提供商 "{{provider}}"。请检查凭据和配置。',
"error.chain.configJsonInvalid": "配置文件 {{path}} 不是有效的 JSON(C)", "error.chain.configJsonInvalid": "配置文件 {{path}} 不是有效的 JSON(C)",
"error.chain.configJsonInvalidWithMessage": "配置文件 {{path}} 不是有效的 JSON(C): {{message}}", "error.chain.configJsonInvalidWithMessage": "配置文件 {{path}} 不是有效的 JSON(C){{message}}",
"error.chain.configDirectoryTypo": "error.chain.configDirectoryTypo":
'{{path}} 中的目录 "{{dir}}" 无效。请将目录重命名为 "{{suggestion}}" 或移除它。这是一个常见拼写错误。', '{{path}} 中的目录 "{{dir}}" 无效。请将目录重命名为 "{{suggestion}}" 或移除它。这是一个常见拼写错误。',
"error.chain.configFrontmatterError": "无法解析 {{path}} 中的 frontmatter:\n{{message}}", "error.chain.configFrontmatterError": "无法解析 {{path}} 中的 frontmatter\n{{message}}",
"error.chain.configInvalid": "配置文件 {{path}} 无效", "error.chain.configInvalid": "配置文件 {{path}} 无效",
"error.chain.configInvalidWithMessage": "配置文件 {{path}} 无效: {{message}}", "error.chain.configInvalidWithMessage": "配置文件 {{path}} 无效{{message}}",
"notification.permission.title": "需要权限", "notification.permission.title": "需要权限",
"notification.permission.description": "{{sessionTitle}}{{projectName}})需要权限", "notification.permission.description": "{{sessionTitle}}{{projectName}})需要权限",
@@ -388,17 +427,23 @@ export const dict = {
"session.tab.context": "上下文", "session.tab.context": "上下文",
"session.panel.reviewAndFiles": "审查和文件", "session.panel.reviewAndFiles": "审查和文件",
"session.review.filesChanged": "{{count}} 个文件变更", "session.review.filesChanged": "{{count}} 个文件变更",
"session.review.change.one": "更改",
"session.review.change.other": "更改",
"session.review.loadingChanges": "正在加载更改...", "session.review.loadingChanges": "正在加载更改...",
"session.review.empty": "此会话暂无更改", "session.review.empty": "此会话暂无更改",
"session.review.noChanges": "无更改",
"session.files.selectToOpen": "选择要打开的文件",
"session.files.all": "所有文件",
"session.messages.renderEarlier": "显示更早的消息", "session.messages.renderEarlier": "显示更早的消息",
"session.messages.loadingEarlier": "正在加载更早的消息...", "session.messages.loadingEarlier": "正在加载更早的消息...",
"session.messages.loadEarlier": "加载更早的消息", "session.messages.loadEarlier": "加载更早的消息",
"session.messages.loading": "正在加载消息...", "session.messages.loading": "正在加载消息...",
"session.messages.jumpToLatest": "跳转到最新",
"session.context.addToContext": "将 {{selection}} 添加到上下文", "session.context.addToContext": "将 {{selection}} 添加到上下文",
"session.new.worktree.main": "主分支", "session.new.worktree.main": "主分支",
"session.new.worktree.mainWithBranch": "主分支 ({{branch}})", "session.new.worktree.mainWithBranch": "主分支{{branch}}",
"session.new.worktree.create": "创建新的 worktree", "session.new.worktree.create": "创建新的 worktree",
"session.new.lastModified": "最后修改", "session.new.lastModified": "最后修改",
@@ -434,6 +479,8 @@ export const dict = {
"terminal.title.numbered": "终端 {{number}}", "terminal.title.numbered": "终端 {{number}}",
"terminal.close": "关闭终端", "terminal.close": "关闭终端",
"terminal.connectionLost.title": "连接已丢失",
"terminal.connectionLost.description": "终端连接已中断。这可能发生在服务器重启时。",
"common.closeTab": "关闭标签页", "common.closeTab": "关闭标签页",
"common.dismiss": "忽略", "common.dismiss": "忽略",
"common.requestFailed": "请求失败", "common.requestFailed": "请求失败",
@@ -447,6 +494,8 @@ export const dict = {
"common.edit": "编辑", "common.edit": "编辑",
"common.loadMore": "加载更多", "common.loadMore": "加载更多",
"common.key.esc": "ESC",
"sidebar.menu.toggle": "切换菜单",
"sidebar.nav.projectsAndSessions": "项目和会话", "sidebar.nav.projectsAndSessions": "项目和会话",
"sidebar.settings": "设置", "sidebar.settings": "设置",
"sidebar.help": "帮助", "sidebar.help": "帮助",
@@ -458,12 +507,15 @@ export const dict = {
"sidebar.project.recentSessions": "最近会话", "sidebar.project.recentSessions": "最近会话",
"sidebar.project.viewAllSessions": "查看全部会话", "sidebar.project.viewAllSessions": "查看全部会话",
"app.name.desktop": "OpenCode Desktop",
"settings.section.desktop": "桌面", "settings.section.desktop": "桌面",
"settings.section.server": "服务器",
"settings.tab.general": "通用", "settings.tab.general": "通用",
"settings.tab.shortcuts": "快捷键", "settings.tab.shortcuts": "快捷键",
"settings.general.section.appearance": "外观", "settings.general.section.appearance": "外观",
"settings.general.section.notifications": "系统通知", "settings.general.section.notifications": "系统通知",
"settings.general.section.updates": "更新",
"settings.general.section.sounds": "音效", "settings.general.section.sounds": "音效",
"settings.general.row.language.title": "语言", "settings.general.row.language.title": "语言",
@@ -474,7 +526,75 @@ export const dict = {
"settings.general.row.theme.description": "自定义 OpenCode 的主题。", "settings.general.row.theme.description": "自定义 OpenCode 的主题。",
"settings.general.row.font.title": "字体", "settings.general.row.font.title": "字体",
"settings.general.row.font.description": "自定义代码块使用的等宽字体", "settings.general.row.font.description": "自定义代码块使用的等宽字体",
"settings.general.row.releaseNotes.title": "发行说明",
"settings.general.row.releaseNotes.description": "更新后显示“新功能”弹窗",
"settings.updates.row.startup.title": "启动时检查更新",
"settings.updates.row.startup.description": "在 OpenCode 启动时自动检查更新",
"settings.updates.row.check.title": "检查更新",
"settings.updates.row.check.description": "手动检查更新并在有更新时安装",
"settings.updates.action.checkNow": "立即检查",
"settings.updates.action.checking": "正在检查...",
"settings.updates.toast.latest.title": "已是最新版本",
"settings.updates.toast.latest.description": "你正在使用最新版本的 OpenCode。",
"font.option.ibmPlexMono": "IBM Plex Mono",
"font.option.cascadiaCode": "Cascadia Code",
"font.option.firaCode": "Fira Code",
"font.option.hack": "Hack",
"font.option.inconsolata": "Inconsolata",
"font.option.intelOneMono": "Intel One Mono",
"font.option.iosevka": "Iosevka",
"font.option.jetbrainsMono": "JetBrains Mono",
"font.option.mesloLgs": "Meslo LGS",
"font.option.robotoMono": "Roboto Mono",
"font.option.sourceCodePro": "Source Code Pro",
"font.option.ubuntuMono": "Ubuntu Mono",
"sound.option.alert01": "警报 01",
"sound.option.alert02": "警报 02",
"sound.option.alert03": "警报 03",
"sound.option.alert04": "警报 04",
"sound.option.alert05": "警报 05",
"sound.option.alert06": "警报 06",
"sound.option.alert07": "警报 07",
"sound.option.alert08": "警报 08",
"sound.option.alert09": "警报 09",
"sound.option.alert10": "警报 10",
"sound.option.bipbop01": "哔啵 01",
"sound.option.bipbop02": "哔啵 02",
"sound.option.bipbop03": "哔啵 03",
"sound.option.bipbop04": "哔啵 04",
"sound.option.bipbop05": "哔啵 05",
"sound.option.bipbop06": "哔啵 06",
"sound.option.bipbop07": "哔啵 07",
"sound.option.bipbop08": "哔啵 08",
"sound.option.bipbop09": "哔啵 09",
"sound.option.bipbop10": "哔啵 10",
"sound.option.staplebops01": "斯泰普博普斯 01",
"sound.option.staplebops02": "斯泰普博普斯 02",
"sound.option.staplebops03": "斯泰普博普斯 03",
"sound.option.staplebops04": "斯泰普博普斯 04",
"sound.option.staplebops05": "斯泰普博普斯 05",
"sound.option.staplebops06": "斯泰普博普斯 06",
"sound.option.staplebops07": "斯泰普博普斯 07",
"sound.option.nope01": "否 01",
"sound.option.nope02": "否 02",
"sound.option.nope03": "否 03",
"sound.option.nope04": "否 04",
"sound.option.nope05": "否 05",
"sound.option.nope06": "否 06",
"sound.option.nope07": "否 07",
"sound.option.nope08": "否 08",
"sound.option.nope09": "否 09",
"sound.option.nope10": "否 10",
"sound.option.nope11": "否 11",
"sound.option.nope12": "否 12",
"sound.option.yup01": "是 01",
"sound.option.yup02": "是 02",
"sound.option.yup03": "是 03",
"sound.option.yup04": "是 04",
"sound.option.yup05": "是 05",
"sound.option.yup06": "是 06",
"settings.general.notifications.agent.title": "智能体", "settings.general.notifications.agent.title": "智能体",
"settings.general.notifications.agent.description": "当智能体完成或需要注意时显示系统通知", "settings.general.notifications.agent.description": "当智能体完成或需要注意时显示系统通知",
"settings.general.notifications.permissions.title": "权限", "settings.general.notifications.permissions.title": "权限",
@@ -509,6 +629,13 @@ export const dict = {
"settings.providers.title": "提供商", "settings.providers.title": "提供商",
"settings.providers.description": "提供商设置将在此处可配置。", "settings.providers.description": "提供商设置将在此处可配置。",
"settings.providers.section.connected": "已连接的提供商",
"settings.providers.connected.empty": "没有已连接的提供商",
"settings.providers.section.popular": "热门提供商",
"settings.providers.tag.environment": "环境",
"settings.providers.tag.config": "配置",
"settings.providers.tag.custom": "自定义",
"settings.providers.tag.other": "其他",
"settings.models.title": "模型", "settings.models.title": "模型",
"settings.models.description": "模型设置将在此处可配置。", "settings.models.description": "模型设置将在此处可配置。",
"settings.agents.title": "智能体", "settings.agents.title": "智能体",
@@ -562,7 +689,7 @@ export const dict = {
"session.delete.failed.title": "删除会话失败", "session.delete.failed.title": "删除会话失败",
"session.delete.title": "删除会话", "session.delete.title": "删除会话",
"session.delete.confirm": '删除会话 "{{name}}"?', "session.delete.confirm": '删除会话 "{{name}}"',
"session.delete.button": "删除会话", "session.delete.button": "删除会话",
"workspace.new": "新建工作区", "workspace.new": "新建工作区",
@@ -575,15 +702,16 @@ export const dict = {
"workspace.reset.failed.title": "重置工作区失败", "workspace.reset.failed.title": "重置工作区失败",
"workspace.reset.success.title": "工作区已重置", "workspace.reset.success.title": "工作区已重置",
"workspace.reset.success.description": "工作区已与默认分支保持一致。", "workspace.reset.success.description": "工作区已与默认分支保持一致。",
"workspace.error.stillPreparing": "工作区仍在准备中",
"workspace.status.checking": "正在检查未合并的更改...", "workspace.status.checking": "正在检查未合并的更改...",
"workspace.status.error": "无法验证 git 状态。", "workspace.status.error": "无法验证 git 状态。",
"workspace.status.clean": "未检测到未合并的更改。", "workspace.status.clean": "未检测到未合并的更改。",
"workspace.status.dirty": "检测到未合并的更改。", "workspace.status.dirty": "检测到未合并的更改。",
"workspace.delete.title": "删除工作区", "workspace.delete.title": "删除工作区",
"workspace.delete.confirm": '删除工作区 "{{name}}"?', "workspace.delete.confirm": '删除工作区 "{{name}}"',
"workspace.delete.button": "删除工作区", "workspace.delete.button": "删除工作区",
"workspace.reset.title": "重置工作区", "workspace.reset.title": "重置工作区",
"workspace.reset.confirm": '重置工作区 "{{name}}"?', "workspace.reset.confirm": '重置工作区 "{{name}}"',
"workspace.reset.button": "重置工作区", "workspace.reset.button": "重置工作区",
"workspace.reset.archived.none": "不会归档任何活跃会话。", "workspace.reset.archived.none": "不会归档任何活跃会话。",
"workspace.reset.archived.one": "将归档 1 个会话。", "workspace.reset.archived.one": "将归档 1 个会话。",
+124
View File
@@ -12,6 +12,7 @@ export const dict = {
"command.category.theme": "主題", "command.category.theme": "主題",
"command.category.language": "語言", "command.category.language": "語言",
"command.category.file": "檔案", "command.category.file": "檔案",
"command.category.context": "上下文",
"command.category.terminal": "終端機", "command.category.terminal": "終端機",
"command.category.model": "模型", "command.category.model": "模型",
"command.category.mcp": "MCP", "command.category.mcp": "MCP",
@@ -19,6 +20,7 @@ export const dict = {
"command.category.permissions": "權限", "command.category.permissions": "權限",
"command.category.workspace": "工作區", "command.category.workspace": "工作區",
"command.category.settings": "設定",
"theme.scheme.system": "系統", "theme.scheme.system": "系統",
"theme.scheme.light": "淺色", "theme.scheme.light": "淺色",
"theme.scheme.dark": "深色", "theme.scheme.dark": "深色",
@@ -27,6 +29,7 @@ export const dict = {
"command.project.open": "開啟專案", "command.project.open": "開啟專案",
"command.provider.connect": "連接提供者", "command.provider.connect": "連接提供者",
"command.server.switch": "切換伺服器", "command.server.switch": "切換伺服器",
"command.settings.open": "開啟設定",
"command.session.previous": "上一個工作階段", "command.session.previous": "上一個工作階段",
"command.session.next": "下一個工作階段", "command.session.next": "下一個工作階段",
"command.session.archive": "封存工作階段", "command.session.archive": "封存工作階段",
@@ -44,7 +47,10 @@ export const dict = {
"command.session.new": "新增工作階段", "command.session.new": "新增工作階段",
"command.file.open": "開啟檔案", "command.file.open": "開啟檔案",
"command.file.open.description": "搜尋檔案和命令", "command.file.open.description": "搜尋檔案和命令",
"command.context.addSelection": "將選取內容加入上下文",
"command.context.addSelection.description": "加入目前檔案中選取的行",
"command.terminal.toggle": "切換終端機", "command.terminal.toggle": "切換終端機",
"command.fileTree.toggle": "切換檔案樹",
"command.review.toggle": "切換審查", "command.review.toggle": "切換審查",
"command.terminal.new": "新增終端機", "command.terminal.new": "新增終端機",
"command.terminal.new.description": "建立新的終端機標籤頁", "command.terminal.new.description": "建立新的終端機標籤頁",
@@ -136,13 +142,32 @@ export const dict = {
"provider.connect.toast.connected.title": "{{provider}} 已連線", "provider.connect.toast.connected.title": "{{provider}} 已連線",
"provider.connect.toast.connected.description": "現在可以使用 {{provider}} 模型了。", "provider.connect.toast.connected.description": "現在可以使用 {{provider}} 模型了。",
"provider.disconnect.toast.disconnected.title": "{{provider}} 已中斷連線",
"provider.disconnect.toast.disconnected.description": "{{provider}} 模型已不再可用。",
"model.tag.free": "免費", "model.tag.free": "免費",
"model.tag.latest": "最新", "model.tag.latest": "最新",
"model.provider.anthropic": "Anthropic",
"model.provider.openai": "OpenAI",
"model.provider.google": "Google",
"model.provider.xai": "xAI",
"model.provider.meta": "Meta",
"model.input.text": "文字",
"model.input.image": "圖片",
"model.input.audio": "音訊",
"model.input.video": "影片",
"model.input.pdf": "pdf",
"model.tooltip.allows": "支援: {{inputs}}",
"model.tooltip.reasoning.allowed": "支援推理",
"model.tooltip.reasoning.none": "不支援推理",
"model.tooltip.context": "上下文上限 {{limit}}",
"common.search.placeholder": "搜尋", "common.search.placeholder": "搜尋",
"common.goBack": "返回", "common.goBack": "返回",
"common.loading": "載入中", "common.loading": "載入中",
"common.loading.ellipsis": "...",
"common.cancel": "取消", "common.cancel": "取消",
"common.connect": "連線",
"common.disconnect": "中斷連線",
"common.submit": "提交", "common.submit": "提交",
"common.save": "儲存", "common.save": "儲存",
"common.saving": "儲存中...", "common.saving": "儲存中...",
@@ -151,6 +176,8 @@ export const dict = {
"prompt.placeholder.shell": "輸入 shell 命令...", "prompt.placeholder.shell": "輸入 shell 命令...",
"prompt.placeholder.normal": '隨便問點什麼... "{{example}}"', "prompt.placeholder.normal": '隨便問點什麼... "{{example}}"',
"prompt.placeholder.summarizeComments": "摘要評論…",
"prompt.placeholder.summarizeComment": "摘要這則評論…",
"prompt.mode.shell": "Shell", "prompt.mode.shell": "Shell",
"prompt.mode.shell.exit": "按 esc 退出", "prompt.mode.shell.exit": "按 esc 退出",
@@ -253,6 +280,9 @@ export const dict = {
"dialog.project.edit.color": "顏色", "dialog.project.edit.color": "顏色",
"dialog.project.edit.color.select": "選擇{{color}}顏色", "dialog.project.edit.color.select": "選擇{{color}}顏色",
"dialog.project.edit.worktree.startup": "工作區啟動腳本",
"dialog.project.edit.worktree.startup.description": "在建立新的工作區 (worktree) 後執行。",
"dialog.project.edit.worktree.startup.placeholder": "例如 bun install",
"context.breakdown.title": "上下文拆分", "context.breakdown.title": "上下文拆分",
"context.breakdown.note": "輸入 token 的大致拆分。「其他」包含工具定義和額外開銷。", "context.breakdown.note": "輸入 token 的大致拆分。「其他」包含工具定義和額外開銷。",
"context.breakdown.system": "系統", "context.breakdown.system": "系統",
@@ -301,6 +331,7 @@ export const dict = {
"language.ar": "العربية", "language.ar": "العربية",
"language.no": "Norsk", "language.no": "Norsk",
"language.br": "Português (Brasil)", "language.br": "Português (Brasil)",
"language.th": "ไทย",
"toast.language.title": "語言", "toast.language.title": "語言",
"toast.language.description": "已切換到 {{language}}", "toast.language.description": "已切換到 {{language}}",
@@ -318,6 +349,9 @@ export const dict = {
"toast.file.loadFailed.title": "載入檔案失敗", "toast.file.loadFailed.title": "載入檔案失敗",
"toast.file.listFailed.title": "列出檔案失敗",
"toast.context.noLineSelection.title": "未選取行",
"toast.context.noLineSelection.description": "請先在檔案分頁中選取行範圍。",
"toast.session.share.copyFailed.title": "無法複製連結到剪貼簿", "toast.session.share.copyFailed.title": "無法複製連結到剪貼簿",
"toast.session.share.success.title": "工作階段已分享", "toast.session.share.success.title": "工作階段已分享",
"toast.session.share.success.description": "分享連結已複製到剪貼簿", "toast.session.share.success.description": "分享連結已複製到剪貼簿",
@@ -390,13 +424,19 @@ export const dict = {
"session.tab.context": "上下文", "session.tab.context": "上下文",
"session.panel.reviewAndFiles": "審查與檔案", "session.panel.reviewAndFiles": "審查與檔案",
"session.review.filesChanged": "{{count}} 個檔案變更", "session.review.filesChanged": "{{count}} 個檔案變更",
"session.review.change.one": "變更",
"session.review.change.other": "變更",
"session.review.loadingChanges": "正在載入變更...", "session.review.loadingChanges": "正在載入變更...",
"session.review.empty": "此工作階段暫無變更", "session.review.empty": "此工作階段暫無變更",
"session.review.noChanges": "沒有變更",
"session.files.selectToOpen": "選取要開啟的檔案",
"session.files.all": "所有檔案",
"session.messages.renderEarlier": "顯示更早的訊息", "session.messages.renderEarlier": "顯示更早的訊息",
"session.messages.loadingEarlier": "正在載入更早的訊息...", "session.messages.loadingEarlier": "正在載入更早的訊息...",
"session.messages.loadEarlier": "載入更早的訊息", "session.messages.loadEarlier": "載入更早的訊息",
"session.messages.loading": "正在載入訊息...", "session.messages.loading": "正在載入訊息...",
"session.messages.jumpToLatest": "跳到最新",
"session.context.addToContext": "將 {{selection}} 新增到上下文", "session.context.addToContext": "將 {{selection}} 新增到上下文",
"session.new.worktree.main": "主分支", "session.new.worktree.main": "主分支",
@@ -436,6 +476,8 @@ export const dict = {
"terminal.title.numbered": "終端機 {{number}}", "terminal.title.numbered": "終端機 {{number}}",
"terminal.close": "關閉終端機", "terminal.close": "關閉終端機",
"terminal.connectionLost.title": "連線中斷",
"terminal.connectionLost.description": "終端機連線已中斷。這可能會在伺服器重新啟動時發生。",
"common.closeTab": "關閉標籤頁", "common.closeTab": "關閉標籤頁",
"common.dismiss": "忽略", "common.dismiss": "忽略",
"common.requestFailed": "要求失敗", "common.requestFailed": "要求失敗",
@@ -449,6 +491,8 @@ export const dict = {
"common.edit": "編輯", "common.edit": "編輯",
"common.loadMore": "載入更多", "common.loadMore": "載入更多",
"common.key.esc": "ESC",
"sidebar.menu.toggle": "切換選單",
"sidebar.nav.projectsAndSessions": "專案與工作階段", "sidebar.nav.projectsAndSessions": "專案與工作階段",
"sidebar.settings": "設定", "sidebar.settings": "設定",
"sidebar.help": "說明", "sidebar.help": "說明",
@@ -460,12 +504,15 @@ export const dict = {
"sidebar.project.recentSessions": "最近工作階段", "sidebar.project.recentSessions": "最近工作階段",
"sidebar.project.viewAllSessions": "查看全部工作階段", "sidebar.project.viewAllSessions": "查看全部工作階段",
"app.name.desktop": "OpenCode Desktop",
"settings.section.desktop": "桌面", "settings.section.desktop": "桌面",
"settings.section.server": "伺服器",
"settings.tab.general": "一般", "settings.tab.general": "一般",
"settings.tab.shortcuts": "快速鍵", "settings.tab.shortcuts": "快速鍵",
"settings.general.section.appearance": "外觀", "settings.general.section.appearance": "外觀",
"settings.general.section.notifications": "系統通知", "settings.general.section.notifications": "系統通知",
"settings.general.section.updates": "更新",
"settings.general.section.sounds": "音效", "settings.general.section.sounds": "音效",
"settings.general.row.language.title": "語言", "settings.general.row.language.title": "語言",
@@ -477,6 +524,75 @@ export const dict = {
"settings.general.row.font.title": "字型", "settings.general.row.font.title": "字型",
"settings.general.row.font.description": "自訂程式碼區塊使用的等寬字型", "settings.general.row.font.description": "自訂程式碼區塊使用的等寬字型",
"settings.general.row.releaseNotes.title": "發行說明",
"settings.general.row.releaseNotes.description": "更新後顯示「新功能」彈出視窗",
"settings.updates.row.startup.title": "啟動時檢查更新",
"settings.updates.row.startup.description": "在 OpenCode 啟動時自動檢查更新",
"settings.updates.row.check.title": "檢查更新",
"settings.updates.row.check.description": "手動檢查更新並在有更新時安裝",
"settings.updates.action.checkNow": "立即檢查",
"settings.updates.action.checking": "檢查中...",
"settings.updates.toast.latest.title": "已是最新版本",
"settings.updates.toast.latest.description": "你正在使用最新版本的 OpenCode。",
"font.option.ibmPlexMono": "IBM Plex Mono",
"font.option.cascadiaCode": "Cascadia Code",
"font.option.firaCode": "Fira Code",
"font.option.hack": "Hack",
"font.option.inconsolata": "Inconsolata",
"font.option.intelOneMono": "Intel One Mono",
"font.option.iosevka": "Iosevka",
"font.option.jetbrainsMono": "JetBrains Mono",
"font.option.mesloLgs": "Meslo LGS",
"font.option.robotoMono": "Roboto Mono",
"font.option.sourceCodePro": "Source Code Pro",
"font.option.ubuntuMono": "Ubuntu Mono",
"sound.option.alert01": "警報 01",
"sound.option.alert02": "警報 02",
"sound.option.alert03": "警報 03",
"sound.option.alert04": "警報 04",
"sound.option.alert05": "警報 05",
"sound.option.alert06": "警報 06",
"sound.option.alert07": "警報 07",
"sound.option.alert08": "警報 08",
"sound.option.alert09": "警報 09",
"sound.option.alert10": "警報 10",
"sound.option.bipbop01": "嗶啵 01",
"sound.option.bipbop02": "嗶啵 02",
"sound.option.bipbop03": "嗶啵 03",
"sound.option.bipbop04": "嗶啵 04",
"sound.option.bipbop05": "嗶啵 05",
"sound.option.bipbop06": "嗶啵 06",
"sound.option.bipbop07": "嗶啵 07",
"sound.option.bipbop08": "嗶啵 08",
"sound.option.bipbop09": "嗶啵 09",
"sound.option.bipbop10": "嗶啵 10",
"sound.option.staplebops01": "斯泰普博普斯 01",
"sound.option.staplebops02": "斯泰普博普斯 02",
"sound.option.staplebops03": "斯泰普博普斯 03",
"sound.option.staplebops04": "斯泰普博普斯 04",
"sound.option.staplebops05": "斯泰普博普斯 05",
"sound.option.staplebops06": "斯泰普博普斯 06",
"sound.option.staplebops07": "斯泰普博普斯 07",
"sound.option.nope01": "否 01",
"sound.option.nope02": "否 02",
"sound.option.nope03": "否 03",
"sound.option.nope04": "否 04",
"sound.option.nope05": "否 05",
"sound.option.nope06": "否 06",
"sound.option.nope07": "否 07",
"sound.option.nope08": "否 08",
"sound.option.nope09": "否 09",
"sound.option.nope10": "否 10",
"sound.option.nope11": "否 11",
"sound.option.nope12": "否 12",
"sound.option.yup01": "是 01",
"sound.option.yup02": "是 02",
"sound.option.yup03": "是 03",
"sound.option.yup04": "是 04",
"sound.option.yup05": "是 05",
"sound.option.yup06": "是 06",
"settings.general.notifications.agent.title": "代理程式", "settings.general.notifications.agent.title": "代理程式",
"settings.general.notifications.agent.description": "當代理程式完成或需要注意時顯示系統通知", "settings.general.notifications.agent.description": "當代理程式完成或需要注意時顯示系統通知",
"settings.general.notifications.permissions.title": "權限", "settings.general.notifications.permissions.title": "權限",
@@ -511,6 +627,13 @@ export const dict = {
"settings.providers.title": "提供者", "settings.providers.title": "提供者",
"settings.providers.description": "提供者設定將在此處可設定。", "settings.providers.description": "提供者設定將在此處可設定。",
"settings.providers.section.connected": "已連線的提供商",
"settings.providers.connected.empty": "沒有已連線的提供商",
"settings.providers.section.popular": "熱門提供商",
"settings.providers.tag.environment": "環境",
"settings.providers.tag.config": "配置",
"settings.providers.tag.custom": "自訂",
"settings.providers.tag.other": "其他",
"settings.models.title": "模型", "settings.models.title": "模型",
"settings.models.description": "模型設定將在此處可設定。", "settings.models.description": "模型設定將在此處可設定。",
"settings.agents.title": "代理程式", "settings.agents.title": "代理程式",
@@ -577,6 +700,7 @@ export const dict = {
"workspace.reset.failed.title": "重設工作區失敗", "workspace.reset.failed.title": "重設工作區失敗",
"workspace.reset.success.title": "工作區已重設", "workspace.reset.success.title": "工作區已重設",
"workspace.reset.success.description": "工作區已與預設分支保持一致。", "workspace.reset.success.description": "工作區已與預設分支保持一致。",
"workspace.error.stillPreparing": "工作區仍在準備中",
"workspace.status.checking": "正在檢查未合併的變更...", "workspace.status.checking": "正在檢查未合併的變更...",
"workspace.status.error": "無法驗證 git 狀態。", "workspace.status.error": "無法驗證 git 狀態。",
"workspace.status.clean": "未偵測到未合併的變更。", "workspace.status.clean": "未偵測到未合併的變更。",
-56
View File
@@ -1,57 +1 @@
@import "@opencode-ai/ui/styles/tailwind"; @import "@opencode-ai/ui/styles/tailwind";
:root {
a {
cursor: default;
}
}
[data-component="markdown"] ul {
list-style: disc outside;
padding-left: 1.5rem;
}
[data-component="markdown"] ol {
list-style: decimal outside;
padding-left: 1.5rem;
}
[data-component="markdown"] li > p:first-child {
display: inline;
margin: 0;
}
[data-component="markdown"] li > p + p {
display: block;
margin-top: 0.5rem;
}
*[data-tauri-drag-region] {
app-region: drag;
}
.session-scroller::-webkit-scrollbar {
width: 10px !important;
height: 10px !important;
}
.session-scroller::-webkit-scrollbar-track {
background: transparent !important;
border-radius: 5px !important;
}
.session-scroller::-webkit-scrollbar-thumb {
background: var(--border-weak-base) !important;
border-radius: 5px !important;
border: 3px solid transparent !important;
background-clip: padding-box !important;
}
.session-scroller::-webkit-scrollbar-thumb:hover {
background: var(--border-weak-base) !important;
}
.session-scroller {
scrollbar-width: thin !important;
scrollbar-color: var(--border-weak-base) transparent !important;
}
+18 -4
View File
@@ -1,22 +1,36 @@
import { createMemo, Show, type ParentProps } from "solid-js" import { createEffect, createMemo, Show, type ParentProps } from "solid-js"
import { useNavigate, useParams } from "@solidjs/router" import { useNavigate, useParams } from "@solidjs/router"
import { SDKProvider, useSDK } from "@/context/sdk" import { SDKProvider, useSDK } from "@/context/sdk"
import { SyncProvider, useSync } from "@/context/sync" import { SyncProvider, useSync } from "@/context/sync"
import { LocalProvider } from "@/context/local" import { LocalProvider } from "@/context/local"
import { base64Decode } from "@opencode-ai/util/encode"
import { DataProvider } from "@opencode-ai/ui/context" import { DataProvider } from "@opencode-ai/ui/context"
import { iife } from "@opencode-ai/util/iife" import { iife } from "@opencode-ai/util/iife"
import type { QuestionAnswer } from "@opencode-ai/sdk/v2" import type { QuestionAnswer } from "@opencode-ai/sdk/v2"
import { decode64 } from "@/utils/base64"
import { showToast } from "@opencode-ai/ui/toast"
import { useLanguage } from "@/context/language"
export default function Layout(props: ParentProps) { export default function Layout(props: ParentProps) {
const params = useParams() const params = useParams()
const navigate = useNavigate() const navigate = useNavigate()
const language = useLanguage()
const directory = createMemo(() => { const directory = createMemo(() => {
return base64Decode(params.dir!) return decode64(params.dir) ?? ""
})
createEffect(() => {
if (!params.dir) return
if (directory()) return
showToast({
variant: "error",
title: language.t("common.requestFailed"),
description: "Invalid directory in URL.",
})
navigate("/")
}) })
return ( return (
<Show when={params.dir}> <Show when={directory()}>
<SDKProvider directory={directory()}> <SDKProvider directory={directory()}>
<SyncProvider> <SyncProvider>
{iife(() => { {iife(() => {
+178 -35
View File
@@ -19,7 +19,8 @@ import { A, useNavigate, useParams } from "@solidjs/router"
import { useLayout, getAvatarColors, LocalProject } from "@/context/layout" import { useLayout, getAvatarColors, LocalProject } from "@/context/layout"
import { useGlobalSync } from "@/context/global-sync" import { useGlobalSync } from "@/context/global-sync"
import { Persist, persisted } from "@/utils/persist" import { Persist, persisted } from "@/utils/persist"
import { base64Decode, base64Encode } from "@opencode-ai/util/encode" import { base64Encode } from "@opencode-ai/util/encode"
import { decode64 } from "@/utils/base64"
import { Avatar } from "@opencode-ai/ui/avatar" import { Avatar } from "@opencode-ai/ui/avatar"
import { ResizeHandle } from "@opencode-ai/ui/resize-handle" import { ResizeHandle } from "@opencode-ai/ui/resize-handle"
import { Button } from "@opencode-ai/ui/button" import { Button } from "@opencode-ai/ui/button"
@@ -57,6 +58,7 @@ import { Binary } from "@opencode-ai/util/binary"
import { retry } from "@opencode-ai/util/retry" import { retry } from "@opencode-ai/util/retry"
import { playSound, soundSrc } from "@/utils/sound" import { playSound, soundSrc } from "@/utils/sound"
import { Worktree as WorktreeState } from "@/utils/worktree" import { Worktree as WorktreeState } from "@/utils/worktree"
import { agentColor } from "@/utils/agent"
import { useDialog } from "@opencode-ai/ui/context/dialog" import { useDialog } from "@opencode-ai/ui/context/dialog"
import { useTheme, type ColorScheme } from "@opencode-ai/ui/theme" import { useTheme, type ColorScheme } from "@opencode-ai/ui/theme"
@@ -330,6 +332,7 @@ export default function Layout(props: ParentProps) {
if (!platform.checkUpdate || !platform.update || !platform.restart) return if (!platform.checkUpdate || !platform.update || !platform.restart) return
let toastId: number | undefined let toastId: number | undefined
let interval: ReturnType<typeof setInterval> | undefined
async function pollUpdate() { async function pollUpdate() {
const { updateAvailable, version } = await platform.checkUpdate!() const { updateAvailable, version } = await platform.checkUpdate!()
@@ -356,9 +359,25 @@ export default function Layout(props: ParentProps) {
} }
} }
pollUpdate() createEffect(() => {
const interval = setInterval(pollUpdate, 10 * 60 * 1000) if (!settings.ready()) return
onCleanup(() => clearInterval(interval))
if (!settings.updates.startup()) {
if (interval === undefined) return
clearInterval(interval)
interval = undefined
return
}
if (interval !== undefined) return
void pollUpdate()
interval = setInterval(pollUpdate, 10 * 60 * 1000)
})
onCleanup(() => {
if (interval === undefined) return
clearInterval(interval)
})
}) })
onMount(() => { onMount(() => {
@@ -419,7 +438,7 @@ export default function Layout(props: ParentProps) {
} }
} }
const currentDir = params.dir ? base64Decode(params.dir) : undefined const currentDir = decode64(params.dir)
const currentSession = params.id const currentSession = params.id
if (directory === currentDir && props.sessionID === currentSession) return if (directory === currentDir && props.sessionID === currentSession) return
if (directory === currentDir && session?.parentID === currentSession) return if (directory === currentDir && session?.parentID === currentSession) return
@@ -448,7 +467,7 @@ export default function Layout(props: ParentProps) {
onCleanup(unsub) onCleanup(unsub)
createEffect(() => { createEffect(() => {
const currentDir = params.dir ? base64Decode(params.dir) : undefined const currentDir = decode64(params.dir)
const currentSession = params.id const currentSession = params.id
if (!currentDir || !currentSession) return if (!currentDir || !currentSession) return
const sessionKey = `${currentDir}:${currentSession}` const sessionKey = `${currentDir}:${currentSession}`
@@ -502,7 +521,7 @@ export default function Layout(props: ParentProps) {
} }
const currentProject = createMemo(() => { const currentProject = createMemo(() => {
const directory = params.dir ? base64Decode(params.dir) : undefined const directory = decode64(params.dir)
if (!directory) return if (!directory) return
const projects = layout.projects.list() const projects = layout.projects.list()
@@ -557,7 +576,6 @@ export default function Layout(props: ParentProps) {
openProject(next.worktree, false) openProject(next.worktree, false)
navigateToProject(next.worktree) navigateToProject(next.worktree)
}, },
{ defer: true },
), ),
) )
@@ -637,7 +655,7 @@ export default function Layout(props: ParentProps) {
const compare = sortSessions(Date.now()) const compare = sortSessions(Date.now())
if (workspaceSetting()) { if (workspaceSetting()) {
const dirs = workspaceIds(project) const dirs = workspaceIds(project)
const activeDir = params.dir ? base64Decode(params.dir) : "" const activeDir = decode64(params.dir) ?? ""
const result: Session[] = [] const result: Session[] = []
for (const dir of dirs) { for (const dir of dirs) {
const expanded = store.workspaceExpanded[dir] ?? dir === project.worktree const expanded = store.workspaceExpanded[dir] ?? dir === project.worktree
@@ -666,12 +684,34 @@ export default function Layout(props: ParentProps) {
running: number running: number
} }
const prefetchChunk = 600 const prefetchChunk = 200
const prefetchConcurrency = 1 const prefetchConcurrency = 1
const prefetchPendingLimit = 6 const prefetchPendingLimit = 6
const prefetchToken = { value: 0 } const prefetchToken = { value: 0 }
const prefetchQueues = new Map<string, PrefetchQueue>() const prefetchQueues = new Map<string, PrefetchQueue>()
const PREFETCH_MAX_SESSIONS_PER_DIR = 10
const prefetchedByDir = new Map<string, Map<string, true>>()
const lruFor = (directory: string) => {
const existing = prefetchedByDir.get(directory)
if (existing) return existing
const created = new Map<string, true>()
prefetchedByDir.set(directory, created)
return created
}
const markPrefetched = (directory: string, sessionID: string) => {
const lru = lruFor(directory)
if (lru.has(sessionID)) lru.delete(sessionID)
lru.set(sessionID, true)
while (lru.size > PREFETCH_MAX_SESSIONS_PER_DIR) {
const oldest = lru.keys().next().value as string | undefined
if (!oldest) return
lru.delete(oldest)
}
}
createEffect(() => { createEffect(() => {
params.dir params.dir
globalSDK.url globalSDK.url
@@ -764,6 +804,11 @@ export default function Layout(props: ParentProps) {
if (q.inflight.has(session.id)) return if (q.inflight.has(session.id)) return
if (q.pendingSet.has(session.id)) return if (q.pendingSet.has(session.id)) return
const lru = lruFor(directory)
const known = lru.has(session.id)
if (!known && lru.size >= PREFETCH_MAX_SESSIONS_PER_DIR && priority !== "high") return
markPrefetched(directory, session.id)
if (priority === "high") q.pending.unshift(session.id) if (priority === "high") q.pending.unshift(session.id)
if (priority !== "high") q.pending.push(session.id) if (priority !== "high") q.pending.push(session.id)
q.pendingSet.add(session.id) q.pendingSet.add(session.id)
@@ -1091,6 +1136,46 @@ export default function Layout(props: ParentProps) {
if (navigate) navigateToProject(directory) if (navigate) navigateToProject(directory)
} }
const deepLinkEvent = "opencode:deep-link"
const parseDeepLink = (input: string) => {
if (!input.startsWith("opencode://")) return
const url = new URL(input)
if (url.hostname !== "open-project") return
const directory = url.searchParams.get("directory")
if (!directory) return
return directory
}
const handleDeepLinks = (urls: string[]) => {
if (!server.isLocal()) return
for (const input of urls) {
const directory = parseDeepLink(input)
if (!directory) continue
openProject(directory)
}
}
const drainDeepLinks = () => {
const pending = window.__OPENCODE__?.deepLinks ?? []
if (pending.length === 0) return
if (window.__OPENCODE__) window.__OPENCODE__.deepLinks = []
handleDeepLinks(pending)
}
onMount(() => {
const handler = (event: Event) => {
const detail = (event as CustomEvent<{ urls: string[] }>).detail
const urls = detail?.urls ?? []
if (urls.length === 0) return
handleDeepLinks(urls)
}
drainDeepLinks()
window.addEventListener(deepLinkEvent, handler as EventListener)
onCleanup(() => window.removeEventListener(deepLinkEvent, handler as EventListener))
})
const displayName = (project: LocalProject) => project.name || getFilename(project.worktree) const displayName = (project: LocalProject) => project.name || getFilename(project.worktree)
async function renameProject(project: LocalProject, next: string) { async function renameProject(project: LocalProject, next: string) {
@@ -1187,7 +1272,7 @@ export default function Layout(props: ParentProps) {
layout.projects.close(directory) layout.projects.close(directory)
layout.projects.open(root) layout.projects.open(root)
if (params.dir && base64Decode(params.dir) === directory) { if (params.dir && decode64(params.dir) === directory) {
navigateToProject(root) navigateToProject(root)
} }
} }
@@ -1430,7 +1515,8 @@ export default function Layout(props: ParentProps) {
const dir = value.dir const dir = value.dir
const id = value.id const id = value.id
if (!dir || !id) return if (!dir || !id) return
const directory = base64Decode(dir) const directory = decode64(dir)
if (!directory) return
setStore("lastSession", directory, id) setStore("lastSession", directory, id)
notification.session.markViewed(id) notification.session.markViewed(id)
const expanded = untrack(() => store.workspaceExpanded[directory]) const expanded = untrack(() => store.workspaceExpanded[directory])
@@ -1443,12 +1529,17 @@ export default function Layout(props: ParentProps) {
), ),
) )
createEffect(() => {
const sidebarWidth = layout.sidebar.opened() ? layout.sidebar.width() : 48
document.documentElement.style.setProperty("--dialog-left-margin", `${sidebarWidth}px`)
})
createEffect(() => { createEffect(() => {
const project = currentProject() const project = currentProject()
if (!project) return if (!project) return
if (workspaceSetting()) { if (workspaceSetting()) {
const activeDir = params.dir ? base64Decode(params.dir) : "" const activeDir = decode64(params.dir) ?? ""
const dirs = [project.worktree, ...(project.sandboxes ?? [])] const dirs = [project.worktree, ...(project.sandboxes ?? [])]
for (const directory of dirs) { for (const directory of dirs) {
const expanded = store.workspaceExpanded[directory] ?? directory === project.worktree const expanded = store.workspaceExpanded[directory] ?? directory === project.worktree
@@ -1498,7 +1589,7 @@ export default function Layout(props: ParentProps) {
const local = project.worktree const local = project.worktree
const dirs = [local, ...(project.sandboxes ?? [])] const dirs = [local, ...(project.sandboxes ?? [])]
const active = currentProject() const active = currentProject()
const directory = active?.worktree === project.worktree && params.dir ? base64Decode(params.dir) : undefined const directory = active?.worktree === project.worktree ? decode64(params.dir) : undefined
const extra = directory && directory !== local && !dirs.includes(directory) ? directory : undefined const extra = directory && directory !== local && !dirs.includes(directory) ? directory : undefined
const pending = extra ? WorktreeState.get(extra)?.status === "pending" : false const pending = extra ? WorktreeState.get(extra)?.status === "pending" : false
@@ -1555,7 +1646,6 @@ export default function Layout(props: ParentProps) {
const notifications = createMemo(() => notification.project.unseen(props.project.worktree)) const notifications = createMemo(() => notification.project.unseen(props.project.worktree))
const hasError = createMemo(() => notifications().some((n) => n.type === "error")) const hasError = createMemo(() => notifications().some((n) => n.type === "error"))
const name = createMemo(() => props.project.name || getFilename(props.project.worktree)) const name = createMemo(() => props.project.name || getFilename(props.project.worktree))
const mask = "radial-gradient(circle 5px at calc(100% - 4px) 4px, transparent 5px, black 5.5px)"
const opencode = "4b0ea68d7af9a6031a7ffda7ad66e0cb83315750" const opencode = "4b0ea68d7af9a6031a7ffda7ad66e0cb83315750"
return ( return (
@@ -1566,11 +1656,7 @@ export default function Layout(props: ParentProps) {
src={props.project.id === opencode ? "https://opencode.ai/favicon.svg" : props.project.icon?.override} src={props.project.id === opencode ? "https://opencode.ai/favicon.svg" : props.project.icon?.override}
{...getAvatarColors(props.project.icon?.color)} {...getAvatarColors(props.project.icon?.color)}
class="size-full rounded" class="size-full rounded"
style={ classList={{ "badge-mask": notifications().length > 0 && props.notify }}
notifications().length > 0 && props.notify
? { "-webkit-mask-image": mask, "mask-image": mask }
: undefined
}
/> />
</div> </div>
<Show when={notifications().length > 0 && props.notify}> <Show when={notifications().length > 0 && props.notify}>
@@ -1592,6 +1678,7 @@ export default function Layout(props: ParentProps) {
mobile?: boolean mobile?: boolean
dense?: boolean dense?: boolean
popover?: boolean popover?: boolean
children?: Map<string, string[]>
}): JSX.Element => { }): JSX.Element => {
const notification = useNotification() const notification = useNotification()
const notifications = createMemo(() => notification.session.unseen(props.session.id)) const notifications = createMemo(() => notification.session.unseen(props.session.id))
@@ -1600,6 +1687,16 @@ export default function Layout(props: ParentProps) {
const hasPermissions = createMemo(() => { const hasPermissions = createMemo(() => {
const permissions = sessionStore.permission?.[props.session.id] ?? [] const permissions = sessionStore.permission?.[props.session.id] ?? []
if (permissions.length > 0) return true if (permissions.length > 0) return true
const childIDs = props.children?.get(props.session.id)
if (childIDs) {
for (const id of childIDs) {
const childPermissions = sessionStore.permission?.[id] ?? []
if (childPermissions.length > 0) return true
}
return false
}
const childSessions = sessionStore.session.filter((s) => s.parentID === props.session.id) const childSessions = sessionStore.session.filter((s) => s.parentID === props.session.id)
for (const child of childSessions) { for (const child of childSessions) {
const childPermissions = sessionStore.permission?.[child.id] ?? [] const childPermissions = sessionStore.permission?.[child.id] ?? []
@@ -1623,7 +1720,7 @@ export default function Layout(props: ParentProps) {
if (!user?.agent) return undefined if (!user?.agent) return undefined
const agent = sessionStore.agent.find((a) => a.name === user.agent) const agent = sessionStore.agent.find((a) => a.name === user.agent)
return agent?.color return agentColor(user.agent, agent?.color)
}) })
const hoverMessages = createMemo(() => const hoverMessages = createMemo(() =>
@@ -1638,6 +1735,22 @@ export default function Layout(props: ParentProps) {
pendingRename: false, pendingRename: false,
}) })
const hoverPrefetch = { current: undefined as ReturnType<typeof setTimeout> | undefined }
const cancelHoverPrefetch = () => {
if (hoverPrefetch.current === undefined) return
clearTimeout(hoverPrefetch.current)
hoverPrefetch.current = undefined
}
const scheduleHoverPrefetch = () => {
if (hoverPrefetch.current !== undefined) return
hoverPrefetch.current = setTimeout(() => {
hoverPrefetch.current = undefined
prefetchSession(props.session)
}, 200)
}
onCleanup(cancelHoverPrefetch)
const messageLabel = (message: Message) => { const messageLabel = (message: Message) => {
const parts = sessionStore.part[message.id] ?? [] const parts = sessionStore.part[message.id] ?? []
const text = parts.find((part): part is TextPart => part?.type === "text" && !part.synthetic && !part.ignored) const text = parts.find((part): part is TextPart => part?.type === "text" && !part.synthetic && !part.ignored)
@@ -1648,7 +1761,10 @@ export default function Layout(props: ParentProps) {
<A <A
href={`${props.slug}/session/${props.session.id}`} href={`${props.slug}/session/${props.session.id}`}
class={`flex items-center justify-between gap-3 min-w-0 text-left w-full focus:outline-none transition-[padding] ${menu.open ? "pr-7" : ""} group-hover/session:pr-7 group-focus-within/session:pr-7 group-active/session:pr-7 ${props.dense ? "py-0.5" : "py-1"}`} class={`flex items-center justify-between gap-3 min-w-0 text-left w-full focus:outline-none transition-[padding] ${menu.open ? "pr-7" : ""} group-hover/session:pr-7 group-focus-within/session:pr-7 group-active/session:pr-7 ${props.dense ? "py-0.5" : "py-1"}`}
onMouseEnter={() => prefetchSession(props.session, "high")} onPointerEnter={scheduleHoverPrefetch}
onPointerLeave={cancelHoverPrefetch}
onMouseEnter={scheduleHoverPrefetch}
onMouseLeave={cancelHoverPrefetch}
onFocus={() => prefetchSession(props.session, "high")} onFocus={() => prefetchSession(props.session, "high")}
onClick={() => { onClick={() => {
setState("hoverSession", undefined) setState("hoverSession", undefined)
@@ -1898,9 +2014,22 @@ export default function Layout(props: ParentProps) {
.filter((session) => !session.parentID && !session.time?.archived) .filter((session) => !session.parentID && !session.time?.archived)
.toSorted(sortSessions(Date.now())), .toSorted(sortSessions(Date.now())),
) )
const children = createMemo(() => {
const map = new Map<string, string[]>()
for (const session of workspaceStore.session) {
if (!session.parentID) continue
const existing = map.get(session.parentID)
if (existing) {
existing.push(session.id)
continue
}
map.set(session.parentID, [session.id])
}
return map
})
const local = createMemo(() => props.directory === props.project.worktree) const local = createMemo(() => props.directory === props.project.worktree)
const active = createMemo(() => { const active = createMemo(() => {
const current = params.dir ? base64Decode(params.dir) : "" const current = decode64(params.dir) ?? ""
return current === props.directory return current === props.directory
}) })
const workspaceValue = createMemo(() => { const workspaceValue = createMemo(() => {
@@ -1910,11 +2039,11 @@ export default function Layout(props: ParentProps) {
}) })
const open = createMemo(() => store.workspaceExpanded[props.directory] ?? local()) const open = createMemo(() => store.workspaceExpanded[props.directory] ?? local())
const boot = createMemo(() => open() || active()) const boot = createMemo(() => open() || active())
const loading = createMemo(() => open() && workspaceStore.status !== "complete" && sessions().length === 0) const booted = createMemo((prev) => prev || workspaceStore.status === "complete", false)
const hasMore = createMemo(() => local() && workspaceStore.sessionTotal > workspaceStore.session.length) const loading = createMemo(() => open() && !booted() && sessions().length === 0)
const hasMore = createMemo(() => workspaceStore.sessionTotal > sessions().length)
const busy = createMemo(() => isBusy(props.directory)) const busy = createMemo(() => isBusy(props.directory))
const loadMore = async () => { const loadMore = async () => {
if (!local()) return
setWorkspaceStore("limit", (limit) => limit + 5) setWorkspaceStore("limit", (limit) => limit + 5)
await globalSync.project.loadSessions(props.directory) await globalSync.project.loadSessions(props.directory)
} }
@@ -2073,7 +2202,9 @@ export default function Layout(props: ParentProps) {
<SessionSkeleton /> <SessionSkeleton />
</Show> </Show>
<For each={sessions()}> <For each={sessions()}>
{(session) => <SessionItem session={session} slug={slug()} mobile={props.mobile} />} {(session) => (
<SessionItem session={session} slug={slug()} mobile={props.mobile} children={children()} />
)}
</For> </For>
<Show when={hasMore()}> <Show when={hasMore()}>
<div class="relative w-full py-1"> <div class="relative w-full py-1">
@@ -2100,7 +2231,7 @@ export default function Layout(props: ParentProps) {
const SortableProject = (props: { project: LocalProject; mobile?: boolean }): JSX.Element => { const SortableProject = (props: { project: LocalProject; mobile?: boolean }): JSX.Element => {
const sortable = createSortable(props.project.worktree) const sortable = createSortable(props.project.worktree)
const selected = createMemo(() => { const selected = createMemo(() => {
const current = params.dir ? base64Decode(params.dir) : "" const current = decode64(params.dir) ?? ""
return props.project.worktree === current || props.project.sandboxes?.includes(current) return props.project.worktree === current || props.project.sandboxes?.includes(current)
}) })
@@ -2288,8 +2419,22 @@ export default function Layout(props: ParentProps) {
.filter((session) => !session.parentID && !session.time?.archived) .filter((session) => !session.parentID && !session.time?.archived)
.toSorted(sortSessions(Date.now())), .toSorted(sortSessions(Date.now())),
) )
const loading = createMemo(() => workspaceStore.status !== "complete" && sessions().length === 0) const children = createMemo(() => {
const hasMore = createMemo(() => workspaceStore.sessionTotal > workspaceStore.session.length) const map = new Map<string, string[]>()
for (const session of workspaceStore.session) {
if (!session.parentID) continue
const existing = map.get(session.parentID)
if (existing) {
existing.push(session.id)
continue
}
map.set(session.parentID, [session.id])
}
return map
})
const booted = createMemo((prev) => prev || workspaceStore.status === "complete", false)
const loading = createMemo(() => !booted() && sessions().length === 0)
const hasMore = createMemo(() => workspaceStore.sessionTotal > sessions().length)
const loadMore = async () => { const loadMore = async () => {
setWorkspaceStore("limit", (limit) => limit + 5) setWorkspaceStore("limit", (limit) => limit + 5)
await globalSync.project.loadSessions(props.project.worktree) await globalSync.project.loadSessions(props.project.worktree)
@@ -2300,15 +2445,14 @@ export default function Layout(props: ParentProps) {
ref={(el) => { ref={(el) => {
if (!props.mobile) scrollContainerRef = el if (!props.mobile) scrollContainerRef = el
}} }}
class="size-full flex flex-col py-2 overflow-y-auto no-scrollbar" class="size-full flex flex-col py-2 overflow-y-auto no-scrollbar [overflow-anchor:none]"
style={{ "overflow-anchor": "none" }}
> >
<nav class="flex flex-col gap-1 px-2"> <nav class="flex flex-col gap-1 px-2">
<Show when={loading()}> <Show when={loading()}>
<SessionSkeleton /> <SessionSkeleton />
</Show> </Show>
<For each={sessions()}> <For each={sessions()}>
{(session) => <SessionItem session={session} slug={slug()} mobile={props.mobile} />} {(session) => <SessionItem session={session} slug={slug()} mobile={props.mobile} children={children()} />}
</For> </For>
<Show when={hasMore()}> <Show when={hasMore()}>
<div class="relative w-full py-1"> <div class="relative w-full py-1">
@@ -2527,8 +2671,7 @@ export default function Layout(props: ParentProps) {
ref={(el) => { ref={(el) => {
if (!panelProps.mobile) scrollContainerRef = el if (!panelProps.mobile) scrollContainerRef = el
}} }}
class="size-full flex flex-col py-2 gap-4 overflow-y-auto no-scrollbar" class="size-full flex flex-col py-2 gap-4 overflow-y-auto no-scrollbar [overflow-anchor:none]"
style={{ "overflow-anchor": "none" }}
> >
<SortableProvider ids={workspaces()}> <SortableProvider ids={workspaces()}>
<For each={workspaces()}> <For each={workspaces()}>
File diff suppressed because it is too large Load Diff
+11
View File
@@ -0,0 +1,11 @@
const defaults: Record<string, string> = {
ask: "var(--icon-agent-ask-base)",
build: "var(--icon-agent-build-base)",
docs: "var(--icon-agent-docs-base)",
plan: "var(--icon-agent-plan-base)",
}
export function agentColor(name: string, custom?: string) {
if (custom) return custom
return defaults[name] ?? defaults[name.toLowerCase()]
}
+10
View File
@@ -0,0 +1,10 @@
import { base64Decode } from "@opencode-ai/util/encode"
export function decode64(value: string | undefined) {
if (value === undefined) return
try {
return base64Decode(value)
} catch {
return
}
}
+86 -12
View File
@@ -18,7 +18,52 @@ const LEGACY_STORAGE = "default.dat"
const GLOBAL_STORAGE = "opencode.global.dat" const GLOBAL_STORAGE = "opencode.global.dat"
const LOCAL_PREFIX = "opencode." const LOCAL_PREFIX = "opencode."
const fallback = { disabled: false } const fallback = { disabled: false }
const cache = new Map<string, string>()
const CACHE_MAX_ENTRIES = 500
const CACHE_MAX_BYTES = 8 * 1024 * 1024
type CacheEntry = { value: string; bytes: number }
const cache = new Map<string, CacheEntry>()
const cacheTotal = { bytes: 0 }
function cacheDelete(key: string) {
const entry = cache.get(key)
if (!entry) return
cacheTotal.bytes -= entry.bytes
cache.delete(key)
}
function cachePrune() {
for (;;) {
if (cache.size <= CACHE_MAX_ENTRIES && cacheTotal.bytes <= CACHE_MAX_BYTES) return
const oldest = cache.keys().next().value as string | undefined
if (!oldest) return
cacheDelete(oldest)
}
}
function cacheSet(key: string, value: string) {
const bytes = value.length * 2
if (bytes > CACHE_MAX_BYTES) {
cacheDelete(key)
return
}
const entry = cache.get(key)
if (entry) cacheTotal.bytes -= entry.bytes
cache.delete(key)
cache.set(key, { value, bytes })
cacheTotal.bytes += bytes
cachePrune()
}
function cacheGet(key: string) {
const entry = cache.get(key)
if (!entry) return
cache.delete(key)
cache.set(key, entry)
return entry.value
}
function quota(error: unknown) { function quota(error: unknown) {
if (error instanceof DOMException) { if (error instanceof DOMException) {
@@ -63,9 +108,11 @@ function evict(storage: Storage, keep: string, value: string) {
for (const item of items) { for (const item of items) {
storage.removeItem(item.key) storage.removeItem(item.key)
cacheDelete(item.key)
try { try {
storage.setItem(keep, value) storage.setItem(keep, value)
cacheSet(keep, value)
return true return true
} catch (error) { } catch (error) {
if (!quota(error)) throw error if (!quota(error)) throw error
@@ -78,6 +125,7 @@ function evict(storage: Storage, keep: string, value: string) {
function write(storage: Storage, key: string, value: string) { function write(storage: Storage, key: string, value: string) {
try { try {
storage.setItem(key, value) storage.setItem(key, value)
cacheSet(key, value)
return true return true
} catch (error) { } catch (error) {
if (!quota(error)) throw error if (!quota(error)) throw error
@@ -85,13 +133,17 @@ function write(storage: Storage, key: string, value: string) {
try { try {
storage.removeItem(key) storage.removeItem(key)
cacheDelete(key)
storage.setItem(key, value) storage.setItem(key, value)
cacheSet(key, value)
return true return true
} catch (error) { } catch (error) {
if (!quota(error)) throw error if (!quota(error)) throw error
} }
return evict(storage, key, value) const ok = evict(storage, key, value)
if (!ok) cacheSet(key, value)
return ok
} }
function snapshot(value: unknown) { function snapshot(value: unknown) {
@@ -148,17 +200,24 @@ function localStorageWithPrefix(prefix: string): SyncStorage {
return { return {
getItem: (key) => { getItem: (key) => {
const name = item(key) const name = item(key)
const cached = cache.get(name) const cached = cacheGet(name)
if (fallback.disabled && cached !== undefined) return cached if (fallback.disabled && cached !== undefined) return cached
const stored = localStorage.getItem(name) const stored = (() => {
try {
return localStorage.getItem(name)
} catch {
fallback.disabled = true
return null
}
})()
if (stored === null) return cached ?? null if (stored === null) return cached ?? null
cache.set(name, stored) cacheSet(name, stored)
return stored return stored
}, },
setItem: (key, value) => { setItem: (key, value) => {
const name = item(key) const name = item(key)
cache.set(name, value) cacheSet(name, value)
if (fallback.disabled) return if (fallback.disabled) return
try { try {
if (write(localStorage, name, value)) return if (write(localStorage, name, value)) return
@@ -170,9 +229,13 @@ function localStorageWithPrefix(prefix: string): SyncStorage {
}, },
removeItem: (key) => { removeItem: (key) => {
const name = item(key) const name = item(key)
cache.delete(name) cacheDelete(name)
if (fallback.disabled) return if (fallback.disabled) return
try {
localStorage.removeItem(name) localStorage.removeItem(name)
} catch {
fallback.disabled = true
}
}, },
} }
} }
@@ -180,16 +243,23 @@ function localStorageWithPrefix(prefix: string): SyncStorage {
function localStorageDirect(): SyncStorage { function localStorageDirect(): SyncStorage {
return { return {
getItem: (key) => { getItem: (key) => {
const cached = cache.get(key) const cached = cacheGet(key)
if (fallback.disabled && cached !== undefined) return cached if (fallback.disabled && cached !== undefined) return cached
const stored = localStorage.getItem(key) const stored = (() => {
try {
return localStorage.getItem(key)
} catch {
fallback.disabled = true
return null
}
})()
if (stored === null) return cached ?? null if (stored === null) return cached ?? null
cache.set(key, stored) cacheSet(key, stored)
return stored return stored
}, },
setItem: (key, value) => { setItem: (key, value) => {
cache.set(key, value) cacheSet(key, value)
if (fallback.disabled) return if (fallback.disabled) return
try { try {
if (write(localStorage, key, value)) return if (write(localStorage, key, value)) return
@@ -200,9 +270,13 @@ function localStorageDirect(): SyncStorage {
fallback.disabled = true fallback.disabled = true
}, },
removeItem: (key) => { removeItem: (key) => {
cache.delete(key) cacheDelete(key)
if (fallback.disabled) return if (fallback.disabled) return
try {
localStorage.removeItem(key) localStorage.removeItem(key)
} catch {
fallback.disabled = true
}
}, },
} }
} }
+29 -10
View File
@@ -78,6 +78,7 @@ export function createSpeechRecognition(opts?: {
let lastInterimSuffix = "" let lastInterimSuffix = ""
let shrinkCandidate: string | undefined let shrinkCandidate: string | undefined
let commitTimer: number | undefined let commitTimer: number | undefined
let restartTimer: number | undefined
const cancelPendingCommit = () => { const cancelPendingCommit = () => {
if (commitTimer === undefined) return if (commitTimer === undefined) return
@@ -85,6 +86,26 @@ export function createSpeechRecognition(opts?: {
commitTimer = undefined commitTimer = undefined
} }
const clearRestart = () => {
if (restartTimer === undefined) return
window.clearTimeout(restartTimer)
restartTimer = undefined
}
const scheduleRestart = () => {
clearRestart()
if (!shouldContinue) return
if (!recognition) return
restartTimer = window.setTimeout(() => {
restartTimer = undefined
if (!shouldContinue) return
if (!recognition) return
try {
recognition.start()
} catch {}
}, 150)
}
const commitSegment = (segment: string) => { const commitSegment = (segment: string) => {
const nextCommitted = appendSegment(committedText, segment) const nextCommitted = appendSegment(committedText, segment)
if (nextCommitted === committedText) return if (nextCommitted === committedText) return
@@ -214,17 +235,14 @@ export function createSpeechRecognition(opts?: {
} }
recognition.onerror = (e: { error: string }) => { recognition.onerror = (e: { error: string }) => {
clearRestart()
cancelPendingCommit() cancelPendingCommit()
lastInterimSuffix = "" lastInterimSuffix = ""
shrinkCandidate = undefined shrinkCandidate = undefined
if (e.error === "no-speech" && shouldContinue) { if (e.error === "no-speech" && shouldContinue) {
setStore("interim", "") setStore("interim", "")
if (opts?.onInterim) opts.onInterim("") if (opts?.onInterim) opts.onInterim("")
setTimeout(() => { scheduleRestart()
try {
recognition?.start()
} catch {}
}, 150)
return return
} }
shouldContinue = false shouldContinue = false
@@ -232,6 +250,7 @@ export function createSpeechRecognition(opts?: {
} }
recognition.onstart = () => { recognition.onstart = () => {
clearRestart()
sessionCommitted = "" sessionCommitted = ""
pendingHypothesis = "" pendingHypothesis = ""
cancelPendingCommit() cancelPendingCommit()
@@ -243,22 +262,20 @@ export function createSpeechRecognition(opts?: {
} }
recognition.onend = () => { recognition.onend = () => {
clearRestart()
cancelPendingCommit() cancelPendingCommit()
lastInterimSuffix = "" lastInterimSuffix = ""
shrinkCandidate = undefined shrinkCandidate = undefined
setStore("isRecording", false) setStore("isRecording", false)
if (shouldContinue) { if (shouldContinue) {
setTimeout(() => { scheduleRestart()
try {
recognition?.start()
} catch {}
}, 150)
} }
} }
} }
const start = () => { const start = () => {
if (!recognition) return if (!recognition) return
clearRestart()
shouldContinue = true shouldContinue = true
sessionCommitted = "" sessionCommitted = ""
pendingHypothesis = "" pendingHypothesis = ""
@@ -274,6 +291,7 @@ export function createSpeechRecognition(opts?: {
const stop = () => { const stop = () => {
if (!recognition) return if (!recognition) return
shouldContinue = false shouldContinue = false
clearRestart()
promotePending() promotePending()
cancelPendingCommit() cancelPendingCommit()
lastInterimSuffix = "" lastInterimSuffix = ""
@@ -287,6 +305,7 @@ export function createSpeechRecognition(opts?: {
onCleanup(() => { onCleanup(() => {
shouldContinue = false shouldContinue = false
clearRestart()
promotePending() promotePending()
cancelPendingCommit() cancelPendingCommit()
lastInterimSuffix = "" lastInterimSuffix = ""
+32 -17
View File
@@ -13,7 +13,21 @@ type State =
} }
const state = new Map<string, State>() const state = new Map<string, State>()
const waiters = new Map<string, Array<(state: State) => void>>() const waiters = new Map<
string,
{
promise: Promise<State>
resolve: (state: State) => void
}
>()
function deferred() {
const box = { resolve: (_: State) => {} }
const promise = new Promise<State>((resolve) => {
box.resolve = resolve
})
return { promise, resolve: box.resolve }
}
export const Worktree = { export const Worktree = {
get(directory: string) { get(directory: string) {
@@ -27,32 +41,33 @@ export const Worktree = {
}, },
ready(directory: string) { ready(directory: string) {
const key = normalize(directory) const key = normalize(directory)
state.set(key, { status: "ready" }) const next = { status: "ready" } as const
const list = waiters.get(key) state.set(key, next)
if (!list) return const waiter = waiters.get(key)
if (!waiter) return
waiters.delete(key) waiters.delete(key)
for (const fn of list) fn({ status: "ready" }) waiter.resolve(next)
}, },
failed(directory: string, message: string) { failed(directory: string, message: string) {
const key = normalize(directory) const key = normalize(directory)
state.set(key, { status: "failed", message }) const next = { status: "failed", message } as const
const list = waiters.get(key) state.set(key, next)
if (!list) return const waiter = waiters.get(key)
if (!waiter) return
waiters.delete(key) waiters.delete(key)
for (const fn of list) fn({ status: "failed", message }) waiter.resolve(next)
}, },
wait(directory: string) { wait(directory: string) {
const key = normalize(directory) const key = normalize(directory)
const current = state.get(key) const current = state.get(key)
if (current && current.status !== "pending") return Promise.resolve(current) if (current && current.status !== "pending") return Promise.resolve(current)
return new Promise<State>((resolve) => { const existing = waiters.get(key)
const list = waiters.get(key) if (existing) return existing.promise
if (!list) {
waiters.set(key, [resolve]) const waiter = deferred()
return
} waiters.set(key, waiter)
list.push(resolve) return waiter.promise
})
}, },
} }
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "@opencode-ai/console-app", "name": "@opencode-ai/console-app",
"version": "1.1.36", "version": "0.0.0-ci-202601291718",
"type": "module", "type": "module",
"license": "MIT", "license": "MIT",
"scripts": { "scripts": {
+146
View File
@@ -0,0 +1,146 @@
import { query } from "@solidjs/router"
type Release = {
tag_name: string
name: string
body: string
published_at: string
html_url: string
}
export type HighlightMedia =
| { type: "video"; src: string }
| { type: "image"; src: string; width: string; height: string }
export type HighlightItem = {
title: string
description: string
shortDescription?: string
media: HighlightMedia
}
export type HighlightGroup = {
source: string
items: HighlightItem[]
}
export type ChangelogRelease = {
tag: string
name: string
date: string
url: string
highlights: HighlightGroup[]
sections: { title: string; items: string[] }[]
}
export type ChangelogData = {
ok: boolean
releases: ChangelogRelease[]
}
export async function loadChangelog(): Promise<ChangelogData> {
const response = await fetch("https://api.github.com/repos/anomalyco/opencode/releases?per_page=20", {
headers: {
Accept: "application/vnd.github.v3+json",
"User-Agent": "OpenCode-Console",
},
cf: {
// best-effort edge caching (ignored outside Cloudflare)
cacheTtl: 60 * 5,
cacheEverything: true,
},
} as RequestInit).catch(() => undefined)
if (!response?.ok) return { ok: false, releases: [] }
const data = await response.json().catch(() => undefined)
if (!Array.isArray(data)) return { ok: false, releases: [] }
const releases = (data as Release[]).map((release) => {
const parsed = parseMarkdown(release.body || "")
return {
tag: release.tag_name,
name: release.name,
date: release.published_at,
url: release.html_url,
highlights: parsed.highlights,
sections: parsed.sections,
}
})
return { ok: true, releases }
}
export const changelog = query(async () => {
"use server"
const result = await loadChangelog()
return result.releases
}, "changelog")
function parseHighlights(body: string): HighlightGroup[] {
const groups = new Map<string, HighlightItem[]>()
const regex = /<highlight\s+source="([^"]+)">([\s\S]*?)<\/highlight>/g
let match
while ((match = regex.exec(body)) !== null) {
const source = match[1]
const content = match[2]
const titleMatch = content.match(/<h2>([^<]+)<\/h2>/)
const pMatch = content.match(/<p(?:\s+short="([^"]*)")?>([^<]+)<\/p>/)
const imgMatch = content.match(/<img\s+width="([^"]+)"\s+height="([^"]+)"\s+alt="[^"]*"\s+src="([^"]+)"/)
const videoMatch = content.match(/^\s*(https:\/\/github\.com\/user-attachments\/assets\/[a-f0-9-]+)\s*$/m)
const media = (() => {
if (videoMatch) return { type: "video", src: videoMatch[1] } satisfies HighlightMedia
if (imgMatch) {
return {
type: "image",
src: imgMatch[3],
width: imgMatch[1],
height: imgMatch[2],
} satisfies HighlightMedia
}
})()
if (!titleMatch || !media) continue
const item: HighlightItem = {
title: titleMatch[1],
description: pMatch?.[2] || "",
shortDescription: pMatch?.[1],
media,
}
if (!groups.has(source)) groups.set(source, [])
groups.get(source)!.push(item)
}
return Array.from(groups.entries()).map(([source, items]) => ({ source, items }))
}
function parseMarkdown(body: string) {
const lines = body.split("\n")
const sections: { title: string; items: string[] }[] = []
let current: { title: string; items: string[] } | null = null
let skip = false
for (const line of lines) {
if (line.startsWith("## ")) {
if (current) sections.push(current)
current = { title: line.slice(3).trim(), items: [] }
skip = false
continue
}
if (line.startsWith("**Thank you")) {
skip = true
continue
}
if (line.startsWith("- ") && !skip) current?.items.push(line.slice(2).trim())
}
if (current) sections.push(current)
return { sections, highlights: parseHighlights(body) }
}

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