Просмотр исходного кода

Merge branch 'dev' of https://github.com/sst/opencode into dev

David Hill 2 месяцев назад
Родитель
Сommit
a190eda2c8

+ 17 - 0
.github/workflows/publish.yml

@@ -165,6 +165,7 @@ jobs:
           OPENCODE_API_KEY: ${{ secrets.OPENCODE_API_KEY }}
           RUST_TARGET: ${{ matrix.settings.target }}
           GH_TOKEN: ${{ github.token }}
+          OPENCODE_RELEASE_TAG: ${{ needs.publish.outputs.tagName }}
 
       # Fixes AppImage build issues, can be removed when https://github.com/tauri-apps/tauri/pull/12491 is released
       - name: Install tauri-cli from portable appimage branch
@@ -197,3 +198,19 @@ jobs:
           releaseId: ${{ needs.publish.outputs.releaseId }}
           tagName: ${{ needs.publish.outputs.tagName }}
           releaseAssetNamePattern: opencode-desktop-[platform]-[arch][ext]
+          releaseDraft: true
+
+  publish-release:
+    needs:
+      - publish
+      - publish-tauri
+    runs-on: blacksmith-4vcpu-ubuntu-2404
+    steps:
+      - uses: actions/checkout@v3
+        with:
+          fetch-depth: 0
+          ref: ${{ needs.publish.outputs.tagName }}
+
+      - run: gh release edit ${{ steps.publish.outputs.tagName }} --draft=false
+        env:
+          GH_TOKEN: ${{ github.token }}

+ 58 - 1
.opencode/agent/triage.md

@@ -1,7 +1,7 @@
 ---
 mode: primary
 hidden: true
-model: opencode/gpt-5-nano
+model: opencode/claude-haiku-4-5
 tools:
   "*": false
   "github-triage": true
@@ -10,3 +10,60 @@ tools:
 You are a triage agent responsible for triaging github issues.
 
 Use your github-triage tool to triage issues.
+
+## Labels
+
+#### perf
+
+Performance-related issues:
+
+- Slow performance
+- High RAM usage
+- High CPU usage
+
+**Only** add if it's likely a RAM or CPU issue. **Do not** add for LLM slowness.
+
+#### desktop
+
+Desktop app issues:
+
+- `opencode web` command
+- The desktop app itself
+
+**Only** add if it's specifically about the Desktop application or `opencode web` view. **Do not** add for terminal, TUI, or general opencode issues.
+
+#### nix
+
+**Only** add if the issue explicitly mentions nix.
+
+#### zen
+
+**Only** add if the issue mentions "zen" or "opencode zen". Zen is our gateway for coding models. **Do not** add for other gateways or inference providers.
+
+#### docs
+
+Add if the issue requests better documentation or docs updates.
+
+#### opentui
+
+TUI issues potentially caused by our underlying TUI library:
+
+- Keybindings not working
+- Scroll speed issues (too fast/slow/laggy)
+- Screen flickering
+- Crashes with opentui in the log
+
+**Do not** add for general TUI bugs.
+
+When assigning to people here are the following rules:
+
+adamdotdev:
+ONLY assign adam if the issue will have the "desktop" label.
+
+fwang:
+ONLY assign fwang if the issue will have the "zen" label.
+
+jayair:
+ONLY assign jayair if the issue will have the "docs" label.
+
+In all other cases use best judgment. Avoid assigning to kommander needlessly, when in doubt assign to rekram1-node.

+ 3 - 3
.opencode/bun.lock

@@ -5,7 +5,7 @@
     "": {
       "dependencies": {
         "@octokit/rest": "^22.0.1",
-        "@opencode-ai/plugin": "0.0.0-dev-202512160508",
+        "@opencode-ai/plugin": "0.0.0-dev-202512161535",
       },
     },
   },
@@ -34,9 +34,9 @@
 
     "@octokit/types": ["@octokit/[email protected]", "", { "dependencies": { "@octokit/openapi-types": "^27.0.0" } }, "sha512-sKq+9r1Mm4efXW1FCk7hFSeJo4QKreL/tTbR0rz/qx/r1Oa2VV83LTA/H/MuCOX7uCIJmQVRKBcbmWoySjAnSg=="],
 
