Skip to content

Conversation

@shuv1337
Copy link
Collaborator

@shuv1337 shuv1337 commented Dec 3, 2025

Summary

  • Merged upstream sst/opencode tag v1.0.129 into shuvcode fork
  • Resolved merge conflicts preserving both fork customizations and upstream improvements

Conflicts Resolved

  • .opencode/command/issues.md - accepted upstream (new file)
  • .opencode/command/spellcheck.md - accepted upstream (new file)
  • packages/opencode/src/cli/cmd/tui/routes/session/index.tsx - merged both features (kept our showTokens toggle + upstream's usernameVisible toggle)
  • packages/opencode/src/installation/index.ts - kept ours (shuvcode npm package name, no brew support needed)

Validation

  • bun install - completed
  • bun turbo typecheck - passed (11 packages)
  • bun turbo test - passed (204 pass, 1 skip, 0 fail)

Closes #78

Summary by CodeRabbit

  • New Features

    • Added session management command to list and manage sessions
    • Added username visibility toggle in TUI with persistent settings
    • Introduced /connect command for streamlined authentication flow
  • Bug Fixes

    • Fixed async operation promise handling for proper error propagation
    • Extended LSP initialization timeout for improved reliability
  • Documentation

    • Updated authentication flow documentation to reflect /connect command usage
    • Added keybind configuration documentation for username toggle
  • Chores

    • Version bumped to 1.0.129
    • Updated dependencies

✏️ Tip: You can customize this high-level summary in your review settings.

opencode-agent bot and others added 26 commits December 2, 2025 20:14
Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
Co-authored-by: rekram1-node <rekram1-node@users.noreply.github.com>
Co-authored-by: Aiden Cline <63023139+rekram1-node@users.noreply.github.com>
…ross all documentation

Users no longer need to exit the TUI to add providers - they can now use the /connect command directly in the terminal interface. Updated all provider setup instructions to use simplified format with /connect command instead of the deprecated opencode auth login CLI command. Added /connect to TUI commands reference and streamlined provider documentation to show clearer, more concise setup steps.
- fix scrollbox empty/blank last items at bottom
- fix should not insert chars with modifiers in input/textarea anymore
- do not wrap OSC4 palette sequences for tmux 3.6
- fix scrollbox empty/blank last items at bottom
- fix should not insert chars with modifiers in input/textarea anymore
- do not wrap OSC4 palette sequences for tmux 3.6
Resolved conflicts:
- .opencode/command/issues.md - accept upstream (new file)
- .opencode/command/spellcheck.md - accept upstream (new file)
- packages/opencode/src/cli/cmd/tui/routes/session/index.tsx - merged both (keep our showTokens + upstream usernameVisible)
- packages/opencode/src/installation/index.ts - keep ours (shuvcode npm package, no brew support)
@coderabbitai
Copy link

coderabbitai bot commented Dec 3, 2025

Walkthrough

Version bump to v1.0.129 across all packages. Introduces new session management CLI command with list subcommand, TUI username visibility toggle with persistence, documentation updates to reference new /connect command flow instead of legacy auth login, infrastructure changes including Cloudflare bucket modifications, and TypeScript type definition standardization via quoted property keys in resource interfaces.

Changes

Cohort / File(s) Summary
Version bumps (1.0.128 → 1.0.129)
packages/console/app/package.json, packages/console/core/package.json, packages/console/function/package.json, packages/console/mail/package.json, packages/desktop/package.json, packages/enterprise/package.json, packages/function/package.json, packages/opencode/package.json, packages/plugin/package.json, packages/slack/package.json, packages/tauri/package.json, packages/ui/package.json, packages/util/package.json, packages/web/package.json, packages/sdk/js/package.json, sdks/vscode/package.json, .github/last-synced-tag, packages/extensions/zed/extension.toml
Consistent patch version increment across all package manifests; extension TOML also updated with new release URLs for all platforms.
Session management CLI feature
packages/opencode/src/cli/cmd/session.ts, packages/opencode/src/index.ts
New session command with list subcommand supporting --max-count and --format options; outputs sessions in table or JSON format with optional pagination via less; integrates into main CLI.
TUI session username visibility
packages/opencode/src/cli/cmd/tui/routes/session/index.tsx
Adds usernameVisible state with KV persistence; conditional user message name rendering; exposes visibility flag in session context for downstream components.
TUI UI/UX refinements
packages/opencode/src/cli/cmd/tui/app.tsx, packages/desktop/src/pages/session.tsx, packages/enterprise/src/routes/share/[shareID].tsx
Theme switch handler signature updated to accept and clear dialog; experimental feature flag added to conditionally disable copy-on-select; session container padding now conditionally adjusts based on message count in non-wide layouts.
Configuration & keybinds
packages/opencode/src/config/config.ts, packages/web/src/content/docs/keybinds.mdx
New username_toggle keybind option (default "none") added to schema and documentation.
New OpenCode commands documentation
.opencode/command/issues.md, .opencode/command/commit.md, .opencode/command/spellcheck.md
New gh CLI issue search command documentation; minor description casing fix in commit command; new markdown spellcheck workflow definition.
TypeScript type definitions (quoted keys)
packages/console/core/sst-env.d.ts, packages/console/function/sst-env.d.ts, packages/console/resource/sst-env.d.ts, packages/enterprise/sst-env.d.ts, packages/function/sst-env.d.ts, sst-env.d.ts
All Resource interface property keys converted from unquoted identifiers to quoted string literals; new ZEN_MODELS4 secret added; Cloudflare resource types consistently quoted.
Infrastructure changes
infra/console.ts, nix/hashes.json
Removal of local "ConsoleData" Cloudflare bucket instantiation; Nix node_modules hash updated.
Provider & installation improvements
packages/opencode/src/provider/provider.ts, packages/opencode/src/installation/index.ts, packages/opencode/src/lsp/client.ts, packages/opencode/src/upgrade.ts
GitHub Copilot Enterprise added to npm SDK alias mapping; latest() function signature updated to accept optional install method parameter; LSP initialize timeout increased from 5s to 45s; upgrade flow refactored to obtain install method once and pass to latest().
File handling & theme resolution
packages/opencode/src/file/index.ts, packages/opencode/src/cli/cmd/tui/context/theme.tsx
List function now aggregates patterns from both .gitignore and .ignore files; color resolution updated to treat explicitly defined null values as valid via != null check.
Feature flagging
packages/opencode/src/flag/flag.ts
New experimental flag OPENCODE_EXPERIMENTAL_DISABLE_COPY_ON_SELECT added for conditional feature control.
Plugin API updates
packages/plugin/src/index.ts
New ProviderContext type exported; Hooks["chat.params"] input signature updated to use ProviderContext instead of Provider for richer provider context (source, info, options).
Documentation: authentication flow
packages/web/src/content/docs/index.mdx, packages/web/src/content/docs/config.mdx, packages/web/src/content/docs/providers.mdx, packages/web/src/content/docs/troubleshooting.mdx, packages/web/src/content/docs/models.mdx, packages/web/src/content/docs/zen.mdx
Comprehensive updates replacing opencode auth login references with new /connect TUI command flow across multiple provider and authentication guides.
TUI documentation
packages/web/src/content/docs/tui.mdx
New /connect command documentation added; new "View customization" section describing username display toggle and settings persistence.
Python SDK type stub
packages/sdk/python/sst.pyi
Removal of nested ConsoleData class from Resource.Console type stub.
Formatter & module exports
.prettierignore, packages/console/app/sst-env.d.ts, packages/console/mail/sst-env.d.ts, packages/desktop/sst-env.d.ts, packages/opencode/sst-env.d.ts, packages/plugin/sst-env.d.ts, packages/script/sst-env.d.ts, packages/sdk/js/sst-env.d.ts, packages/slack/sst-env.d.ts, packages/tauri/sst-env.d.ts, packages/ui/sst-env.d.ts, packages/util/sst-env.d.ts, packages/web/sst-env.d.ts, sdks/vscode/sst-env.d.ts, github/sst-env.d.ts
Prettier configuration added to ignore sst-env.d.ts; multiple sst-env files updated with formatting/export standardization; packages/desktop/src/sst-env.d.ts ImportMetaEnv interface reformatted with expanded braces.
Core provider & session logic
packages/console/core/src/provider.ts
Added explicit return statements for Database.use(...) promises in async handlers to ensure proper promise propagation and error handling.
Contributors
script/publish.ts
"iamdavidhill" added to contributors array for changelog and commit attribution.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45–70 minutes

Areas requiring attention:

  • New session CLI command (packages/opencode/src/cli/cmd/session.ts): Verify Session.list() filtering logic, sort order, pagination through less process, and output formatting (table vs. JSON).
  • Username visibility persistence & context propagation (packages/opencode/src/cli/cmd/tui/routes/session/index.tsx): Confirm KV key naming consistency, context exposure to downstream consumers, and conditional rendering correctness.
  • TUI dialog & copy-on-select flag integration (packages/opencode/src/cli/cmd/tui/app.tsx): Validate feature flag condition and dialog.clear() invocation in theme switch handler.
  • Type definition standardization (multiple sst-env.d.ts files): While repetitive, verify consistency of quoted keys, new ZEN_MODELS4 property, and removal of ConsoleData across all packages.
  • Infrastructure changes (infra/console.ts, nix/hashes.json, packages/sdk/python/sst.pyi): Confirm ConsoleData bucket removal does not break existing integrations; validate nix hash update correctness.
  • LSP timeout increase (packages/opencode/src/lsp/client.ts): Ensure 45s timeout is appropriate for initialization scenarios and doesn't mask real issues.
  • Installation method flow refactor (packages/opencode/src/upgrade.ts, packages/opencode/src/installation/index.ts): Verify method parameter passes correctly and doesn't break autoupdate logic.
  • Documentation comprehensiveness: All /connect references should be consistent across guides; validate examples match new TUI flow.

Possibly related PRs

  • Integration #32: Overlapping TUI session command handler modifications and context propagation edits in packages/opencode/src/cli/cmd/tui/ paths.
  • Merge Dev into Integration #30: Related package version manifest updates across multiple packages/*/package.json files.

Poem

🐰 Version bumps in every place,
New commands sprint at quickened pace!
Sessions listed, usernames hide,
Connect flows now lead the tide.
Quoted keys in types align—
Patches polish, all refined!

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title 'sync: merge upstream v1.0.129' clearly and concisely describes the main change: merging upstream v1.0.129 into the shuvcode fork.
Linked Issues check ✅ Passed The PR successfully addresses all coding requirements from issue #78: resolved all four conflicting files, validated with bun install/typecheck/test, and maintained fork customizations while integrating upstream improvements.
Out of Scope Changes check ✅ Passed All changes are within scope: version bumps, package updates, configuration changes, new features (session/username toggles), and documentation updates directly relate to the v1.0.129 merge.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch opencode/issue78-20251203114126

Comment @coderabbitai help to get the list of available commands and usage tips.

Co-authored-by: kcrommett <kcrommett@users.noreply.github.com>
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (3)
packages/opencode/src/file/index.ts (1)

280-287: Consider parallelizing file reads for better performance.

The existence checks and file reads for .gitignore and .ignore are currently sequential. Based on coding guidelines emphasizing parallel operations for multiple file reads, consider refactoring to read both files concurrently.

Apply this diff to parallelize the file operations:

-    const gitignore = Bun.file(path.join(Instance.worktree, ".gitignore"))
-    if (await gitignore.exists()) {
-      ig.add(await gitignore.text())
-    }
-    const ignoreFile = Bun.file(path.join(Instance.worktree, ".ignore"))
-    if (await ignoreFile.exists()) {
-      ig.add(await ignoreFile.text())
-    }
+    const gitignore = Bun.file(path.join(Instance.worktree, ".gitignore"))
+    const ignoreFile = Bun.file(path.join(Instance.worktree, ".ignore"))
+    const [gitignoreText, ignoreText] = await Promise.all([
+      gitignore.exists().then(exists => exists ? gitignore.text() : ""),
+      ignoreFile.exists().then(exists => exists ? ignoreFile.text() : "")
+    ])
+    if (gitignoreText) ig.add(gitignoreText)
+    if (ignoreText) ig.add(ignoreText)
packages/plugin/src/index.ts (1)

19-23: Consider replacing any with unknown or a more specific type.

The options field uses Record<string, any>, which reduces type safety. As per coding guidelines, avoid using any in TypeScript files.

Apply this diff to improve type safety:

 export type ProviderContext = {
   source: "env" | "config" | "custom" | "api"
   info: Provider
-  options: Record<string, any>
+  options: Record<string, unknown>
 }

If provider options have a known structure, consider defining a more specific type instead.

packages/enterprise/src/routes/share/[shareID].tsx (1)

283-290: Align non‑wide padding for the 0‑message case between header and content

Right now, when !wide() and messages().length === 0, the header wrapper gets no px/pl/pr classes, while the SessionTurn container falls back to "px-6". Previously, non‑wide always used "pr-6 pl-18", so the 0‑message layout no longer matches that behavior or the multi‑message case.

If you want 0 messages to behave like the old non‑wide layout and stay in sync with the SessionTurn container, consider inverting the conditions, e.g.:

-      "pr-6 pl-18": !wide() && messages().length > 1,
-      "px-6": !wide() && messages().length === 1,
+      "pr-6 pl-18": !wide() && messages().length !== 1,
+      "px-6": !wide() && messages().length === 1,

and

-  (wide() ? "max-w-146 mx-auto px-6" : messages().length > 1 ? "pr-6 pl-18" : "px-6"),
+  (wide() ? "max-w-146 mx-auto px-6" : messages().length === 1 ? "px-6" : "pr-6 pl-18"),

Also applies to: 306-309

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3e71c5b and aaa1b57.

⛔ Files ignored due to path filters (3)
  • bun.lock is excluded by !**/*.lock
  • flake.lock is excluded by !**/*.lock
  • packages/sdk/js/src/gen/types.gen.ts is excluded by !**/gen/**
📒 Files selected for processing (71)
  • .github/last-synced-tag (1 hunks)
  • .opencode/command/commit.md (1 hunks)
  • .opencode/command/issues.md (1 hunks)
  • .opencode/command/spellcheck.md (1 hunks)
  • .prettierignore (1 hunks)
  • github/sst-env.d.ts (1 hunks)
  • infra/console.ts (0 hunks)
  • nix/hashes.json (1 hunks)
  • packages/console/app/package.json (1 hunks)
  • packages/console/app/sst-env.d.ts (1 hunks)
  • packages/console/core/package.json (1 hunks)
  • packages/console/core/src/provider.ts (1 hunks)
  • packages/console/core/sst-env.d.ts (1 hunks)
  • packages/console/function/package.json (1 hunks)
  • packages/console/function/sst-env.d.ts (1 hunks)
  • packages/console/mail/package.json (1 hunks)
  • packages/console/mail/sst-env.d.ts (1 hunks)
  • packages/console/resource/sst-env.d.ts (1 hunks)
  • packages/desktop/package.json (1 hunks)
  • packages/desktop/src/pages/session.tsx (1 hunks)
  • packages/desktop/src/sst-env.d.ts (1 hunks)
  • packages/desktop/sst-env.d.ts (1 hunks)
  • packages/enterprise/package.json (1 hunks)
  • packages/enterprise/src/routes/share/[shareID].tsx (2 hunks)
  • packages/enterprise/sst-env.d.ts (1 hunks)
  • packages/extensions/zed/extension.toml (2 hunks)
  • packages/function/package.json (1 hunks)
  • packages/function/sst-env.d.ts (1 hunks)
  • packages/opencode/package.json (2 hunks)
  • packages/opencode/src/cli/cmd/session.ts (1 hunks)
  • packages/opencode/src/cli/cmd/tui/app.tsx (3 hunks)
  • packages/opencode/src/cli/cmd/tui/context/theme.tsx (1 hunks)
  • packages/opencode/src/cli/cmd/tui/routes/session/index.tsx (6 hunks)
  • packages/opencode/src/cli/upgrade.ts (1 hunks)
  • packages/opencode/src/config/config.ts (1 hunks)
  • packages/opencode/src/file/index.ts (1 hunks)
  • packages/opencode/src/flag/flag.ts (1 hunks)
  • packages/opencode/src/index.ts (2 hunks)
  • packages/opencode/src/installation/index.ts (1 hunks)
  • packages/opencode/src/lsp/client.ts (1 hunks)
  • packages/opencode/src/provider/provider.ts (1 hunks)
  • packages/opencode/sst-env.d.ts (1 hunks)
  • packages/plugin/package.json (1 hunks)
  • packages/plugin/src/index.ts (2 hunks)
  • packages/plugin/sst-env.d.ts (1 hunks)
  • packages/script/sst-env.d.ts (1 hunks)
  • packages/sdk/js/package.json (1 hunks)
  • packages/sdk/js/sst-env.d.ts (1 hunks)
  • packages/sdk/python/sst.pyi (0 hunks)
  • packages/slack/package.json (1 hunks)
  • packages/slack/sst-env.d.ts (1 hunks)
  • packages/tauri/package.json (1 hunks)
  • packages/tauri/sst-env.d.ts (1 hunks)
  • packages/ui/package.json (1 hunks)
  • packages/ui/sst-env.d.ts (1 hunks)
  • packages/util/package.json (1 hunks)
  • packages/util/sst-env.d.ts (1 hunks)
  • packages/web/package.json (1 hunks)
  • packages/web/src/content/docs/config.mdx (1 hunks)
  • packages/web/src/content/docs/index.mdx (1 hunks)
  • packages/web/src/content/docs/keybinds.mdx (1 hunks)
  • packages/web/src/content/docs/models.mdx (1 hunks)
  • packages/web/src/content/docs/providers.mdx (20 hunks)
  • packages/web/src/content/docs/troubleshooting.mdx (3 hunks)
  • packages/web/src/content/docs/tui.mdx (2 hunks)
  • packages/web/src/content/docs/zen.mdx (1 hunks)
  • packages/web/sst-env.d.ts (1 hunks)
  • script/publish.ts (1 hunks)
  • sdks/vscode/package.json (1 hunks)
  • sdks/vscode/sst-env.d.ts (1 hunks)
  • sst-env.d.ts (1 hunks)
💤 Files with no reviewable changes (2)
  • infra/console.ts
  • packages/sdk/python/sst.pyi
🧰 Additional context used
📓 Path-based instructions (10)
**/*.{js,ts,jsx,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{js,ts,jsx,tsx}: Try to keep things in one function unless composable or reusable
DO NOT do unnecessary destructuring of variables
DO NOT use else statements unless necessary
DO NOT use try/catch if it can be avoided
AVOID try/catch where possible
AVOID else statements
AVOID let statements
PREFER single word variable names where possible
Use as many bun APIs as possible like Bun.file()
ALWAYS USE PARALLEL TOOLS WHEN APPLICABLE for multiple file reads and operations

Files:

  • script/publish.ts
  • packages/opencode/src/installation/index.ts
  • packages/opencode/src/config/config.ts
  • packages/opencode/src/lsp/client.ts
  • packages/enterprise/src/routes/share/[shareID].tsx
  • packages/sdk/js/sst-env.d.ts
  • packages/opencode/src/cli/cmd/session.ts
  • packages/desktop/src/pages/session.tsx
  • packages/tauri/sst-env.d.ts
  • packages/opencode/src/flag/flag.ts
  • packages/opencode/src/file/index.ts
  • packages/console/core/src/provider.ts
  • packages/plugin/src/index.ts
  • packages/console/app/sst-env.d.ts
  • packages/opencode/src/index.ts
  • github/sst-env.d.ts
  • packages/opencode/src/provider/provider.ts
  • packages/console/mail/sst-env.d.ts
  • packages/opencode/sst-env.d.ts
  • packages/util/sst-env.d.ts
  • packages/console/function/sst-env.d.ts
  • packages/web/sst-env.d.ts
  • packages/script/sst-env.d.ts
  • packages/opencode/src/cli/upgrade.ts
  • packages/desktop/sst-env.d.ts
  • packages/plugin/sst-env.d.ts
  • sdks/vscode/sst-env.d.ts
  • packages/opencode/src/cli/cmd/tui/context/theme.tsx
  • packages/opencode/src/cli/cmd/tui/app.tsx
  • packages/slack/sst-env.d.ts
  • packages/desktop/src/sst-env.d.ts
  • packages/opencode/src/cli/cmd/tui/routes/session/index.tsx
  • packages/ui/sst-env.d.ts
  • sst-env.d.ts
  • packages/console/resource/sst-env.d.ts
  • packages/enterprise/sst-env.d.ts
  • packages/function/sst-env.d.ts
  • packages/console/core/sst-env.d.ts
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

AVOID using any type

Files:

  • script/publish.ts
  • packages/opencode/src/installation/index.ts
  • packages/opencode/src/config/config.ts
  • packages/opencode/src/lsp/client.ts
  • packages/enterprise/src/routes/share/[shareID].tsx
  • packages/sdk/js/sst-env.d.ts
  • packages/opencode/src/cli/cmd/session.ts
  • packages/desktop/src/pages/session.tsx
  • packages/tauri/sst-env.d.ts
  • packages/opencode/src/flag/flag.ts
  • packages/opencode/src/file/index.ts
  • packages/console/core/src/provider.ts
  • packages/plugin/src/index.ts
  • packages/console/app/sst-env.d.ts
  • packages/opencode/src/index.ts
  • github/sst-env.d.ts
  • packages/opencode/src/provider/provider.ts
  • packages/console/mail/sst-env.d.ts
  • packages/opencode/sst-env.d.ts
  • packages/util/sst-env.d.ts
  • packages/console/function/sst-env.d.ts
  • packages/web/sst-env.d.ts
  • packages/script/sst-env.d.ts
  • packages/opencode/src/cli/upgrade.ts
  • packages/desktop/sst-env.d.ts
  • packages/plugin/sst-env.d.ts
  • sdks/vscode/sst-env.d.ts
  • packages/opencode/src/cli/cmd/tui/context/theme.tsx
  • packages/opencode/src/cli/cmd/tui/app.tsx
  • packages/slack/sst-env.d.ts
  • packages/desktop/src/sst-env.d.ts
  • packages/opencode/src/cli/cmd/tui/routes/session/index.tsx
  • packages/ui/sst-env.d.ts
  • sst-env.d.ts
  • packages/console/resource/sst-env.d.ts
  • packages/enterprise/sst-env.d.ts
  • packages/function/sst-env.d.ts
  • packages/console/core/sst-env.d.ts
packages/opencode/**/*.ts

📄 CodeRabbit inference engine (packages/opencode/AGENTS.md)

packages/opencode/**/*.ts: Use Bun with TypeScript ESM modules as the runtime
Organize file structure using namespace-based organization (e.g., Tool.define(), Session.create())
Validate all inputs with Zod schemas
Use Log.create({ service: "name" }) pattern for logging
Use Storage namespace for persistence operations

Files:

  • packages/opencode/src/installation/index.ts
  • packages/opencode/src/config/config.ts
  • packages/opencode/src/lsp/client.ts
  • packages/opencode/src/cli/cmd/session.ts
  • packages/opencode/src/flag/flag.ts
  • packages/opencode/src/file/index.ts
  • packages/opencode/src/index.ts
  • packages/opencode/src/provider/provider.ts
  • packages/opencode/sst-env.d.ts
  • packages/opencode/src/cli/upgrade.ts
packages/opencode/**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (packages/opencode/AGENTS.md)

packages/opencode/**/*.{ts,tsx,js,jsx}: Use relative imports for local modules, with named imports preferred
Use camelCase for variable and function names
Use PascalCase for classes and namespaces

Files:

  • packages/opencode/src/installation/index.ts
  • packages/opencode/src/config/config.ts
  • packages/opencode/src/lsp/client.ts
  • packages/opencode/src/cli/cmd/session.ts
  • packages/opencode/src/flag/flag.ts
  • packages/opencode/src/file/index.ts
  • packages/opencode/src/index.ts
  • packages/opencode/src/provider/provider.ts
  • packages/opencode/sst-env.d.ts
  • packages/opencode/src/cli/upgrade.ts
  • packages/opencode/src/cli/cmd/tui/context/theme.tsx
  • packages/opencode/src/cli/cmd/tui/app.tsx
  • packages/opencode/src/cli/cmd/tui/routes/session/index.tsx
packages/opencode/**/*.{ts,tsx}

📄 CodeRabbit inference engine (packages/opencode/AGENTS.md)

packages/opencode/**/*.{ts,tsx}: Use Zod schemas for validation and TypeScript interfaces for structure
Use Result patterns for error handling; avoid throwing exceptions in tools

Files:

  • packages/opencode/src/installation/index.ts
  • packages/opencode/src/config/config.ts
  • packages/opencode/src/lsp/client.ts
  • packages/opencode/src/cli/cmd/session.ts
  • packages/opencode/src/flag/flag.ts
  • packages/opencode/src/file/index.ts
  • packages/opencode/src/index.ts
  • packages/opencode/src/provider/provider.ts
  • packages/opencode/sst-env.d.ts
  • packages/opencode/src/cli/upgrade.ts
  • packages/opencode/src/cli/cmd/tui/context/theme.tsx
  • packages/opencode/src/cli/cmd/tui/app.tsx
  • packages/opencode/src/cli/cmd/tui/routes/session/index.tsx
packages/desktop/**/*.{ts,tsx}

📄 CodeRabbit inference engine (packages/desktop/AGENTS.md)

packages/desktop/**/*.{ts,tsx}: Use SolidJS with TypeScript as the primary framework
Use @/ alias for src/ directory imports (e.g., import Button from "@/ui/button")
Use function declarations and splitProps for SolidJS component props
Define interfaces for component props and avoid using any type
Use PascalCase for component names
Use camelCase for variable and function names

Files:

  • packages/desktop/src/pages/session.tsx
  • packages/desktop/sst-env.d.ts
  • packages/desktop/src/sst-env.d.ts
packages/desktop/**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (packages/desktop/AGENTS.md)

Apply Prettier formatting with semicolons disabled and 120 character line width

Files:

  • packages/desktop/src/pages/session.tsx
  • packages/desktop/sst-env.d.ts
  • packages/desktop/src/sst-env.d.ts
packages/desktop/**/*.{css,ts,tsx}

📄 CodeRabbit inference engine (packages/desktop/AGENTS.md)

Use TailwindCSS with custom CSS variables theme system for styling

Files:

  • packages/desktop/src/pages/session.tsx
  • packages/desktop/sst-env.d.ts
  • packages/desktop/src/sst-env.d.ts
packages/desktop/**/*

📄 CodeRabbit inference engine (packages/desktop/AGENTS.md)

Use snake_case for file names

Files:

  • packages/desktop/src/pages/session.tsx
  • packages/desktop/package.json
  • packages/desktop/sst-env.d.ts
  • packages/desktop/src/sst-env.d.ts
packages/desktop/**/pages/**/*.{ts,tsx}

📄 CodeRabbit inference engine (packages/desktop/AGENTS.md)

Place pages in /pages/ directory

Files:

  • packages/desktop/src/pages/session.tsx
🧠 Learnings (12)
📚 Learning: 2025-12-02T19:05:23.612Z
Learnt from: CR
Repo: Latitudes-Dev/shuvcode PR: 0
File: packages/opencode/AGENTS.md:0-0
Timestamp: 2025-12-02T19:05:23.612Z
Learning: Applies to packages/opencode/**/*.{ts,tsx} : Use Zod schemas for validation and TypeScript interfaces for structure

Applied to files:

  • packages/sdk/js/package.json
  • packages/opencode/package.json
📚 Learning: 2025-12-02T19:05:23.612Z
Learnt from: CR
Repo: Latitudes-Dev/shuvcode PR: 0
File: packages/opencode/AGENTS.md:0-0
Timestamp: 2025-12-02T19:05:23.612Z
Learning: Applies to packages/opencode/**/*.ts : Validate all inputs with Zod schemas

Applied to files:

  • packages/sdk/js/package.json
  • packages/opencode/package.json
📚 Learning: 2025-12-02T19:05:23.612Z
Learnt from: CR
Repo: Latitudes-Dev/shuvcode PR: 0
File: packages/opencode/AGENTS.md:0-0
Timestamp: 2025-12-02T19:05:23.612Z
Learning: Applies to packages/opencode/**/*.{ts,tsx,js,jsx} : Use relative imports for local modules, with named imports preferred

Applied to files:

  • packages/ui/package.json
📚 Learning: 2025-12-02T19:05:12.064Z
Learnt from: CR
Repo: Latitudes-Dev/shuvcode PR: 0
File: packages/desktop/AGENTS.md:0-0
Timestamp: 2025-12-02T19:05:12.064Z
Learning: Applies to packages/desktop/**/*.{ts,tsx,js,jsx} : Apply Prettier formatting with semicolons disabled and 120 character line width

Applied to files:

  • .prettierignore
📚 Learning: 2025-12-02T19:05:12.064Z
Learnt from: CR
Repo: Latitudes-Dev/shuvcode PR: 0
File: packages/desktop/AGENTS.md:0-0
Timestamp: 2025-12-02T19:05:12.064Z
Learning: Applies to packages/desktop/**/*.{ts,tsx} : Use SolidJS with TypeScript as the primary framework

Applied to files:

  • .prettierignore
  • packages/opencode/package.json
  • packages/opencode/src/cli/cmd/tui/app.tsx
📚 Learning: 2025-12-02T19:05:12.064Z
Learnt from: CR
Repo: Latitudes-Dev/shuvcode PR: 0
File: packages/desktop/AGENTS.md:0-0
Timestamp: 2025-12-02T19:05:12.064Z
Learning: Applies to packages/desktop/**/*.{ts,tsx} : Use function declarations and splitProps for SolidJS component props

Applied to files:

  • packages/enterprise/src/routes/share/[shareID].tsx
  • packages/desktop/src/pages/session.tsx
  • packages/opencode/sst-env.d.ts
  • packages/opencode/src/cli/cmd/tui/app.tsx
  • packages/desktop/src/sst-env.d.ts
📚 Learning: 2025-12-02T19:05:23.612Z
Learnt from: CR
Repo: Latitudes-Dev/shuvcode PR: 0
File: packages/opencode/AGENTS.md:0-0
Timestamp: 2025-12-02T19:05:23.612Z
Learning: Applies to packages/opencode/**/*.ts : Organize file structure using namespace-based organization (e.g., `Tool.define()`, `Session.create()`)

Applied to files:

  • packages/opencode/src/cli/cmd/session.ts
  • packages/opencode/src/index.ts
  • packages/opencode/sst-env.d.ts
  • packages/opencode/package.json
📚 Learning: 2025-12-02T19:05:23.612Z
Learnt from: CR
Repo: Latitudes-Dev/shuvcode PR: 0
File: packages/opencode/AGENTS.md:0-0
Timestamp: 2025-12-02T19:05:23.612Z
Learning: Applies to packages/opencode/**/tools/**/*.ts : Pass `sessionID` in tool context and use `App.provide()` for dependency injection

Applied to files:

  • packages/opencode/src/cli/cmd/session.ts
  • packages/plugin/src/index.ts
  • packages/opencode/src/index.ts
  • packages/opencode/src/provider/provider.ts
📚 Learning: 2025-12-02T19:05:23.612Z
Learnt from: CR
Repo: Latitudes-Dev/shuvcode PR: 0
File: packages/opencode/AGENTS.md:0-0
Timestamp: 2025-12-02T19:05:23.612Z
Learning: Applies to packages/opencode/**/tools/**/*.ts : Implement tools with the `Tool.Info` interface including an `execute()` method

Applied to files:

  • packages/plugin/src/index.ts
📚 Learning: 2025-12-02T19:05:23.612Z
Learnt from: CR
Repo: Latitudes-Dev/shuvcode PR: 0
File: packages/opencode/AGENTS.md:0-0
Timestamp: 2025-12-02T19:05:23.612Z
Learning: Applies to packages/opencode/**/*.ts : Use Bun with TypeScript ESM modules as the runtime

Applied to files:

  • packages/opencode/package.json
📚 Learning: 2025-12-02T19:26:11.008Z
Learnt from: CR
Repo: Latitudes-Dev/shuvcode PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-02T19:26:11.008Z
Learning: To test opencode in the `packages/opencode` directory you can run `bun dev`

Applied to files:

  • packages/opencode/package.json
  • packages/web/src/content/docs/troubleshooting.mdx
📚 Learning: 2025-12-02T19:05:12.064Z
Learnt from: CR
Repo: Latitudes-Dev/shuvcode PR: 0
File: packages/desktop/AGENTS.md:0-0
Timestamp: 2025-12-02T19:05:12.064Z
Learning: Applies to packages/desktop/**/*.{ts,tsx} : Define interfaces for component props and avoid using `any` type

Applied to files:

  • packages/desktop/src/sst-env.d.ts
🧬 Code graph analysis (11)
packages/opencode/src/installation/index.ts (1)
packages/opencode/src/provider/auth.ts (2)
  • Method (21-28)
  • Method (29-29)
packages/opencode/src/cli/cmd/session.ts (2)
packages/opencode/src/cli/cmd/cmd.ts (1)
  • cmd (5-7)
packages/opencode/src/cli/bootstrap.ts (1)
  • bootstrap (4-17)
packages/opencode/src/file/index.ts (1)
packages/opencode/src/project/instance.ts (1)
  • Instance (15-68)
packages/plugin/src/index.ts (1)
packages/sdk/js/src/gen/types.gen.ts (3)
  • Provider (1400-1409)
  • Model (1359-1398)
  • UserMessage (47-70)
packages/opencode/src/index.ts (1)
packages/opencode/src/cli/cmd/session.ts (1)
  • SessionCommand (9-14)
packages/opencode/src/cli/upgrade.ts (1)
packages/opencode/src/installation/index.ts (2)
  • method (63-101)
  • latest (152-167)
packages/opencode/src/cli/cmd/tui/app.tsx (1)
packages/opencode/src/cli/cmd/tui/context/theme.tsx (2)
  • setMode (311-314)
  • mode (308-310)
packages/console/resource/sst-env.d.ts (4)
packages/console/core/sst-env.d.ts (2)
  • Resource (8-117)
  • Resource (122-131)
sst-env.d.ts (1)
  • Resource (7-147)
packages/console/resource/resource.node.ts (1)
  • Resource (9-70)
packages/console/resource/resource.cloudflare.ts (1)
  • Resource (4-19)
packages/enterprise/sst-env.d.ts (3)
packages/console/core/sst-env.d.ts (2)
  • Resource (8-117)
  • Resource (122-131)
packages/console/resource/sst-env.d.ts (2)
  • Resource (8-117)
  • Resource (122-131)
sst-env.d.ts (1)
  • Resource (7-147)
packages/function/sst-env.d.ts (2)
packages/console/core/sst-env.d.ts (2)
  • Resource (8-117)
  • Resource (122-131)
sst-env.d.ts (1)
  • Resource (7-147)
packages/console/core/sst-env.d.ts (5)
packages/console/function/sst-env.d.ts (2)
  • Resource (8-117)
  • Resource (122-131)
packages/console/resource/sst-env.d.ts (2)
  • Resource (8-117)
  • Resource (122-131)
sst-env.d.ts (1)
  • Resource (7-147)
packages/console/resource/resource.node.ts (1)
  • Resource (9-70)
packages/console/resource/resource.cloudflare.ts (1)
  • Resource (4-19)
🪛 LanguageTool
packages/web/src/content/docs/providers.mdx

[grammar] ~322-~322: Ensure spelling is correct
Context: ... txt /models --- ### Cortecs 1. Head over to the [Cortecs console](https...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

🔇 Additional comments (81)
sdks/vscode/package.json (1)

5-5: Version bump is consistent with upstream sync.

The version change to 1.0.129 aligns with the multi-package version alignment for the upstream sync PR. Given that validation has already passed (bun install, typecheck, tests), this change is safe to merge.

packages/extensions/zed/extension.toml (1)

4-4: Version and archive URLs correctly updated to v1.0.129.

All platform-specific archive URLs have been updated consistently to point to the v1.0.129 releases, with correct platform naming conventions (arm64/x64 mappings align with the targets). The version field on Line 4 matches all archive URLs. No issues detected.

Also applies to: 14-14, 19-19, 24-24, 29-29, 34-34

nix/hashes.json (1)

2-2: Hash update is correct and expected for this version bump.

The nodeModules hash has been updated to reflect the new dependency tree resulting from the v1.0.129 version bumps across packages. The PR validation (bun install, turbo typecheck, turbo test) has already confirmed the correctness of the resolved dependencies.

script/publish.ts (1)

79-90: LGTM! Team member attribution correctly updated.

The addition of "iamdavidhill" to the team array appropriately excludes this user from the community contributors section of the changelog, consistent with the upstream merge from v1.0.129.

packages/opencode/src/file/index.ts (1)

279-288: LGTM! Correctly implements combined ignore pattern matching.

The implementation correctly aggregates patterns from both .gitignore and .ignore files into a single matcher. The use of .bind(ig) at line 288 properly preserves the method context for later invocation.

packages/opencode/src/cli/cmd/tui/context/theme.tsx (1)

164-164: LGTM! Improved null-check semantics.

The change from truthy check to explicit != null is more semantically correct for testing property existence in a Record. This properly distinguishes between "key not present" (undefined) versus "key present with a value," following TypeScript/JavaScript best practices.

packages/web/src/content/docs/zen.mdx (1)

54-54: Updated documentation accurately reflects new /connect onboarding flow.

The change from legacy auth to the new TUI-based /connect command is clear and consistent with updates across other documentation files. The wording aligns well with the user experience.

packages/web/src/content/docs/troubleshooting.mdx (2)

67-77: Documentation improvements enhance consistency and user guidance.

Capitalization of the "OpenCode won't start" title and the addition of the opencode upgrade suggestion improve clarity. The updated authentication steps appropriately reference the new /connect command workflow.


103-116: ProviderInitError troubleshooting properly updated for new workflow.

The replacement of CLI re-authentication with TUI-based /connect instruction is consistent with the new connection flow and provides users with the correct remediation path.

packages/web/src/content/docs/models.mdx (1)

12-12: Provider credentials documentation correctly references /connect flow.

The update accurately describes how credentials added through the new /connect command become available to OpenCode, maintaining consistency with the broader documentation migration.

packages/web/src/content/docs/config.mdx (1)

362-367: Disabled providers documentation correctly explains /connect behavior.

The addition explaining that providers won't load even if configured through /connect is accurate and important for users understanding the disabled_providers configuration option.

packages/web/src/content/docs/tui.mdx (2)

72-80: New /connect command documentation is clear but lacks keybind information.

The command description and usage example are helpful, but the documentation doesn't include a keybind like most other commands (e.g., ctrl+x m for /models). Verify whether /connect should have a keybind assignment for consistency with the command palette interface.

Does the /connect command have an assigned keybind that should be documented here?


364-373: New "View customization" section for username toggle is well-documented.

The addition clearly explains the username display toggle feature, access method via command palette, and persistence of settings. This properly documents the new TUI customization capability introduced in v1.0.129.

packages/web/src/content/docs/providers.mdx (7)

13-13: Provider setup documentation updated to reference /connect command.

The top-level credentials guidance now correctly directs users to the new /connect command for adding provider API keys, establishing the correct workflow from the start.


20-21: Credentials storage documentation accurately reflects new /connect workflow.

The documentation correctly explains that credentials added via /connect are stored in ~/.local/share/opencode/auth.json, maintaining clarity about where sensitive data is persisted.


60-76: OpenCode Zen onboarding properly refactored for /connect flow.

The updated instructions now guide users through the new TUI-based /connect command with code examples showing the command and resulting UI for API key entry. This is a significant improvement over the legacy auth flow, with clear visual examples of expected UI interactions.


142-170: Anthropic provider section comprehensively updated with new authentication flow.

The refactored instructions now guide users through three authentication methods (Claude Pro/Max, Create API Key, Manually enter API Key) via /connect, with proper code examples showing UI prompts. This provides users with clear multiple pathways aligned with the new workflow.


186-217: Azure OpenAI provider documentation systematically updated for /connect flow.

All steps now reference the new /connect command with proper code examples. The documentation maintains logical progression through account setup, deployment, and API key configuration.


1075-1092: Custom provider section properly explains new /connect workflow for OpenAI-compatible providers.

The documentation now guides users through the /connect flow for custom providers, including provider ID selection and API key entry. Step 4's configuration example and troubleshooting tips are valuable additions that help users successfully integrate custom OpenAI-compatible endpoints.

Also applies to: 1081-1104


1207-1213: Provider troubleshooting documentation references /connect correctly.

The note about matching provider IDs between /connect command and config is particularly helpful for users debugging custom provider setup issues.

packages/web/src/content/docs/index.mdx (1)

135-150: Configure section successfully refactored for new TUI-based /connect workflow.

The onboarding instructions now guide users through the new /connect command with proper code examples and visual representations of the API key entry interface. The step-by-step approach is clear and consistent with the rest of the documentation migration. The link to opencode.ai/auth properly directs users to the credential setup portal.

packages/slack/package.json (1)

3-3: Version bump is consistent with upstream sync.

The package version is correctly updated to 1.0.129, aligning with the PR objective. No functional changes detected.

packages/sdk/js/package.json (1)

4-4: Version bump is consistent with upstream sync.

The package version is correctly updated to 1.0.129. No changes to public exports or dependencies detected.

packages/console/function/package.json (1)

3-3: Version bump is consistent with upstream sync.

The package version is correctly updated to 1.0.129. No dependency or configuration changes detected.

packages/util/sst-env.d.ts (1)

9-9: Auto-generated file with no semantic changes.

This file is regenerated by SST (as noted in the header). The formatting change is expected and safe to accept. No manual edits needed.

packages/tauri/package.json (1)

4-4: Version bump is consistent with upstream sync.

The package version is correctly updated to 1.0.129. No other changes detected.

packages/opencode/package.json (2)

3-3: Version bump is consistent with upstream sync.

The package version is correctly updated to 1.0.129. This aligns with the PR objective.


67-68: Verify @OpenTui dependency updates for compatibility.

Dependencies @opentui/core and @opentui/solid are upgraded from 0.1.54 to 0.1.55. While validation (typecheck, tests) has already passed, confirm these are coordinated upstream updates and compatible with the new session management CLI features mentioned in the PR.

.github/last-synced-tag (1)

1-1: Sync tag correctly updated.

The last-synced-tag is correctly updated to v1.0.129, matching the upstream tag merged in this PR. This will prevent re-syncing the same upstream version in future sync runs.

packages/web/package.json (1)

4-4: Version bump is consistent with upstream sync.

The package version is correctly updated to 1.0.129. No other changes detected.

packages/desktop/package.json (1)

3-3: Version bump to 1.0.129 approved.

Coordinated version increment aligns with upstream merge. No other changes to dependencies or structure.

packages/opencode/sst-env.d.ts (1)

1-9: Auto-generated SST environment file; no manual review needed.

This file is auto-generated by SST and marked with a "Do not edit" directive. The export statement is correct and expected.

github/sst-env.d.ts (1)

1-9: Auto-generated SST environment file; no manual review needed.

This file is auto-generated by SST and marked with a "Do not edit" directive. The export statement is correct and expected.

packages/web/sst-env.d.ts (1)

1-9: Auto-generated SST environment file; no manual review needed.

This file is auto-generated by SST and marked with a "Do not edit" directive. The export statement is correct and expected.

packages/util/package.json (1)

3-3: Version bump to 1.0.129 approved.

Coordinated version increment aligns with upstream merge. No other changes to configuration or structure.

packages/function/package.json (1)

3-3: Version bump to 1.0.129 approved.

Coordinated version increment aligns with upstream merge. No other changes to dependencies or configuration.

packages/ui/sst-env.d.ts (1)

1-9: Auto-generated SST environment file; no manual review needed.

This file is auto-generated by SST and marked with a "Do not edit" directive. The export statement is correct and expected.

packages/slack/sst-env.d.ts (1)

1-9: Auto-generated SST environment file; no manual review needed.

This file is auto-generated by SST and marked with a "Do not edit" directive. The export statement is correct and expected.

packages/sdk/js/sst-env.d.ts (1)

9-9: LGTM! Auto-generated file with no functional changes.

This formatting change in the auto-generated SST environment declaration file has no impact on functionality.

.prettierignore (1)

1-1: Good addition to exclude auto-generated files from formatting.

Ignoring sst-env.d.ts files is appropriate since they are auto-generated by SST and should not be modified or reformatted manually.

packages/opencode/src/config/config.ts (1)

402-402: LGTM! Username toggle keybind addition is well-integrated.

The new username_toggle keybind follows the established pattern, uses appropriate validation, and defaults to "none" (disabled), which is a safe default for a new feature.

sdks/vscode/sst-env.d.ts (1)

9-9: LGTM! Auto-generated file with no functional changes.

This formatting change in the auto-generated SST environment declaration file has no impact on functionality.

.opencode/command/commit.md (1)

2-2: LGTM! Minor capitalization consistency update.

The lowercase "git" aligns with typical command-line tool naming conventions.

packages/console/app/sst-env.d.ts (1)

9-9: LGTM! Auto-generated file with no functional changes.

This formatting change in the auto-generated SST environment declaration file has no impact on functionality.

packages/plugin/sst-env.d.ts (1)

9-9: LGTM! Auto-generated file with no functional changes.

This formatting change in the auto-generated SST environment declaration file has no impact on functionality.

packages/console/core/package.json (1)

4-4: LGTM! Version bump aligns with upstream merge.

The version update to 1.0.129 is consistent with the PR objective to merge upstream tag v1.0.129.

packages/tauri/sst-env.d.ts (1)

1-9: Verify SST type definitions are complete after upstream merge.

The AI summary indicates that other sst-env.d.ts files across the monorepo were updated with quoted resource keys and new entries (e.g., ZEN_MODELS4, Cloudflare restructuring), but this file remains unchanged. These files are auto-generated and should reflect the SST stack configuration. Confirm whether this is intentional (e.g., the Tauri package doesn't link SST resources) or if the upstream merge was incomplete.

packages/console/mail/sst-env.d.ts (1)

1-9: Inconsistency flagged by AI summary: verify if SST types need updating.

The AI summary explicitly states that this file has "no functional changes" while other sst-env.d.ts files in the monorepo received "extensive public API surface changes" (quoted keys, new entries). Clarify whether the mail package's SST resources are correctly reflected, or if this represents an incomplete merge resolution.

packages/console/mail/package.json (1)

1-21: Version bump for v1.0.129 release.

Standard version metadata update aligned with the PR's upstream sync objective. No dependency or script changes.

packages/console/app/package.json (1)

1-39: Version bump for v1.0.129 release.

Standard version metadata update. No dependency version changes or script modifications.

packages/web/src/content/docs/keybinds.mdx (1)

8-55: Verify the username_toggle keybind is fully implemented.

Line 17 adds "username_toggle": "none" to the documented keybinds object. The AI summary indicates this pairs with a config change in the opencode package. Ensure that:

  • The keybind handler actually implements the toggle action in the CLI TUI
  • The default value "none" aligns with the keybind config schema
  • The feature is complete and not a partially-merged stub
packages/plugin/package.json (1)

1-27: Version bump for v1.0.129 release.

Standard version metadata update. No changes to exports, scripts, or dependencies.

.opencode/command/spellcheck.md (1)

1-6: New workflow documentation.

Clear, concise documentation for the spellcheck command workflow. Aligns with the PR's addition of new .opencode/command/ documentation files.

packages/ui/package.json (1)

1-49: Version bump for v1.0.129 release.

Standard version metadata update. No changes to exports, dependencies, or scripts.

packages/enterprise/package.json (1)

3-3: LGTM! Version bump aligns with upstream merge.

The version increment to 1.0.129 is consistent with the PR's objective to merge upstream changes.

packages/opencode/src/provider/provider.ts (1)

518-520: LGTM! Consistent npm package mapping for GitHub Copilot variants.

Both github-copilot and github-copilot-enterprise correctly share the same npm package @ai-sdk/github-copilot, which aligns with the identical custom loader implementations (lines 93-116) and the dynamic provider creation (lines 360-369).

packages/script/sst-env.d.ts (1)

9-9: LGTM! Module export ensures proper TypeScript module resolution.

The export {} statement correctly marks this file as a module, which is a standard TypeScript pattern for declaration files.

.opencode/command/issues.md (1)

1-23: LGTM! Clear documentation for GitHub issue search workflow.

The markdown file provides well-structured guidance for searching GitHub issues using the gh CLI. The model selection (claude-haiku-4-5) is appropriate for this search task.

packages/opencode/src/lsp/client.ts (1)

107-107: LGTM! Timeout increase improves reliability for slow LSP initialization.

Extending the LSP initialize timeout from 5 seconds to 45 seconds accommodates slower systems and large codebases. The error handling (lines 108-116) ensures failures are still caught and reported appropriately.

packages/opencode/src/flag/flag.ts (1)

20-20: LGTM! Experimental flag follows existing conventions.

The OPENCODE_EXPERIMENTAL_DISABLE_COPY_ON_SELECT flag is appropriately scoped as experimental and uses the standard truthy() helper for environment variable parsing.

packages/desktop/src/sst-env.d.ts (1)

5-10: LGTM! Auto-generated formatting update.

The multi-line formatting of the empty ImportMetaEnv interface is a style preference from the SST tooling. No functional changes.

packages/desktop/src/pages/session.tsx (1)

358-364: The review comment is incorrect. session.messages.user() is guaranteed to always return an array and cannot return null or undefined.

In the session context (src/context/session.tsx), userMessages is defined as a createMemo that filters and sorts the messages() array. The messages() function itself uses the nullish coalescing operator (??) to provide an empty array fallback (line 48: sync.data.message[params.id] ?? []), ensuring it always returns an array. The filter and sort operations on an array always return an array, so session.messages.user().length is always safe to access without risk of runtime error.

Likely an incorrect or invalid review comment.

packages/opencode/src/cli/cmd/tui/app.tsx (3)

8-8: LGTM!

Import follows the coding guidelines using relative import path with named import.


316-321: LGTM!

The updated onSelect signature now accepts the dialog parameter and properly clears the dialog after toggling the theme mode. This is consistent with other toggle commands in the same file (e.g., "Toggle debug panel" at line 351, "Toggle console" at line 360).


465-468: LGTM!

Clean feature flag guard pattern for disabling copy-on-select behavior. The early return after clearing selection is the correct approach when the experimental flag is set.

packages/desktop/sst-env.d.ts (1)

9-9: No concerns.

This is an auto-generated SST file with no functional changes.

packages/opencode/src/index.ts (2)

28-28: LGTM!

Import follows the established pattern in the file and adheres to coding guidelines with relative path and named import.


97-97: LGTM!

The SessionCommand registration follows the established CLI command registration pattern used for all other commands in this file.

packages/opencode/src/installation/index.ts (1)

152-155: LGTM!

The unused _installMethod parameter with underscore prefix is appropriate for maintaining API compatibility with upstream while the shuvcode fork doesn't require brew-specific version checks. The comment clearly documents the fork-specific deviation.

packages/console/core/src/provider.ts (1)

50-54: Good fix: returning the Database.use(...) promise.

This ensures the deletion promise is propagated to callers, enabling proper error handling and awaiting. This now matches the create handler pattern (line 25) and fixes a subtle bug where callers couldn't reliably await the removal operation.

packages/opencode/src/cli/upgrade.ts (1)

6-25: Upgrade flow now correctly shares the computed install method

Using const method = await Installation.method() and passing it into Installation.latest(method) and Installation.upgrade(method, latest) keeps the install method consistent across the whole flow without changing the existing guards on latest, autoupdate, or "unknown" methods.

packages/opencode/src/cli/cmd/tui/routes/session/index.tsx (2)

96-111: Username visibility toggle wiring looks consistent

The added usernameVisible signal, KV persistence ("username_visible"), command entry ("session.username_visible.toggle" / username_toggle), and context exposure all line up and follow the same patterns as the other session settings (thinking, timestamps, tokens, details). Defaulting to true keeps existing behavior for current users.

Also applies to: 146-157, 578-591, 965-987


1257-1273: UserMessage color and label changes are coherent with local agent theming

Using local.agent.color(props.message.agent) for the border color and switching the label to {ctx.usernameVisible() ? sync.data.config.username ?? "You" : "You"} integrates username visibility with the existing config and theming model. The queued state and token display logic remain unchanged.

Also applies to: 1335-1350

packages/opencode/src/cli/cmd/session.ts (2)

77-106: Session table/JSON formatting helpers are straightforward and idiomatic

formatSessionTable and formatSessionJSON compute widths, truncate titles, and format timestamps using Locale in a clear way. The functions assume a non‑empty session list, which is already enforced by the early return in the handler.


9-75: No action required — yargs camelCase expansion is enabled by default and not disabled in this project

The option "max-count" is correctly accessed as args.maxCount because yargs (v18.0.0, used in this project) enables camel-case-expansion by default in yargs-parser. The only parser configuration set in the project is { "populate--": true } in packages/opencode/src/index.ts, which does not disable camel-case-expansion. The code is safe and consistent with the default behavior; no bracket access workaround is needed.

packages/console/function/sst-env.d.ts (1)

9-116: Resource key quoting and ZEN_MODELS4 addition are consistent with other SST env typings

The switch to string‑literal keys and the new "ZEN_MODELS4" secret entry mirror the shapes used in the other sst-env.d.ts files. Cloudflare resource typings remain structurally identical, just with quoted keys.

Also applies to: 123-130

packages/function/sst-env.d.ts (1)

9-116: SST Resource typings updated in line with shared core definitions

Quoting all Resource keys and adding "ZEN_MODELS4" keeps this file aligned with packages/console/core/sst-env.d.ts and the root sst-env.d.ts. Cloudflare resources are type‑equivalent, with only key syntax and import formatting adjusted.

Also applies to: 123-130

packages/console/resource/sst-env.d.ts (1)

9-116: Console Resource typings now match the shared SST env schema

The move to quoted keys plus the "ZEN_MODELS4" secret matches the console core and root SST env declarations, keeping type shapes uniform across environments.

Also applies to: 123-130

sst-env.d.ts (1)

8-146: Root SST Resource interface is now quoted-key and aligned with downstream env files

The root Resource interface’s quoted keys, inclusion of "Console", and new "ZEN_MODELS4" entry are consistent with the other sst-env.d.ts variants. Cloudflare resources retain their previous structures with only key syntax and minor formatting changes.

packages/enterprise/sst-env.d.ts (1)

9-116: Resource typings and Cloudflare bindings look consistent with other SST env declarations

The added/updated Resource entries (including "ZEN_MODELS4") and the Cloudflare-backed keys ("Api", "AuthApi", "AuthStorage", "Bucket", "EnterpriseStorage", "GatewayKv", "LogProcessor", "ZenData") cleanly augment sst.Resource and align with the patterns in the other sst-env.d.ts variants. With interface merging across the two declare module "sst" blocks and successful typechecking in the PR, this looks structurally sound.

If you upgrade @cloudflare/workers-types in the future, please re-check that the Service, KVNamespace, and R2Bucket symbols remain available and compatible with these declarations.

Also applies to: 119-130

packages/console/core/sst-env.d.ts (1)

9-116: Console core Resource typings correctly aligned with other env definitions

The quoted Resource keys, inclusion of "ZEN_MODELS4", and Cloudflare-specific bindings using cloudflare.Service, KVNamespace, and R2Bucket match the structure used in the other sst-env.d.ts files, so console/core should now have the same typed surface as the rest of the stack. The dual declare module "sst" blocks correctly rely on interface merging.

As with the enterprise file, just keep an eye on @cloudflare/workers-types upgrades so these Cloudflare binding types stay in sync.

Also applies to: 119-130

*/
"chat.params"?: (
input: { sessionID: string; agent: string; model: Model; provider: Provider; message: UserMessage },
input: { sessionID: string; agent: string; model: Model; provider: ProviderContext; message: UserMessage },
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

# First, let's look at the specific file and line mentioned
head -n 170 packages/plugin/src/index.ts | tail -n 20

Repository: Latitudes-Dev/shuvcode

Length of output: 886


🏁 Script executed:

# Find the type definitions for Provider and ProviderContext
rg -n "type ProviderContext|interface ProviderContext|type Provider|interface Provider" --type=ts packages/plugin/src/

Repository: Latitudes-Dev/shuvcode

Length of output: 129


🏁 Script executed:

# Search for all chat.params hook implementations
rg -n "chat\.params" --type=ts packages/

Repository: Latitudes-Dev/shuvcode

Length of output: 185


🏁 Script executed:

# Get the ProviderContext type definition
sed -n '19,40p' packages/plugin/src/index.ts

Repository: Latitudes-Dev/shuvcode

Length of output: 586


🏁 Script executed:

# Look at the chat.params hook implementation in prompt.ts
sed -n '475,530p' packages/opencode/src/session/prompt.ts

Repository: Latitudes-Dev/shuvcode

Length of output: 1810


🏁 Script executed:

# Search for any other uses of Provider type to see if there was a change
rg -n "provider:" --type=ts packages/plugin/src/index.ts | head -20

Repository: Latitudes-Dev/shuvcode

Length of output: 297


🏁 Script executed:

# Check git history to see if Provider was changed to ProviderContext
git log --oneline -n 20 packages/plugin/src/index.ts

Repository: Latitudes-Dev/shuvcode

Length of output: 113


🏁 Script executed:

# Search for any implementations that actually use chat.params hook (beyond just calling it)
rg -n "chat\.params" --type=ts -B5 -A10 packages/ | head -80

Repository: Latitudes-Dev/shuvcode

Length of output: 2503


🏁 Script executed:

# Check Plugin.trigger to see how it validates/transforms input
rg -n "trigger.*function|trigger.*=" --type=ts packages/plugin/src/index.ts -A20 | head -40

Repository: Latitudes-Dev/shuvcode

Length of output: 48


🏁 Script executed:

# Look for any other places where ProviderContext is used
rg -n "ProviderContext" --type=ts packages/

Repository: Latitudes-Dev/shuvcode

Length of output: 274


🏁 Script executed:

# Check the types being imported and Provider class definition
rg -n "class Provider|type Provider|interface Provider" --type=ts packages/ -A5 | head -50

Repository: Latitudes-Dev/shuvcode

Length of output: 2726


🏁 Script executed:

# Look for external plugin examples or documentation
find . -name "*plugin*" -type f \( -name "*.ts" -o -name "*.md" \) | head -20

Repository: Latitudes-Dev/shuvcode

Length of output: 48


🏁 Script executed:

# Check if there's a conversion or wrapper happening in Provider.getProvider
rg -n "getProvider" --type=ts packages/ -A10 | head -60

Repository: Latitudes-Dev/shuvcode

Length of output: 4342


🏁 Script executed:

# Check the Provider type structure to confirm it's not already ProviderContext
sed -n '1400,1410p' packages/sdk/js/src/gen/types.gen.ts

Repository: Latitudes-Dev/shuvcode

Length of output: 213


🏁 Script executed:

# Verify the exact structure passed to Plugin.trigger
sed -n '478,495p' packages/opencode/src/session/prompt.ts

Repository: Latitudes-Dev/shuvcode

Length of output: 695


The chat.params hook signature expects ProviderContext but the call site passes Provider directly, creating a type mismatch.

Line 162 declares the hook parameter as provider: ProviderContext (an object with source, info: Provider, and options properties), but the actual call at packages/opencode/src/session/prompt.ts:485 passes the result of Provider.getProvider() which is a Provider instance, not a wrapped ProviderContext object. Either wrap the provider value in a ProviderContext object at the call site, or update the hook signature to accept Provider directly.

🤖 Prompt for AI Agents
In packages/plugin/src/index.ts around line 162, the chat.params hook currently
types the provider parameter as ProviderContext but callers pass a Provider
instance; update the hook to accept Provider | ProviderContext (or union type)
and normalize it at the top of the function into a ProviderContext object (if
provider has no .source/info/options, wrap it into { source: provider.source? or
'unknown', info: provider, options: {} } or similar), and update the hook's
exported type/signature so callers using Provider continue to compile without
changing call sites; ensure downstream code uses the normalized ProviderContext
variable.

@shuv1337 shuv1337 merged commit e5bd8ff into integration Dec 3, 2025
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Upstream Sync] Merge conflict with v1.0.129