-
Notifications
You must be signed in to change notification settings - Fork 4
feat: plugin commands, theme/font pickers, and TUI improvements #223
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
15 files reviewed, 2 comments
| agent: input.agent, | ||
| cost: 0, | ||
| path: { | ||
| cwd, | ||
| cwd: Instance.directory, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
| 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logic: reverts fix from commit 0953f75 - should use session.directory instead
| 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.
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