-    "@opencode-ai/plugin": ["@opencode-ai/[email protected]0508", "", { "dependencies": { "@opencode-ai/sdk": "0.0.0-dev-202512160508", "zod": "4.1.8" } }, "sha512-GLnvMQhEWRHG9E84FyyQKPKi54bGUkytXPfZYjwNy9W6djw8zAW/kpeYPrdIJHPdTHk4OjIHEwoB1SXZzGaLFQ=="],
+    "@opencode-ai/plugin": ["@opencode-ai/[email protected]1535", "", { "dependencies": { "@opencode-ai/sdk": "0.0.0-dev-202512161535", "zod": "4.1.8" } }, "sha512-aHPm0T9EtKUYs5mTZKpYwcDTk3jP/YMSZGPfCAwruKitnktRFu0TxJQdEJwDfUokI4f1nkoGDkBgsbHw+pBHsA=="],
 
-    "@opencode-ai/sdk": ["@opencode-ai/[email protected]0508", "", {}, "sha512-ICpZ1bX528yQKqYGGyUJQMu3RY0F1pQ6RCoTJ4ESLiYmcXUY1EldgIidiwPA+A/zpEXLu2lPwPZ1LYn/bX6aFA=="],
+    "@opencode-ai/sdk": ["@opencode-ai/[email protected]1535", "", {}, "sha512-koVbuyuhNnEWMJtkIxSTcg8HQ34c4ShvBHv4dwebvVB2+ftjN/wcqPDx4RAwaxyFaY050qf1qobHHMXWWzDRwQ=="],
 
     "before-after-hook": ["[email protected]", "", {}, "sha512-q6tR3RPqIB1pMiTRMFcZwuG5T8vwp+vUvEG0vuI6B+Rikh5BfPp2fQ82c925FOs+b0lcFQ8CFrL+KbilfZFhOQ=="],
 

+ 1 - 1
.opencode/package.json

@@ -1,6 +1,6 @@
 {
   "dependencies": {
     "@octokit/rest": "^22.0.1",
-    "@opencode-ai/plugin": "0.0.0-dev-202512160508"
+    "@opencode-ai/plugin": "0.0.0-dev-202512161535"
   }
 }

+ 19 - 4
.opencode/tool/github-triage.ts

@@ -1,3 +1,4 @@
+/// <reference path="../env.d.ts" />
 import { Octokit } from "@octokit/rest"
 import { tool } from "@opencode-ai/plugin"
 import DESCRIPTION from "./github-triage.txt"
