feat: plugin commands, theme/font pickers, and TUI improvements#223
Merged
shuv1337 merged 11 commits intointegrationfrom Dec 31, 2025
Merged
feat: plugin commands, theme/font pickers, and TUI improvements#223shuv1337 merged 11 commits intointegrationfrom
shuv1337 merged 11 commits intointegrationfrom
Conversation
- Toggle button now visible whenever a session is active, not just when file changes exist - Review pane defaults to closed instead of open - Mobile review button registers when session exists - Allows users to access file browser before making changes
Handle variant_cycle at element level in prompt's onKeyDown handler. Global useKeyboard doesn't receive events properly when textarea is focused, so this keybind must be handled locally. Fixes #222
Discord release notifications now show the changelog (bullet list of changes) first, with contributor thank yous truncated first when hitting the 2000 character limit. Fixes #221
Set meslo as the default font for both sans and mono font families instead of Inter/IBM Plex Mono from upstream.
Cherry-picked from dev-pr branch (ba8144c) with conflict resolution: - Added 'type' field to Command.Info schema (template|plugin) - Added session-only guard for plugin commands - Pass 'arguments' to plugin command execute function - Preserved fork-specific bundleLocalPlugin and serverUrl features
Comment on lines
1086
to
1089
| agent: input.agent, | ||
| cost: 0, | ||
| path: { | ||
| cwd, | ||
| cwd: Instance.directory, |
There was a problem hiding this comment.
logic: reverts fix from commit 0953f75 that used session.directory for shell command cwd. the previous fix ensured correct working directory on first message in new projects.
Suggested change
| agent: input.agent, | |
| cost: 0, | |
| path: { | |
| cwd, | |
| cwd: Instance.directory, | |
| path: { | |
| cwd: session.directory, | |
| root: Instance.worktree, | |
| }, |
Prompt To Fix With AI
This is a comment left during a code review.
Path: packages/opencode/src/session/prompt.ts
Line: 1086:1089
Comment:
**logic:** reverts fix from commit 0953f75b that used `session.directory` for shell command cwd. the previous fix ensured correct working directory on first message in new projects.
```suggestion
path: {
cwd: session.directory,
root: Instance.worktree,
},
```
How can I resolve this? If you propose a fix, please make it concise.| } | ||
|
|
||
| const matchingInvocation = invocations[shellName] ?? invocations[""] | ||
| const args = matchingInvocation?.args |
There was a problem hiding this comment.
logic: reverts fix from commit 0953f75 - should use session.directory instead
Suggested change
| const args = matchingInvocation?.args | |
| cwd: session.directory, |
Prompt To Fix With AI
This is a comment left during a code review.
Path: packages/opencode/src/session/prompt.ts
Line: 1177:1177
Comment:
**logic:** reverts fix from commit 0953f75b - should use `session.directory` instead
```suggestion
cwd: session.directory,
```
How can I resolve this? If you propose a fix, please make it concise.Applied Greptile review suggestion - restores fix from commit 0953f75 that ensures shell commands use session.directory for correct working directory, especially on first message in new projects.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR merges several improvements from the shuvcode-dev branch including plugin command fixes, UI customization features, and code cleanup.
Changes
Features
Fixes
Tests
Chores
Breaking Changes
None
Testing
packages/opencode/test/command/plugin-commands.test.tsGreptile Summary
Merged improvements from
shuvcode-devbranch including plugin command fixes, theme/font pickers, and code cleanup.Major Changes:
typefield andargumentsparameterThemePickerandFontPickerto header and mobile sidebar for UI customizationIssues Found:
packages/opencode/src/session/prompt.ts: reverted previous fix (commit 0953f75) that usedsession.directoryinstead ofInstance.directoryfor shell commandcwd. This will break shell commands on first message in new projects.Confidence Score: 3/5
cwdhandling (reverting commit 0953f75) will cause shell commands to fail on first message in new projects. All other changes are solid.packages/opencode/src/session/prompt.ts- thecwdchanges on lines 1086 and 1177 revert a previous fix and will cause shell command failuresImportant Files Changed
Sequence Diagram
sequenceDiagram participant User participant TUI participant SessionPrompt participant Command participant Plugin participant PluginCommand User->>TUI: /hello world TUI->>SessionPrompt: command({command: "hello", arguments: "world"}) SessionPrompt->>Command: get("hello") Command->>Plugin: list() Plugin-->>Command: [plugin hooks] Command-->>SessionPrompt: {name: "hello", type: "plugin"} alt sessionOnly check SessionPrompt->>Session: get(sessionID) alt session not found Session-->>SessionPrompt: error SessionPrompt->>Bus: publish(Session.Event.Error) SessionPrompt-->>TUI: throw Error end end SessionPrompt->>Session: messages({limit: 1}) Session-->>SessionPrompt: lastMessageIDBefore SessionPrompt->>Plugin: client() Plugin-->>SessionPrompt: client SessionPrompt->>PluginCommand: execute({sessionID, arguments, client}) alt execution fails PluginCommand-->>SessionPrompt: throw error SessionPrompt->>Bus: publish(Session.Event.Error) SessionPrompt-->>TUI: throw error else execution succeeds PluginCommand->>Session: create new message PluginCommand-->>SessionPrompt: void SessionPrompt->>Session: messages({limit: 1}) Session-->>SessionPrompt: messagesAfter alt new message created SessionPrompt->>Bus: publish(Command.Event.Executed) SessionPrompt-->>TUI: return message else no new message SessionPrompt-->>TUI: return void end end