Conversation
|
Hey! Your PR title Please update it to start with one of:
Where See CONTRIBUTING.md for details. |
Summary of ChangesHello @lacymorrow, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces a comprehensive "Shell/Agent Execution Mode" feature, significantly enhancing the interactive capabilities of the application's Terminal User Interface (TUI). This new mode allows for intelligent routing of user input between direct shell execution and AI agent processing, supported by robust shell-like functionalities such as tab completion and persistent working directory management. The implementation leverages a new plugin architecture designed to isolate feature logic and minimize changes to the upstream codebase. Concurrently, the PR establishes a dedicated release pipeline for the "Lash" project, including custom build and publishing scripts, and updates versioning across all packages. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces a significant new feature: a "lash" release pipeline and a "shell/agent" execution mode built with a plugin architecture. The changes are extensive, including new documentation, build scripts, and numerous source files for the plugin system. The core application code has been modified to integrate these new features. Overall, the implementation is well-structured and aligns with the design in the specification documents. My review focuses on the new code, architectural choices, and integration points, and I've identified a few issues related to correctness, performance, and consistency that should be addressed.
| const adjustedCompletions = | ||
| word.startsWith("~") && !word.startsWith("~") | ||
| ? completions | ||
| : word.startsWith("~") | ||
| ? completions.map((c) => collapseTilde(c)) | ||
| : completions |
There was a problem hiding this comment.
The condition on line 54, word.startsWith("~") && !word.startsWith("~"), will always evaluate to false, making the first branch of the ternary operator unreachable. This appears to be a typo.
The intended logic seems to be to adjust completions to use a tilde if the original word started with one. This can be simplified.
const adjustedCompletions = word.startsWith("~")
? completions.map((c) => collapseTilde(c))
: completions| 1. **Run the Release Script**: | ||
| 1. **Publish (with Build)**: | ||
| ```bash | ||
| bun run publish | ||
| ``` | ||
| This will build the artifacts and then **interactively prompt** for your NPM OTP to publish them. | ||
|
|
||
| **Skip Build:** If you have already built artifacts (e.g. via `bun run build`) and just want to publish: | ||
| ```bash | ||
| bun run publish --skip-build | ||
| ``` | ||
|
|
||
| 2. **NPM Publishing (Interactive)**: | ||
| - The script will pause and ask for your NPM 2FA/OTP code. | ||
| - Enter the code. The script will attempt to publish all packages. | ||
| - If the OTP expires, the script will pause and ask for a new code. | ||
| - You can Ctrl+C to skip remaining packages if needed. | ||
|
|
||
| ### 2. `packages/opencode/script/publish-lash.ts` | ||
| **The Build & Asset Transformer.** | ||
| This script is invoked by `release-lash.ts`. It: | ||
| 1. Imports `build-lash.ts` to build `lash` binaries directly. | ||
| 2. **Patches** the wrapper script (`bin/opencode` -> `bin/lash`) to use Lash branding and paths. | ||
| 3. **Packages** `lash-cli` for NPM. | ||
| 4. **Updates** `lacymorrow/homebrew-tap` with a new `lash.rb` formula. | ||
|
|
||
| ### 3. `packages/opencode/script/build-lash.ts` | ||
| **Lash-Specific Builder.** | ||
| A dedicated build script that outputs `lash` binaries directly, removing the need for renaming artifacts post-build. | ||
|
|
||
| ### 3. Helper Scripts |
There was a problem hiding this comment.
There are a couple of numbering issues in this document that could cause confusion:
- On lines 11-12, the nested list items are both numbered as
1.. The second one should be2.. - On line 41, the heading
### 3. Helper Scriptsis a duplicate of the heading number on line 37. This should be### 4. Helper Scriptsto maintain the correct sequence.
| // Poll for changes when not in a session (fallback for direct shell commands) | ||
| createEffect(() => { | ||
| const interval = setInterval(() => { | ||
| try { | ||
| const currentDir = getCwd() | ||
| if (workingDir() !== currentDir) { | ||
| setWorkingDirSignal(currentDir) | ||
| } | ||
| } catch { | ||
| // Instance not ready yet | ||
| } | ||
| }, 500) | ||
|
|
||
| onCleanup(() => clearInterval(interval)) | ||
| }) |
There was a problem hiding this comment.
The current implementation uses setInterval to poll for changes to the current working directory every 500ms. This is inefficient and can lead to unnecessary resource consumption.
A more efficient approach would be to use the event-driven system already in place. The cwd.ts module publishes a CwdEvent.Updated event on the Bus whenever the directory changes. Subscribing to this event would provide reactive updates without the need for polling. You'll need to import CwdEvent from @shell-mode and Bus from @/bus.
// Use event bus to reactively update working directory
createEffect(() => {
const unsub = Bus.subscribe(CwdEvent.Updated, (evt) => {
if (workingDir() !== evt.properties.cwd) {
setWorkingDirSignal(evt.properties.cwd);
}
});
onCleanup(unsub);
});
packages/sdk/openapi.json
Outdated
| "agent_cycle_reverse": { | ||
| "description": "Previous agent", | ||
| "default": "shift+tab", | ||
| "default": "tab", |
There was a problem hiding this comment.
The default value for agent_cycle_reverse is set to "tab" here, but it's set to "none" in packages/opencode/src/config/config.ts and documented as "none" in packages/web/src/content/docs/keybinds.mdx. To ensure consistency across the codebase and documentation, this should also be "none".
| "default": "tab", | |
| "default": "none", |
93b3c02 to
adb329d
Compare
- Force process exit after TUI thread completes to prevent lingering processes - Add 5-second timeout to worker shutdown to prevent indefinite hangs during cleanup
…nstead of auto denying (anomalyco#14060)
Co-authored-by: Aiden Cline <63023139+rekram1-node@users.noreply.github.com>
Use consistent strong color for active mode icons instead of different colors for shell vs normal mode, making the active state more visually clear to users.
We receive a large number of AI-generated security reports and don't have the resources to review them all. This policy clarifies that such submissions will result in an automatic ban to protect our maintainers' time.
shell configs like .zshrc don't get loaded without it
…ell-mode and branding Upstream changes incorporated: - feat: global session list (experimental) - feat: show/hide reasoning summaries setting - feat: custom ScrollView component replacing native scrolling - fix: plugin error handling (no more black screen on missing deps) - fix: snapshot respects git info/exclude - fix: large paste causing main thread lock - fix: terminal panel only renders active terminal - fix: session review re-rendering aggressively - fix: auto-scroll dock height handling - fix: patch tool renders like edit tool - desktop: beta icon set and beta channel publishing - desktop: sidecar spawn optimization - sdk: build to dist/ instead of dist/src - tests: consolidated prompt tests, added snapshot/pty/global-session tests Lash features preserved: - Shell mode plugin (auto/shell/agent execution modes) - TUI integration plugin (mode toggle, working dir tracking) - Natural language detection and rerouting - LASH CODE branding (logo, gradient, CLI) - Build/publish/release pipeline (lashcode npm, homebrew) - mode_toggle keybind (ctrl+space) - getCwd() integration in session/system prompts
All working tree changes after the upstream/dev merge (38c5667), saved before re-doing the merge cleanly. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…and workflow Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
What does this PR do?
How did you verify your code works?