@@ -16,9 +17,9 @@ export default tool({
       .describe("The username of the assignee")
       .default("rekram1-node"),
     labels: tool.schema
-      .array(tool.schema.enum(["nix", "opentui", "perf", "web", "zen", "docs"]))
+      .array(tool.schema.enum(["nix", "opentui", "perf", "desktop", "zen", "docs"]))
       .describe("The labels(s) to add to the issue")
-      .optional(),
+      .default([]),
   },
   async execute(args) {
     const issue = getIssueNumber()
@@ -28,6 +29,18 @@ export default tool({
 
     const results: string[] = []
 
+    if (args.assignee === "adamdotdevin" && !args.labels.includes("desktop")) {
+      throw new Error("Only desktop issues should be assigned to adamdotdevin")
+    }
+
+    if (args.assignee === "fwang" && !args.labels.includes("zen")) {
+      throw new Error("Only zen issues should be assigned to fwang")
+    }
+
+    if (args.assignee === "kommander" && !args.labels.includes("opentui")) {
+      throw new Error("Only opentui issues should be assigned to kommander")
+    }
+
     await octokit.rest.issues.addAssignees({
       owner,
       repo,
@@ -36,12 +49,14 @@ export default tool({
     })
     results.push(`Assigned @${args.assignee} to issue #${issue}`)
 
-    if (args.labels && args.labels.length > 0) {
+    const labels: string[] = args.labels.map((label) => (label === "desktop" ? "web" : label))
+
+    if (labels.length > 0) {
       await octokit.rest.issues.addLabels({
         owner,
         repo,
         issue_number: issue,
-        labels: args.labels,
+        labels,
       })
       results.push(`Added labels: ${args.labels.join(", ")}`)
     }

+ 6 - 2
.opencode/tool/github-triage.txt

@@ -50,9 +50,13 @@ Then assign the issue to Him.
 
 ### rekram1-node
 
+ALL BUGS SHOULD BE assigned to rekram1-node unless they have the `opentui` label.
+
 Assign Aiden to an issue as a catch all, if you can't assign anyone else. Most of the time this will be bugs/polish things.
 If no one else makes sense to assign, assign rekram1-node to it.
 
+Always assign to aiden if the issue mentions "acp", "zed", or model performance issues
+
 ## Breakdown of Labels:
 
 ### nix
@@ -67,9 +71,9 @@ Anything relating to the TUI itself should have an opentui label
 
 Anything related to slow performance, high ram, high cpu usage, or any other performance related issue should have a perf label
 
-### web
+### desktop
 
-Anything related to `opencode web` or the desktop app should have a web label. Never add this label for anything terminal/tui related
+Anything related to `opencode web` command or the desktop app should have a desktop label. Never add this label for anything terminal/tui related
 
 ### zen
 

+ 15 - 15
bun.lock

@@ -20,7 +20,7 @@
     },
     "packages/console/app": {
       "name": "@opencode-ai/console-app",
-      "version": "1.0.162",
+      "version": "1.0.163",
       "dependencies": {
         "@cloudflare/vite-plugin": "1.15.2",
         "@ibm/plex": "6.4.1",
@@ -48,7 +48,7 @@
     },
     "packages/console/core": {
       "name": "@opencode-ai/console-core",
-      "version": "1.0.162",
+      "version": "1.0.163",
       "dependencies": {
         "@aws-sdk/client-sts": "3.782.0",
         "@jsx-email/render": "1.1.1",
@@ -75,7 +75,7 @@
     },
     "packages/console/function": {
       "name": "@opencode-ai/console-function",
-      "version": "1.0.162",
+      "version": "1.0.163",
       "dependencies": {
         "@ai-sdk/anthropic": "2.0.0",
         "@ai-sdk/openai": "2.0.2",
@@ -99,7 +99,7 @@
     },
     "packages/console/mail": {
       "name": "@opencode-ai/console-mail",
-      "version": "1.0.162",
+      "version": "1.0.163",
       "dependencies": {
         "@jsx-email/all": "2.2.3",
         "@jsx-email/cli": "1.4.3",
@@ -123,7 +123,7 @@
     },
     "packages/desktop": {
       "name": "@opencode-ai/desktop",
-      "version": "1.0.162",
+      "version": "1.0.163",
       "dependencies": {
         "@kobalte/core": "catalog:",
         "@opencode-ai/sdk": "workspace:*",
@@ -170,7 +170,7 @@
     },
     "packages/enterprise": {
       "name": "@opencode-ai/enterprise",
-      "version": "1.0.162",
+      "version": "1.0.163",
       "dependencies": {
         "@opencode-ai/ui": "workspace:*",
         "@opencode-ai/util": "workspace:*",
@@ -199,7 +199,7 @@
     },
     "packages/function": {
       "name": "@opencode-ai/function",
-      "version": "1.0.162",
+      "version": "1.0.163",
       "dependencies": {
         "@octokit/auth-app": "8.0.1",
         "@octokit/rest": "catalog:",
@@ -215,7 +215,7 @@
     },
     "packages/opencode": {
       "name": "opencode",
-      "version": "1.0.162",
+      "version": "1.0.163",
       "bin": {
         "opencode": "./bin/opencode",
       },
@@ -307,7 +307,7 @@
     },
     "packages/plugin": {
       "name": "@opencode-ai/plugin",
-      "version": "1.0.162",
+      "version": "1.0.163",
       "dependencies": {
         "@opencode-ai/sdk": "workspace:*",
         "zod": "catalog:",
@@ -327,7 +327,7 @@
     },
     "packages/sdk/js": {
       "name": "@opencode-ai/sdk",
-      "version": "1.0.162",
+      "version": "1.0.163",
       "devDependencies": {
         "@hey-api/openapi-ts": "0.88.1",
         "@tsconfig/node22": "catalog:",
@@ -338,7 +338,7 @@
     },
     "packages/slack": {
       "name": "@opencode-ai/slack",
-      "version": "1.0.162",
+      "version": "1.0.163",
       "dependencies": {
         "@opencode-ai/sdk": "workspace:*",
         "@slack/bolt": "^3.17.1",
@@ -351,7 +351,7 @@
     },
     "packages/tauri": {
       "name": "@opencode-ai/tauri",
-      "version": "1.0.162",
+      "version": "1.0.163",
       "dependencies": {
         "@opencode-ai/desktop": "workspace:*",
         "@tauri-apps/api": "^2",
@@ -376,7 +376,7 @@
     },
     "packages/ui": {
       "name": "@opencode-ai/ui",
-      "version": "1.0.162",
+      "version": "1.0.163",
       "dependencies": {
         "@kobalte/core": "catalog:",
         "@opencode-ai/sdk": "workspace:*",
@@ -411,7 +411,7 @@
     },
     "packages/util": {
       "name": "@opencode-ai/util",
-      "version": "1.0.162",
+      "version": "1.0.163",
       "dependencies": {
         "zod": "catalog:",
       },
@@ -422,7 +422,7 @@
     },
     "packages/web": {
       "name": "@opencode-ai/web",
-      "version": "1.0.162",
+      "version": "1.0.163",
       "dependencies": {
         "@astrojs/cloudflare": "12.6.3",
         "@astrojs/markdown-remark": "6.3.1",

+ 1 - 1
packages/console/app/package.json

@@ -1,6 +1,6 @@
 {
   "name": "@opencode-ai/console-app",
-  "version": "1.0.162",
+  "version": "1.0.163",
   "type": "module",
   "scripts": {
     "typecheck": "tsgo --noEmit",

+ 1 - 1
packages/console/core/package.json

@@ -1,7 +1,7 @@
 {
   "$schema": "https://json.schemastore.org/package.json",
   "name": "@opencode-ai/console-core",
-  "version": "1.0.162",
+  "version": "1.0.163",
   "private": true,
   "type": "module",
   "dependencies": {

+ 1 - 1
packages/console/function/package.json

@@ -1,6 +1,6 @@
 {
   "name": "@opencode-ai/console-function",
-  "version": "1.0.162",
+  "version": "1.0.163",
   "$schema": "https://json.schemastore.org/package.json",
   "private": true,
   "type": "module",

+ 1 - 1
packages/console/mail/package.json

@@ -1,6 +1,6 @@
 {
   "name": "@opencode-ai/console-mail",
-  "version": "1.0.162",
+  "version": "1.0.163",
   "dependencies": {
     "@jsx-email/all": "2.2.3",
     "@jsx-email/cli": "1.4.3",

+ 1 - 1
packages/desktop/package.json

@@ -1,6 +1,6 @@
 {
   "name": "@opencode-ai/desktop",
-  "version": "1.0.162",
+  "version": "1.0.163",
   "description": "",
   "type": "module",
   "exports": {

+ 1 - 1
packages/enterprise/package.json

@@ -1,6 +1,6 @@
 {
   "name": "@opencode-ai/enterprise",
-  "version": "1.0.162",
+  "version": "1.0.163",
   "private": true,
   "type": "module",
   "scripts": {

+ 6 - 6
packages/extensions/zed/extension.toml

@@ -1,7 +1,7 @@
 id = "opencode"
 name = "OpenCode"
 description = "The open source coding agent."
-version = "1.0.162"
+version = "1.0.163"
 schema_version = 1
 authors = ["Anomaly"]
 repository = "https://github.com/sst/opencode"
@@ -11,26 +11,26 @@ name = "OpenCode"
 icon = "./icons/opencode.svg"
 
 [agent_servers.opencode.targets.darwin-aarch64]
-archive = "https://github.com/sst/opencode/releases/download/v1.0.162/opencode-darwin-arm64.zip"
+archive = "https://github.com/sst/opencode/releases/download/v1.0.163/opencode-darwin-arm64.zip"
 cmd = "./opencode"
 args = ["acp"]
 
 [agent_servers.opencode.targets.darwin-x86_64]
-archive = "https://github.com/sst/opencode/releases/download/v1.0.162/opencode-darwin-x64.zip"
+archive = "https://github.com/sst/opencode/releases/download/v1.0.163/opencode-darwin-x64.zip"
 cmd = "./opencode"
 args = ["acp"]
 
 [agent_servers.opencode.targets.linux-aarch64]
-archive = "https://github.com/sst/opencode/releases/download/v1.0.162/opencode-linux-arm64.tar.gz"
+archive = "https://github.com/sst/opencode/releases/download/v1.0.163/opencode-linux-arm64.tar.gz"
 cmd = "./opencode"
 args = ["acp"]
 
 [agent_servers.opencode.targets.linux-x86_64]
-archive = "https://github.com/sst/opencode/releases/download/v1.0.162/opencode-linux-x64.tar.gz"
+archive = "https://github.com/sst/opencode/releases/download/v1.0.163/opencode-linux-x64.tar.gz"
 cmd = "./opencode"
 args = ["acp"]
 
 [agent_servers.opencode.targets.windows-x86_64]
-archive = "https://github.com/sst/opencode/releases/download/v1.0.162/opencode-windows-x64.zip"
+archive = "https://github.com/sst/opencode/releases/download/v1.0.163/opencode-windows-x64.zip"
 cmd = "./opencode.exe"
 args = ["acp"]

+ 1 - 1
packages/function/package.json

@@ -1,6 +1,6 @@
 {
   "name": "@opencode-ai/function",
-  "version": "1.0.162",
+  "version": "1.0.163",
   "$schema": "https://json.schemastore.org/package.json",
   "private": true,
   "type": "module",

+ 1 - 1
packages/opencode/package.json

@@ -1,6 +1,6 @@
 {
   "$schema": "https://json.schemastore.org/package.json",
-  "version": "1.0.162",
+  "version": "1.0.163",
   "name": "opencode",
   "type": "module",
   "private": true,

+ 1 - 1
packages/plugin/package.json

@@ -1,7 +1,7 @@
 {
   "$schema": "https://json.schemastore.org/package.json",
   "name": "@opencode-ai/plugin",
-  "version": "1.0.162",
+  "version": "1.0.163",
   "type": "module",
   "scripts": {
     "typecheck": "tsgo --noEmit",

+ 1 - 1
packages/sdk/js/package.json

@@ -1,7 +1,7 @@
 {
   "$schema": "https://json.schemastore.org/package.json",
   "name": "@opencode-ai/sdk",
-  "version": "1.0.162",
+  "version": "1.0.163",
   "type": "module",
   "scripts": {
     "typecheck": "tsgo --noEmit",

+ 1 - 1
packages/slack/package.json

@@ -1,6 +1,6 @@
 {
   "name": "@opencode-ai/slack",
-  "version": "1.0.162",
+  "version": "1.0.163",
   "type": "module",
   "scripts": {
     "dev": "bun run src/index.ts",

+ 1 - 1
packages/tauri/package.json

@@ -1,7 +1,7 @@
 {
   "name": "@opencode-ai/tauri",
   "private": true,
-  "version": "1.0.162",
+  "version": "1.0.163",
   "type": "module",
   "scripts": {
     "typecheck": "tsgo -b",

+ 1 - 1
packages/tauri/scripts/prepare.ts

@@ -9,7 +9,7 @@ const sidecarConfig = getCurrentSidecar()
 const dir = "src-tauri/target/opencode-binaries"
 
 await $`mkdir -p ${dir}`
-await $`gh release download --pattern ${sidecarConfig.ocBinary}.${sidecarConfig.assetExt} --repo sst/opencode --skip-existing --dir ${dir}`
+await $`gh release download ${Bun.env.OPENCODE_RELEASE_TAG} --pattern ${sidecarConfig.ocBinary}.${sidecarConfig.assetExt} --repo sst/opencode --skip-existing --dir ${dir}`
 
 if (sidecarConfig.assetExt === "tar.gz") {
   await $`tar -xvzf ${dir}/${sidecarConfig.ocBinary}.${sidecarConfig.assetExt} -C ${dir}`

+ 1 - 1
packages/ui/package.json

@@ -1,6 +1,6 @@
 {
   "name": "@opencode-ai/ui",
-  "version": "1.0.162",
+  "version": "1.0.163",
   "type": "module",
   "exports": {
     "./*": "./src/components/*.tsx",

+ 1 - 1
packages/util/package.json

@@ -1,6 +1,6 @@
 {
   "name": "@opencode-ai/util",
-  "version": "1.0.162",
+  "version": "1.0.163",
   "private": true,
   "type": "module",
   "exports": {

+ 1 - 1
packages/web/package.json

@@ -1,7 +1,7 @@
 {
   "name": "@opencode-ai/web",
   "type": "module",
-  "version": "1.0.162",
+  "version": "1.0.163",
   "scripts": {
     "dev": "astro dev",
     "dev:remote": "VITE_API_URL=https://api.opencode.ai astro dev",

+ 1 - 1
script/publish.ts

@@ -155,7 +155,7 @@ if (!Script.preview) {
   await $`git cherry-pick HEAD..origin/dev`.nothrow()
   await $`git push origin HEAD --tags --no-verify --force-with-lease`
   await new Promise((resolve) => setTimeout(resolve, 5_000))
-  await $`gh release create v${Script.version} --title "v${Script.version}" --notes ${notes.join("\n") || "No notable changes"} ./packages/opencode/dist/*.zip ./packages/opencode/dist/*.tar.gz`
+  await $`gh release create v${Script.version} -d --title "v${Script.version}" --notes ${notes.join("\n") || "No notable changes"} ./packages/opencode/dist/*.zip ./packages/opencode/dist/*.tar.gz`
   const release = await $`gh release view v${Script.version} --json id,tagName`.json()
   if (process.env.GITHUB_OUTPUT) {
     await Bun.write(process.env.GITHUB_OUTPUT, `releaseId=${release.id}\ntagName=${release.tagName}\n`)

+ 1 - 1
sdks/vscode/package.json

@@ -2,7 +2,7 @@
   "name": "opencode",
   "displayName": "opencode",
   "description": "opencode for VS Code",
-  "version": "1.0.162",
+  "version": "1.0.163",
   "publisher": "sst-dev",
   "repository": {
     "type": "git",