diff --git a/.github/last-synced-tag b/.github/last-synced-tag index 85e1b342893..91dd8d56caa 100644 --- a/.github/last-synced-tag +++ b/.github/last-synced-tag @@ -1 +1 @@ -v1.0.128 +v1.0.129 diff --git a/.opencode/command/commit.md b/.opencode/command/commit.md index 570bc7f6a69..46673d95a13 100644 --- a/.opencode/command/commit.md +++ b/.opencode/command/commit.md @@ -1,5 +1,5 @@ --- -description: Git commit and push +description: git commit and push --- commit and push diff --git a/.opencode/command/issues.md b/.opencode/command/issues.md new file mode 100644 index 00000000000..20ac4c18024 --- /dev/null +++ b/.opencode/command/issues.md @@ -0,0 +1,23 @@ +--- +description: "find issue(s) on github" +model: opencode/claude-haiku-4-5 +--- + +Search through existing issues in sst/opencode using the gh cli to find issues matching this query: + +$ARGUMENTS + +Consider: + +1. Similar titles or descriptions +2. Same error messages or symptoms +3. Related functionality or components +4. Similar feature requests + +Please list any matching issues with: + +- Issue number and title +- Brief explanation of why it matches the query +- Link to the issue + +If no clear matches are found, say so. diff --git a/.opencode/command/spellcheck.md b/.opencode/command/spellcheck.md new file mode 100644 index 00000000000..0abf23c4fd0 --- /dev/null +++ b/.opencode/command/spellcheck.md @@ -0,0 +1,5 @@ +--- +description: spellcheck all markdown file changes +--- + +Look at all the unstaged changes to markdown (.md, .mdx) files, pull out the lines that have changed, and check for spelling and grammar errors. diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 00000000000..aa3a7ce2381 --- /dev/null +++ b/.prettierignore @@ -0,0 +1 @@ +sst-env.d.ts \ No newline at end of file diff --git a/bun.lock b/bun.lock index e0f4b9ebe36..f58f245bab9 100644 --- a/bun.lock +++ b/bun.lock @@ -20,7 +20,7 @@ }, "packages/console/app": { "name": "@opencode-ai/console-app", - "version": "1.0.128", + "version": "1.0.129", "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.128", + "version": "1.0.129", "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.128", + "version": "1.0.129", "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.128", + "version": "1.0.129", "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.128", + "version": "1.0.129", "dependencies": { "@kobalte/core": "catalog:", "@opencode-ai/sdk": "workspace:*", @@ -164,7 +164,7 @@ }, "packages/enterprise": { "name": "@opencode-ai/enterprise", - "version": "1.0.128", + "version": "1.0.129", "dependencies": { "@opencode-ai/ui": "workspace:*", "@opencode-ai/util": "workspace:*", @@ -192,7 +192,7 @@ }, "packages/function": { "name": "@opencode-ai/function", - "version": "1.0.128", + "version": "1.0.129", "dependencies": { "@octokit/auth-app": "8.0.1", "@octokit/rest": "22.0.0", @@ -208,7 +208,7 @@ }, "packages/opencode": { "name": "opencode", - "version": "1.0.128", + "version": "1.0.129", "bin": { "opencode": "./bin/opencode", }, @@ -238,8 +238,8 @@ "@opencode-ai/sdk": "workspace:*", "@opencode-ai/util": "workspace:*", "@openrouter/ai-sdk-provider": "1.2.8", - "@opentui/core": "0.1.54", - "@opentui/solid": "0.1.54", + "@opentui/core": "0.1.55", + "@opentui/solid": "0.1.55", "@parcel/watcher": "2.5.1", "@pierre/precision-diffs": "catalog:", "@solid-primitives/event-bus": "1.1.2", @@ -298,7 +298,7 @@ }, "packages/plugin": { "name": "@opencode-ai/plugin", - "version": "1.0.128", + "version": "1.0.129", "dependencies": { "@opencode-ai/sdk": "workspace:*", "zod": "catalog:", @@ -318,7 +318,7 @@ }, "packages/sdk/js": { "name": "@opencode-ai/sdk", - "version": "1.0.128", + "version": "1.0.129", "devDependencies": { "@hey-api/openapi-ts": "0.81.0", "@tsconfig/node22": "catalog:", @@ -329,7 +329,7 @@ }, "packages/slack": { "name": "@opencode-ai/slack", - "version": "1.0.128", + "version": "1.0.129", "dependencies": { "@opencode-ai/sdk": "workspace:*", "@slack/bolt": "^3.17.1", @@ -342,7 +342,7 @@ }, "packages/tauri": { "name": "@opencode-ai/tauri", - "version": "1.0.128", + "version": "1.0.129", "dependencies": { "@tauri-apps/api": "^2", "@tauri-apps/plugin-opener": "^2", @@ -355,7 +355,7 @@ }, "packages/ui": { "name": "@opencode-ai/ui", - "version": "1.0.128", + "version": "1.0.129", "dependencies": { "@kobalte/core": "catalog:", "@opencode-ai/sdk": "workspace:*", @@ -387,7 +387,7 @@ }, "packages/util": { "name": "@opencode-ai/util", - "version": "1.0.128", + "version": "1.0.129", "dependencies": { "zod": "catalog:", }, @@ -398,7 +398,7 @@ }, "packages/web": { "name": "@opencode-ai/web", - "version": "1.0.128", + "version": "1.0.129", "dependencies": { "@astrojs/cloudflare": "12.6.3", "@astrojs/markdown-remark": "6.3.1", @@ -1087,21 +1087,21 @@ "@opentelemetry/api": ["@opentelemetry/api@1.9.0", "", {}, "sha512-3giAOQvZiH5F9bMlMiv8+GSPMeqg0dbaeo58/0SlA9sxSqZhnUtxzX9/2FzyhS9sWQf5S0GJE0AKBrFqjpeYcg=="], - "@opentui/core": ["@opentui/core@0.1.54", "", { "dependencies": { "bun-ffi-structs": "0.1.2", "diff": "8.0.2", "jimp": "1.6.0", "yoga-layout": "3.2.1" }, "optionalDependencies": { "@dimforge/rapier2d-simd-compat": "^0.17.3", "@opentui/core-darwin-arm64": "0.1.54", "@opentui/core-darwin-x64": "0.1.54", "@opentui/core-linux-arm64": "0.1.54", "@opentui/core-linux-x64": "0.1.54", "@opentui/core-win32-arm64": "0.1.54", "@opentui/core-win32-x64": "0.1.54", "bun-webgpu": "0.1.4", "planck": "^1.4.2", "three": "0.177.0" }, "peerDependencies": { "web-tree-sitter": "0.25.10" } }, "sha512-NYBVOmAa3JB+bSTxFTUc3Ej3B8Gc364DMsoktVRCYdjQ+AyeMRNdOTj9sMWdDJbXqITK/atrsUXouoE5bL9sWA=="], + "@opentui/core": ["@opentui/core@0.1.55", "", { "dependencies": { "bun-ffi-structs": "0.1.2", "diff": "8.0.2", "jimp": "1.6.0", "yoga-layout": "3.2.1" }, "optionalDependencies": { "@dimforge/rapier2d-simd-compat": "^0.17.3", "@opentui/core-darwin-arm64": "0.1.55", "@opentui/core-darwin-x64": "0.1.55", "@opentui/core-linux-arm64": "0.1.55", "@opentui/core-linux-x64": "0.1.55", "@opentui/core-win32-arm64": "0.1.55", "@opentui/core-win32-x64": "0.1.55", "bun-webgpu": "0.1.4", "planck": "^1.4.2", "three": "0.177.0" }, "peerDependencies": { "web-tree-sitter": "0.25.10" } }, "sha512-WafOO8eMf1/fmlFUfgooWyWJclQG5X/72VUebH+jN6/kSoSb91XJxHQgaKL9CQYFBNBIApQhAZn/sF9Qt60+lQ=="], - "@opentui/core-darwin-arm64": ["@opentui/core-darwin-arm64@0.1.54", "", { "os": "darwin", "cpu": "arm64" }, "sha512-LyJ2AI9XA3upckiXLaX/P6tB40pB6euZA5MCikyhwcDVew3Z7NpTI0xHp4gUWHwsSTwmx6u851ofgkf7nMBEJg=="], + "@opentui/core-darwin-arm64": ["@opentui/core-darwin-arm64@0.1.55", "", { "os": "darwin", "cpu": "arm64" }, "sha512-z2Prd/KKUbhPaSGBFv2q0nDtiLB/5oI3sGFDgf+YAfs6M6UfP9n0XkPUupbE1dx4lMyvwA9X8/QUnsQApd3E2g=="], - "@opentui/core-darwin-x64": ["@opentui/core-darwin-x64@0.1.54", "", { "os": "darwin", "cpu": "x64" }, "sha512-LZAjXR1OoUr8pewBTHqxupdPS4PC4qQCht0HHGEr1+zN7zu5c+kcp3Uop+NeQTYLjHJftiULukzAfLJMXFuDNA=="], + "@opentui/core-darwin-x64": ["@opentui/core-darwin-x64@0.1.55", "", { "os": "darwin", "cpu": "x64" }, "sha512-zjgGmIaTCWUvvQ9vIHJ0ypTkuFIA4ykKiZ16QxpG930bPr9fJ1xZ8MYj+6WSyuiao7tm6iWQfuYKT3tzA8+ItQ=="], - "@opentui/core-linux-arm64": ["@opentui/core-linux-arm64@0.1.54", "", { "os": "linux", "cpu": "arm64" }, "sha512-AC7qBYc4shY28/eR1BvguvfCjLzZJy0mdvadSdDF0XJJIe5vhWJ9UyKsoyLo7pwrd0iFBf5d7fg4kJcbLbZNWg=="], + "@opentui/core-linux-arm64": ["@opentui/core-linux-arm64@0.1.55", "", { "os": "linux", "cpu": "arm64" }, "sha512-77EZtLxH0VW/Kw+6kTs9FrFWfhjaIjsK/o39DAWM1ZNdFDTXAa/MQNOFDlBXbNHiNqPOyxd0tol1nUFLr8ZtZg=="], - "@opentui/core-linux-x64": ["@opentui/core-linux-x64@0.1.54", "", { "os": "linux", "cpu": "x64" }, "sha512-S7BAq4CUV6ZfoXDSClJT75XxVSKPOOuRVYvBSHMOgwkBwLHpJZdz0Z4mzcGBBP1nJQ5Gz92TWPYfYMbZvR1lpw=="], + "@opentui/core-linux-x64": ["@opentui/core-linux-x64@0.1.55", "", { "os": "linux", "cpu": "x64" }, "sha512-o4RB1jqKWx4TM9v2trGUij6H2ymJCxID8BK3HWvRIjd71tpKkaMY4SxaMWGzvK89X40u8v9qKE04dileKNa10w=="], - "@opentui/core-win32-arm64": ["@opentui/core-win32-arm64@0.1.54", "", { "os": "win32", "cpu": "arm64" }, "sha512-K+E9i8t6YfN0Ly9moHefRQfR5GSbQUAsqzfrW4TD4bpJBy5y7EKh1mz8ZdES/RwWOSGUCb+JN7/ZQm0OubbdvQ=="], + "@opentui/core-win32-arm64": ["@opentui/core-win32-arm64@0.1.55", "", { "os": "win32", "cpu": "arm64" }, "sha512-SYna371ZcQme6XjGI2ESHM2uMUZQRi9kgtJj5E22uH4wgBpPWFwf83EGWv78v+irvsypR+ZJgVfkwkz6JjgVTQ=="], - "@opentui/core-win32-x64": ["@opentui/core-win32-x64@0.1.54", "", { "os": "win32", "cpu": "x64" }, "sha512-0KsBPRtcqmPM1AoN2Ez9au6uf7y8631W9tXTWnVZRlI2/G3j1AfGReR6vuwrd8O4JfxFXiYWWPfSxYZvWLSRNg=="], + "@opentui/core-win32-x64": ["@opentui/core-win32-x64@0.1.55", "", { "os": "win32", "cpu": "x64" }, "sha512-ViPBCm+EtZ/4NmLqLAxcz31lVYGCe1ily+YmfAkoq1K/iuiXGhtD3mDrQuc3ayfTT8w5UwiYKyrUibJVJ/noVQ=="], - "@opentui/solid": ["@opentui/solid@0.1.54", "", { "dependencies": { "@babel/core": "7.28.0", "@babel/preset-typescript": "7.27.1", "@opentui/core": "0.1.54", "babel-plugin-module-resolver": "5.0.2", "babel-preset-solid": "1.9.9", "s-js": "^0.4.9" }, "peerDependencies": { "solid-js": "1.9.9" } }, "sha512-rr9moI+W3meoD57t4Flyfw33mRSFIX0FOx+t4T3sLNA3Pz5FGU2n4qyxPc21OkAuc23S+YxuEuwbZebnIaLGWA=="], + "@opentui/solid": ["@opentui/solid@0.1.55", "", { "dependencies": { "@babel/core": "7.28.0", "@babel/preset-typescript": "7.27.1", "@opentui/core": "0.1.55", "babel-plugin-module-resolver": "5.0.2", "babel-preset-solid": "1.9.9", "s-js": "^0.4.9" }, "peerDependencies": { "solid-js": "1.9.9" } }, "sha512-6NWOt0k32tu5KCiddLkPjVNWd++vW3QNbEccuGOdSiotO5TuwK4g0rcLAG6haPOB7Mf/l6aC06FQNeexpBqvtQ=="], "@oslojs/asn1": ["@oslojs/asn1@1.0.0", "", { "dependencies": { "@oslojs/binary": "1.0.0" } }, "sha512-zw/wn0sj0j0QKbIXfIlnEcTviaCzYOY3V5rAyjR6YtOByFtJiT574+8p9Wlach0lZH9fddD4yb9laEAIl4vXQA=="], diff --git a/flake.lock b/flake.lock index 2ef89f66169..45c31d9ccf2 100644 --- a/flake.lock +++ b/flake.lock @@ -2,11 +2,11 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1764611609, - "narHash": "sha256-yU9BNcP0oadUKupw0UKmO9BKDOVIg9NStdJosEbXf8U=", + "lastModified": 1764642553, + "narHash": "sha256-mvbFFzVBhVK1FjyPHZGMAKpNiqkr7k++xIwy+p/NQvA=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "8c29968b3a942f2903f90797f9623737c215737c", + "rev": "f720de59066162ee879adcc8c79e15c51fe6bfb4", "type": "github" }, "original": { diff --git a/github/sst-env.d.ts b/github/sst-env.d.ts index 6b69016e718..f742a120044 100644 --- a/github/sst-env.d.ts +++ b/github/sst-env.d.ts @@ -6,4 +6,4 @@ /// import "sst" -export {} +export {} \ No newline at end of file diff --git a/infra/console.ts b/infra/console.ts index e090cd90a91..0a98ab07235 100644 --- a/infra/console.ts +++ b/infra/console.ts @@ -116,7 +116,6 @@ const gatewayKv = new sst.cloudflare.Kv("GatewayKv") // CONSOLE //////////////// -const oldBucket = new sst.cloudflare.Bucket("ConsoleData") const bucket = new sst.cloudflare.Bucket("ZenData") const AWS_SES_ACCESS_KEY_ID = new sst.Secret("AWS_SES_ACCESS_KEY_ID") diff --git a/nix/hashes.json b/nix/hashes.json index e34d21200fd..7c7fc45f63e 100644 --- a/nix/hashes.json +++ b/nix/hashes.json @@ -1,3 +1,3 @@ { - "nodeModules": "sha256-HyH219sZn4gOPyVg/bij7K3mfZ0MnBSM/7NmsOyrD4o=" + "nodeModules": "sha256-QhqAa47P3Y2aoMGnr8l1nLq0EQb4qEm75dGfNjyzbpU=" } diff --git a/packages/console/app/package.json b/packages/console/app/package.json index a1cc0c79ef2..6db271e24b1 100644 --- a/packages/console/app/package.json +++ b/packages/console/app/package.json @@ -1,6 +1,6 @@ { "name": "@opencode-ai/console-app", - "version": "1.0.128", + "version": "1.0.129", "type": "module", "scripts": { "typecheck": "tsgo --noEmit", diff --git a/packages/console/app/sst-env.d.ts b/packages/console/app/sst-env.d.ts index bd558821739..9b9de73273f 100644 --- a/packages/console/app/sst-env.d.ts +++ b/packages/console/app/sst-env.d.ts @@ -6,4 +6,4 @@ /// import "sst" -export {} +export {} \ No newline at end of file diff --git a/packages/console/core/package.json b/packages/console/core/package.json index d7230aa0701..69f4d14c352 100644 --- a/packages/console/core/package.json +++ b/packages/console/core/package.json @@ -1,7 +1,7 @@ { "$schema": "https://json.schemastore.org/package.json", "name": "@opencode-ai/console-core", - "version": "1.0.128", + "version": "1.0.129", "private": true, "type": "module", "dependencies": { diff --git a/packages/console/core/src/provider.ts b/packages/console/core/src/provider.ts index a59493e1c76..83461155b96 100644 --- a/packages/console/core/src/provider.ts +++ b/packages/console/core/src/provider.ts @@ -47,7 +47,7 @@ export namespace Provider { }), async ({ provider }) => { Actor.assertAdmin() - Database.use((tx) => + return Database.use((tx) => tx .delete(ProviderTable) .where(and(eq(ProviderTable.provider, provider), eq(ProviderTable.workspaceID, Actor.workspace()))), diff --git a/packages/console/core/sst-env.d.ts b/packages/console/core/sst-env.d.ts index 91566bf6efc..0b09bfd0cd8 100644 --- a/packages/console/core/sst-env.d.ts +++ b/packages/console/core/sst-env.d.ts @@ -6,131 +6,130 @@ import "sst" declare module "sst" { export interface Resource { - ADMIN_SECRET: { - type: "sst.sst.Secret" - value: string - } - AUTH_API_URL: { - type: "sst.sst.Linkable" - value: string - } - AWS_SES_ACCESS_KEY_ID: { - type: "sst.sst.Secret" - value: string - } - AWS_SES_SECRET_ACCESS_KEY: { - type: "sst.sst.Secret" - value: string - } - CLOUDFLARE_API_TOKEN: { - type: "sst.sst.Secret" - value: string - } - CLOUDFLARE_DEFAULT_ACCOUNT_ID: { - type: "sst.sst.Secret" - value: string - } - Console: { - type: "sst.cloudflare.SolidStart" - url: string - } - Database: { - database: string - host: string - password: string - port: number - type: "sst.sst.Linkable" - username: string - } - Desktop: { - type: "sst.cloudflare.StaticSite" - url: string - } - EMAILOCTOPUS_API_KEY: { - type: "sst.sst.Secret" - value: string - } - Enterprise: { - type: "sst.cloudflare.SolidStart" - url: string - } - GITHUB_APP_ID: { - type: "sst.sst.Secret" - value: string - } - GITHUB_APP_PRIVATE_KEY: { - type: "sst.sst.Secret" - value: string - } - GITHUB_CLIENT_ID_CONSOLE: { - type: "sst.sst.Secret" - value: string - } - GITHUB_CLIENT_SECRET_CONSOLE: { - type: "sst.sst.Secret" - value: string - } - GOOGLE_CLIENT_ID: { - type: "sst.sst.Secret" - value: string - } - HONEYCOMB_API_KEY: { - type: "sst.sst.Secret" - value: string - } - R2AccessKey: { - type: "sst.sst.Secret" - value: string - } - R2SecretKey: { - type: "sst.sst.Secret" - value: string - } - STRIPE_SECRET_KEY: { - type: "sst.sst.Secret" - value: string - } - STRIPE_WEBHOOK_SECRET: { - type: "sst.sst.Linkable" - value: string - } - Web: { - type: "sst.cloudflare.Astro" - url: string - } - ZEN_MODELS1: { - type: "sst.sst.Secret" - value: string - } - ZEN_MODELS2: { - type: "sst.sst.Secret" - value: string - } - ZEN_MODELS3: { - type: "sst.sst.Secret" - value: string + "ADMIN_SECRET": { + "type": "sst.sst.Secret" + "value": string + } + "AUTH_API_URL": { + "type": "sst.sst.Linkable" + "value": string + } + "AWS_SES_ACCESS_KEY_ID": { + "type": "sst.sst.Secret" + "value": string + } + "AWS_SES_SECRET_ACCESS_KEY": { + "type": "sst.sst.Secret" + "value": string + } + "CLOUDFLARE_API_TOKEN": { + "type": "sst.sst.Secret" + "value": string + } + "CLOUDFLARE_DEFAULT_ACCOUNT_ID": { + "type": "sst.sst.Secret" + "value": string + } + "Console": { + "type": "sst.cloudflare.SolidStart" + "url": string + } + "Database": { + "database": string + "host": string + "password": string + "port": number + "type": "sst.sst.Linkable" + "username": string + } + "Desktop": { + "type": "sst.cloudflare.StaticSite" + "url": string + } + "EMAILOCTOPUS_API_KEY": { + "type": "sst.sst.Secret" + "value": string + } + "Enterprise": { + "type": "sst.cloudflare.SolidStart" + "url": string + } + "GITHUB_APP_ID": { + "type": "sst.sst.Secret" + "value": string + } + "GITHUB_APP_PRIVATE_KEY": { + "type": "sst.sst.Secret" + "value": string + } + "GITHUB_CLIENT_ID_CONSOLE": { + "type": "sst.sst.Secret" + "value": string + } + "GITHUB_CLIENT_SECRET_CONSOLE": { + "type": "sst.sst.Secret" + "value": string + } + "GOOGLE_CLIENT_ID": { + "type": "sst.sst.Secret" + "value": string + } + "HONEYCOMB_API_KEY": { + "type": "sst.sst.Secret" + "value": string + } + "R2AccessKey": { + "type": "sst.sst.Secret" + "value": string + } + "R2SecretKey": { + "type": "sst.sst.Secret" + "value": string + } + "STRIPE_SECRET_KEY": { + "type": "sst.sst.Secret" + "value": string + } + "STRIPE_WEBHOOK_SECRET": { + "type": "sst.sst.Linkable" + "value": string + } + "Web": { + "type": "sst.cloudflare.Astro" + "url": string + } + "ZEN_MODELS1": { + "type": "sst.sst.Secret" + "value": string + } + "ZEN_MODELS2": { + "type": "sst.sst.Secret" + "value": string + } + "ZEN_MODELS3": { + "type": "sst.sst.Secret" + "value": string } - ZEN_MODELS4: { - type: "sst.sst.Secret" - value: string + "ZEN_MODELS4": { + "type": "sst.sst.Secret" + "value": string } } } -// cloudflare -import * as cloudflare from "@cloudflare/workers-types" +// cloudflare +import * as cloudflare from "@cloudflare/workers-types"; declare module "sst" { export interface Resource { - Api: cloudflare.Service - AuthApi: cloudflare.Service - AuthStorage: cloudflare.KVNamespace - Bucket: cloudflare.R2Bucket - ConsoleData: cloudflare.R2Bucket - EnterpriseStorage: cloudflare.R2Bucket - GatewayKv: cloudflare.KVNamespace - LogProcessor: cloudflare.Service - ZenData: cloudflare.R2Bucket + "Api": cloudflare.Service + "AuthApi": cloudflare.Service + "AuthStorage": cloudflare.KVNamespace + "Bucket": cloudflare.R2Bucket + "EnterpriseStorage": cloudflare.R2Bucket + "GatewayKv": cloudflare.KVNamespace + "LogProcessor": cloudflare.Service + "ZenData": cloudflare.R2Bucket } } import "sst" -export {} +export {} \ No newline at end of file diff --git a/packages/console/function/package.json b/packages/console/function/package.json index 663f6952034..f175147e601 100644 --- a/packages/console/function/package.json +++ b/packages/console/function/package.json @@ -1,6 +1,6 @@ { "name": "@opencode-ai/console-function", - "version": "1.0.128", + "version": "1.0.129", "$schema": "https://json.schemastore.org/package.json", "private": true, "type": "module", diff --git a/packages/console/function/sst-env.d.ts b/packages/console/function/sst-env.d.ts index 91566bf6efc..0b09bfd0cd8 100644 --- a/packages/console/function/sst-env.d.ts +++ b/packages/console/function/sst-env.d.ts @@ -6,131 +6,130 @@ import "sst" declare module "sst" { export interface Resource { - ADMIN_SECRET: { - type: "sst.sst.Secret" - value: string - } - AUTH_API_URL: { - type: "sst.sst.Linkable" - value: string - } - AWS_SES_ACCESS_KEY_ID: { - type: "sst.sst.Secret" - value: string - } - AWS_SES_SECRET_ACCESS_KEY: { - type: "sst.sst.Secret" - value: string - } - CLOUDFLARE_API_TOKEN: { - type: "sst.sst.Secret" - value: string - } - CLOUDFLARE_DEFAULT_ACCOUNT_ID: { - type: "sst.sst.Secret" - value: string - } - Console: { - type: "sst.cloudflare.SolidStart" - url: string - } - Database: { - database: string - host: string - password: string - port: number - type: "sst.sst.Linkable" - username: string - } - Desktop: { - type: "sst.cloudflare.StaticSite" - url: string - } - EMAILOCTOPUS_API_KEY: { - type: "sst.sst.Secret" - value: string - } - Enterprise: { - type: "sst.cloudflare.SolidStart" - url: string - } - GITHUB_APP_ID: { - type: "sst.sst.Secret" - value: string - } - GITHUB_APP_PRIVATE_KEY: { - type: "sst.sst.Secret" - value: string - } - GITHUB_CLIENT_ID_CONSOLE: { - type: "sst.sst.Secret" - value: string - } - GITHUB_CLIENT_SECRET_CONSOLE: { - type: "sst.sst.Secret" - value: string - } - GOOGLE_CLIENT_ID: { - type: "sst.sst.Secret" - value: string - } - HONEYCOMB_API_KEY: { - type: "sst.sst.Secret" - value: string - } - R2AccessKey: { - type: "sst.sst.Secret" - value: string - } - R2SecretKey: { - type: "sst.sst.Secret" - value: string - } - STRIPE_SECRET_KEY: { - type: "sst.sst.Secret" - value: string - } - STRIPE_WEBHOOK_SECRET: { - type: "sst.sst.Linkable" - value: string - } - Web: { - type: "sst.cloudflare.Astro" - url: string - } - ZEN_MODELS1: { - type: "sst.sst.Secret" - value: string - } - ZEN_MODELS2: { - type: "sst.sst.Secret" - value: string - } - ZEN_MODELS3: { - type: "sst.sst.Secret" - value: string + "ADMIN_SECRET": { + "type": "sst.sst.Secret" + "value": string + } + "AUTH_API_URL": { + "type": "sst.sst.Linkable" + "value": string + } + "AWS_SES_ACCESS_KEY_ID": { + "type": "sst.sst.Secret" + "value": string + } + "AWS_SES_SECRET_ACCESS_KEY": { + "type": "sst.sst.Secret" + "value": string + } + "CLOUDFLARE_API_TOKEN": { + "type": "sst.sst.Secret" + "value": string + } + "CLOUDFLARE_DEFAULT_ACCOUNT_ID": { + "type": "sst.sst.Secret" + "value": string + } + "Console": { + "type": "sst.cloudflare.SolidStart" + "url": string + } + "Database": { + "database": string + "host": string + "password": string + "port": number + "type": "sst.sst.Linkable" + "username": string + } + "Desktop": { + "type": "sst.cloudflare.StaticSite" + "url": string + } + "EMAILOCTOPUS_API_KEY": { + "type": "sst.sst.Secret" + "value": string + } + "Enterprise": { + "type": "sst.cloudflare.SolidStart" + "url": string + } + "GITHUB_APP_ID": { + "type": "sst.sst.Secret" + "value": string + } + "GITHUB_APP_PRIVATE_KEY": { + "type": "sst.sst.Secret" + "value": string + } + "GITHUB_CLIENT_ID_CONSOLE": { + "type": "sst.sst.Secret" + "value": string + } + "GITHUB_CLIENT_SECRET_CONSOLE": { + "type": "sst.sst.Secret" + "value": string + } + "GOOGLE_CLIENT_ID": { + "type": "sst.sst.Secret" + "value": string + } + "HONEYCOMB_API_KEY": { + "type": "sst.sst.Secret" + "value": string + } + "R2AccessKey": { + "type": "sst.sst.Secret" + "value": string + } + "R2SecretKey": { + "type": "sst.sst.Secret" + "value": string + } + "STRIPE_SECRET_KEY": { + "type": "sst.sst.Secret" + "value": string + } + "STRIPE_WEBHOOK_SECRET": { + "type": "sst.sst.Linkable" + "value": string + } + "Web": { + "type": "sst.cloudflare.Astro" + "url": string + } + "ZEN_MODELS1": { + "type": "sst.sst.Secret" + "value": string + } + "ZEN_MODELS2": { + "type": "sst.sst.Secret" + "value": string + } + "ZEN_MODELS3": { + "type": "sst.sst.Secret" + "value": string } - ZEN_MODELS4: { - type: "sst.sst.Secret" - value: string + "ZEN_MODELS4": { + "type": "sst.sst.Secret" + "value": string } } } -// cloudflare -import * as cloudflare from "@cloudflare/workers-types" +// cloudflare +import * as cloudflare from "@cloudflare/workers-types"; declare module "sst" { export interface Resource { - Api: cloudflare.Service - AuthApi: cloudflare.Service - AuthStorage: cloudflare.KVNamespace - Bucket: cloudflare.R2Bucket - ConsoleData: cloudflare.R2Bucket - EnterpriseStorage: cloudflare.R2Bucket - GatewayKv: cloudflare.KVNamespace - LogProcessor: cloudflare.Service - ZenData: cloudflare.R2Bucket + "Api": cloudflare.Service + "AuthApi": cloudflare.Service + "AuthStorage": cloudflare.KVNamespace + "Bucket": cloudflare.R2Bucket + "EnterpriseStorage": cloudflare.R2Bucket + "GatewayKv": cloudflare.KVNamespace + "LogProcessor": cloudflare.Service + "ZenData": cloudflare.R2Bucket } } import "sst" -export {} +export {} \ No newline at end of file diff --git a/packages/console/mail/package.json b/packages/console/mail/package.json index 0a451288b1d..5c9505cc903 100644 --- a/packages/console/mail/package.json +++ b/packages/console/mail/package.json @@ -1,6 +1,6 @@ { "name": "@opencode-ai/console-mail", - "version": "1.0.128", + "version": "1.0.129", "dependencies": { "@jsx-email/all": "2.2.3", "@jsx-email/cli": "1.4.3", diff --git a/packages/console/mail/sst-env.d.ts b/packages/console/mail/sst-env.d.ts index bd558821739..9b9de73273f 100644 --- a/packages/console/mail/sst-env.d.ts +++ b/packages/console/mail/sst-env.d.ts @@ -6,4 +6,4 @@ /// import "sst" -export {} +export {} \ No newline at end of file diff --git a/packages/console/resource/sst-env.d.ts b/packages/console/resource/sst-env.d.ts index 91566bf6efc..0b09bfd0cd8 100644 --- a/packages/console/resource/sst-env.d.ts +++ b/packages/console/resource/sst-env.d.ts @@ -6,131 +6,130 @@ import "sst" declare module "sst" { export interface Resource { - ADMIN_SECRET: { - type: "sst.sst.Secret" - value: string - } - AUTH_API_URL: { - type: "sst.sst.Linkable" - value: string - } - AWS_SES_ACCESS_KEY_ID: { - type: "sst.sst.Secret" - value: string - } - AWS_SES_SECRET_ACCESS_KEY: { - type: "sst.sst.Secret" - value: string - } - CLOUDFLARE_API_TOKEN: { - type: "sst.sst.Secret" - value: string - } - CLOUDFLARE_DEFAULT_ACCOUNT_ID: { - type: "sst.sst.Secret" - value: string - } - Console: { - type: "sst.cloudflare.SolidStart" - url: string - } - Database: { - database: string - host: string - password: string - port: number - type: "sst.sst.Linkable" - username: string - } - Desktop: { - type: "sst.cloudflare.StaticSite" - url: string - } - EMAILOCTOPUS_API_KEY: { - type: "sst.sst.Secret" - value: string - } - Enterprise: { - type: "sst.cloudflare.SolidStart" - url: string - } - GITHUB_APP_ID: { - type: "sst.sst.Secret" - value: string - } - GITHUB_APP_PRIVATE_KEY: { - type: "sst.sst.Secret" - value: string - } - GITHUB_CLIENT_ID_CONSOLE: { - type: "sst.sst.Secret" - value: string - } - GITHUB_CLIENT_SECRET_CONSOLE: { - type: "sst.sst.Secret" - value: string - } - GOOGLE_CLIENT_ID: { - type: "sst.sst.Secret" - value: string - } - HONEYCOMB_API_KEY: { - type: "sst.sst.Secret" - value: string - } - R2AccessKey: { - type: "sst.sst.Secret" - value: string - } - R2SecretKey: { - type: "sst.sst.Secret" - value: string - } - STRIPE_SECRET_KEY: { - type: "sst.sst.Secret" - value: string - } - STRIPE_WEBHOOK_SECRET: { - type: "sst.sst.Linkable" - value: string - } - Web: { - type: "sst.cloudflare.Astro" - url: string - } - ZEN_MODELS1: { - type: "sst.sst.Secret" - value: string - } - ZEN_MODELS2: { - type: "sst.sst.Secret" - value: string - } - ZEN_MODELS3: { - type: "sst.sst.Secret" - value: string + "ADMIN_SECRET": { + "type": "sst.sst.Secret" + "value": string + } + "AUTH_API_URL": { + "type": "sst.sst.Linkable" + "value": string + } + "AWS_SES_ACCESS_KEY_ID": { + "type": "sst.sst.Secret" + "value": string + } + "AWS_SES_SECRET_ACCESS_KEY": { + "type": "sst.sst.Secret" + "value": string + } + "CLOUDFLARE_API_TOKEN": { + "type": "sst.sst.Secret" + "value": string + } + "CLOUDFLARE_DEFAULT_ACCOUNT_ID": { + "type": "sst.sst.Secret" + "value": string + } + "Console": { + "type": "sst.cloudflare.SolidStart" + "url": string + } + "Database": { + "database": string + "host": string + "password": string + "port": number + "type": "sst.sst.Linkable" + "username": string + } + "Desktop": { + "type": "sst.cloudflare.StaticSite" + "url": string + } + "EMAILOCTOPUS_API_KEY": { + "type": "sst.sst.Secret" + "value": string + } + "Enterprise": { + "type": "sst.cloudflare.SolidStart" + "url": string + } + "GITHUB_APP_ID": { + "type": "sst.sst.Secret" + "value": string + } + "GITHUB_APP_PRIVATE_KEY": { + "type": "sst.sst.Secret" + "value": string + } + "GITHUB_CLIENT_ID_CONSOLE": { + "type": "sst.sst.Secret" + "value": string + } + "GITHUB_CLIENT_SECRET_CONSOLE": { + "type": "sst.sst.Secret" + "value": string + } + "GOOGLE_CLIENT_ID": { + "type": "sst.sst.Secret" + "value": string + } + "HONEYCOMB_API_KEY": { + "type": "sst.sst.Secret" + "value": string + } + "R2AccessKey": { + "type": "sst.sst.Secret" + "value": string + } + "R2SecretKey": { + "type": "sst.sst.Secret" + "value": string + } + "STRIPE_SECRET_KEY": { + "type": "sst.sst.Secret" + "value": string + } + "STRIPE_WEBHOOK_SECRET": { + "type": "sst.sst.Linkable" + "value": string + } + "Web": { + "type": "sst.cloudflare.Astro" + "url": string + } + "ZEN_MODELS1": { + "type": "sst.sst.Secret" + "value": string + } + "ZEN_MODELS2": { + "type": "sst.sst.Secret" + "value": string + } + "ZEN_MODELS3": { + "type": "sst.sst.Secret" + "value": string } - ZEN_MODELS4: { - type: "sst.sst.Secret" - value: string + "ZEN_MODELS4": { + "type": "sst.sst.Secret" + "value": string } } } -// cloudflare -import * as cloudflare from "@cloudflare/workers-types" +// cloudflare +import * as cloudflare from "@cloudflare/workers-types"; declare module "sst" { export interface Resource { - Api: cloudflare.Service - AuthApi: cloudflare.Service - AuthStorage: cloudflare.KVNamespace - Bucket: cloudflare.R2Bucket - ConsoleData: cloudflare.R2Bucket - EnterpriseStorage: cloudflare.R2Bucket - GatewayKv: cloudflare.KVNamespace - LogProcessor: cloudflare.Service - ZenData: cloudflare.R2Bucket + "Api": cloudflare.Service + "AuthApi": cloudflare.Service + "AuthStorage": cloudflare.KVNamespace + "Bucket": cloudflare.R2Bucket + "EnterpriseStorage": cloudflare.R2Bucket + "GatewayKv": cloudflare.KVNamespace + "LogProcessor": cloudflare.Service + "ZenData": cloudflare.R2Bucket } } import "sst" -export {} +export {} \ No newline at end of file diff --git a/packages/desktop/package.json b/packages/desktop/package.json index bf0b436fc79..4b797f62af6 100644 --- a/packages/desktop/package.json +++ b/packages/desktop/package.json @@ -1,6 +1,6 @@ { "name": "@opencode-ai/desktop", - "version": "1.0.128", + "version": "1.0.129", "description": "", "type": "module", "scripts": { diff --git a/packages/desktop/src/pages/session.tsx b/packages/desktop/src/pages/session.tsx index 515f67a7c69..d6ce62b7030 100644 --- a/packages/desktop/src/pages/session.tsx +++ b/packages/desktop/src/pages/session.tsx @@ -355,7 +355,13 @@ export default function Page() { classes={{ root: "pb-20 flex-1 min-w-0", content: "pb-20", - container: "w-full " + (wide() ? "max-w-146 mx-auto px-6" : "pr-6 pl-18"), + container: + "w-full " + + (wide() + ? "max-w-146 mx-auto px-6" + : session.messages.user().length > 1 + ? "pr-6 pl-18" + : "px-6"), }} diffComponent={Diff} /> diff --git a/packages/desktop/src/sst-env.d.ts b/packages/desktop/src/sst-env.d.ts index 1b1683a1e74..47a8fbec7bf 100644 --- a/packages/desktop/src/sst-env.d.ts +++ b/packages/desktop/src/sst-env.d.ts @@ -2,7 +2,9 @@ /* tslint:disable */ /* eslint-disable */ /// -interface ImportMetaEnv {} +interface ImportMetaEnv { + +} interface ImportMeta { readonly env: ImportMetaEnv -} +} \ No newline at end of file diff --git a/packages/desktop/sst-env.d.ts b/packages/desktop/sst-env.d.ts index 0397645b50f..b6a7e9066ef 100644 --- a/packages/desktop/sst-env.d.ts +++ b/packages/desktop/sst-env.d.ts @@ -6,4 +6,4 @@ /// import "sst" -export {} +export {} \ No newline at end of file diff --git a/packages/enterprise/package.json b/packages/enterprise/package.json index 35b7d8e0f9e..96c973b66f9 100644 --- a/packages/enterprise/package.json +++ b/packages/enterprise/package.json @@ -1,6 +1,6 @@ { "name": "@opencode-ai/enterprise", - "version": "1.0.128", + "version": "1.0.129", "private": true, "type": "module", "scripts": { diff --git a/packages/enterprise/src/routes/share/[shareID].tsx b/packages/enterprise/src/routes/share/[shareID].tsx index f579bfa0388..5f6a0948608 100644 --- a/packages/enterprise/src/routes/share/[shareID].tsx +++ b/packages/enterprise/src/routes/share/[shareID].tsx @@ -284,7 +284,8 @@ export default function () { classList={{ "w-full flex justify-start items-start min-w-0": true, "max-w-146 mx-auto px-6": wide(), - "pr-6 pl-18": !wide(), + "pr-6 pl-18": !wide() && messages().length > 1, + "px-6": !wide() && messages().length === 1, }} > {title()} @@ -302,7 +303,9 @@ export default function () { classes={{ root: "grow", content: "flex flex-col justify-between items-start", - container: "w-full pb-20 " + (wide() ? "max-w-146 mx-auto px-6" : "pr-6 pl-18"), + container: + "w-full pb-20 " + + (wide() ? "max-w-146 mx-auto px-6" : messages().length > 1 ? "pr-6 pl-18" : "px-6"), }} diffComponent={ClientOnlyDiff} > diff --git a/packages/enterprise/sst-env.d.ts b/packages/enterprise/sst-env.d.ts index 91566bf6efc..0b09bfd0cd8 100644 --- a/packages/enterprise/sst-env.d.ts +++ b/packages/enterprise/sst-env.d.ts @@ -6,131 +6,130 @@ import "sst" declare module "sst" { export interface Resource { - ADMIN_SECRET: { - type: "sst.sst.Secret" - value: string - } - AUTH_API_URL: { - type: "sst.sst.Linkable" - value: string - } - AWS_SES_ACCESS_KEY_ID: { - type: "sst.sst.Secret" - value: string - } - AWS_SES_SECRET_ACCESS_KEY: { - type: "sst.sst.Secret" - value: string - } - CLOUDFLARE_API_TOKEN: { - type: "sst.sst.Secret" - value: string - } - CLOUDFLARE_DEFAULT_ACCOUNT_ID: { - type: "sst.sst.Secret" - value: string - } - Console: { - type: "sst.cloudflare.SolidStart" - url: string - } - Database: { - database: string - host: string - password: string - port: number - type: "sst.sst.Linkable" - username: string - } - Desktop: { - type: "sst.cloudflare.StaticSite" - url: string - } - EMAILOCTOPUS_API_KEY: { - type: "sst.sst.Secret" - value: string - } - Enterprise: { - type: "sst.cloudflare.SolidStart" - url: string - } - GITHUB_APP_ID: { - type: "sst.sst.Secret" - value: string - } - GITHUB_APP_PRIVATE_KEY: { - type: "sst.sst.Secret" - value: string - } - GITHUB_CLIENT_ID_CONSOLE: { - type: "sst.sst.Secret" - value: string - } - GITHUB_CLIENT_SECRET_CONSOLE: { - type: "sst.sst.Secret" - value: string - } - GOOGLE_CLIENT_ID: { - type: "sst.sst.Secret" - value: string - } - HONEYCOMB_API_KEY: { - type: "sst.sst.Secret" - value: string - } - R2AccessKey: { - type: "sst.sst.Secret" - value: string - } - R2SecretKey: { - type: "sst.sst.Secret" - value: string - } - STRIPE_SECRET_KEY: { - type: "sst.sst.Secret" - value: string - } - STRIPE_WEBHOOK_SECRET: { - type: "sst.sst.Linkable" - value: string - } - Web: { - type: "sst.cloudflare.Astro" - url: string - } - ZEN_MODELS1: { - type: "sst.sst.Secret" - value: string - } - ZEN_MODELS2: { - type: "sst.sst.Secret" - value: string - } - ZEN_MODELS3: { - type: "sst.sst.Secret" - value: string + "ADMIN_SECRET": { + "type": "sst.sst.Secret" + "value": string + } + "AUTH_API_URL": { + "type": "sst.sst.Linkable" + "value": string + } + "AWS_SES_ACCESS_KEY_ID": { + "type": "sst.sst.Secret" + "value": string + } + "AWS_SES_SECRET_ACCESS_KEY": { + "type": "sst.sst.Secret" + "value": string + } + "CLOUDFLARE_API_TOKEN": { + "type": "sst.sst.Secret" + "value": string + } + "CLOUDFLARE_DEFAULT_ACCOUNT_ID": { + "type": "sst.sst.Secret" + "value": string + } + "Console": { + "type": "sst.cloudflare.SolidStart" + "url": string + } + "Database": { + "database": string + "host": string + "password": string + "port": number + "type": "sst.sst.Linkable" + "username": string + } + "Desktop": { + "type": "sst.cloudflare.StaticSite" + "url": string + } + "EMAILOCTOPUS_API_KEY": { + "type": "sst.sst.Secret" + "value": string + } + "Enterprise": { + "type": "sst.cloudflare.SolidStart" + "url": string + } + "GITHUB_APP_ID": { + "type": "sst.sst.Secret" + "value": string + } + "GITHUB_APP_PRIVATE_KEY": { + "type": "sst.sst.Secret" + "value": string + } + "GITHUB_CLIENT_ID_CONSOLE": { + "type": "sst.sst.Secret" + "value": string + } + "GITHUB_CLIENT_SECRET_CONSOLE": { + "type": "sst.sst.Secret" + "value": string + } + "GOOGLE_CLIENT_ID": { + "type": "sst.sst.Secret" + "value": string + } + "HONEYCOMB_API_KEY": { + "type": "sst.sst.Secret" + "value": string + } + "R2AccessKey": { + "type": "sst.sst.Secret" + "value": string + } + "R2SecretKey": { + "type": "sst.sst.Secret" + "value": string + } + "STRIPE_SECRET_KEY": { + "type": "sst.sst.Secret" + "value": string + } + "STRIPE_WEBHOOK_SECRET": { + "type": "sst.sst.Linkable" + "value": string + } + "Web": { + "type": "sst.cloudflare.Astro" + "url": string + } + "ZEN_MODELS1": { + "type": "sst.sst.Secret" + "value": string + } + "ZEN_MODELS2": { + "type": "sst.sst.Secret" + "value": string + } + "ZEN_MODELS3": { + "type": "sst.sst.Secret" + "value": string } - ZEN_MODELS4: { - type: "sst.sst.Secret" - value: string + "ZEN_MODELS4": { + "type": "sst.sst.Secret" + "value": string } } } -// cloudflare -import * as cloudflare from "@cloudflare/workers-types" +// cloudflare +import * as cloudflare from "@cloudflare/workers-types"; declare module "sst" { export interface Resource { - Api: cloudflare.Service - AuthApi: cloudflare.Service - AuthStorage: cloudflare.KVNamespace - Bucket: cloudflare.R2Bucket - ConsoleData: cloudflare.R2Bucket - EnterpriseStorage: cloudflare.R2Bucket - GatewayKv: cloudflare.KVNamespace - LogProcessor: cloudflare.Service - ZenData: cloudflare.R2Bucket + "Api": cloudflare.Service + "AuthApi": cloudflare.Service + "AuthStorage": cloudflare.KVNamespace + "Bucket": cloudflare.R2Bucket + "EnterpriseStorage": cloudflare.R2Bucket + "GatewayKv": cloudflare.KVNamespace + "LogProcessor": cloudflare.Service + "ZenData": cloudflare.R2Bucket } } import "sst" -export {} +export {} \ No newline at end of file diff --git a/packages/extensions/zed/extension.toml b/packages/extensions/zed/extension.toml index ffbc3c2b7a6..1a9788adb30 100644 --- a/packages/extensions/zed/extension.toml +++ b/packages/extensions/zed/extension.toml @@ -1,7 +1,7 @@ id = "opencode" name = "OpenCode" description = "The AI coding agent built for the terminal" -version = "1.0.128" +version = "1.0.129" 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.128/opencode-darwin-arm64.zip" +archive = "https://github.com/sst/opencode/releases/download/v1.0.129/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.128/opencode-darwin-x64.zip" +archive = "https://github.com/sst/opencode/releases/download/v1.0.129/opencode-darwin-x64.zip" cmd = "./opencode" args = ["acp"] [agent_servers.opencode.targets.linux-aarch64] -archive = "https://github.com/sst/opencode/releases/download/v1.0.128/opencode-linux-arm64.zip" +archive = "https://github.com/sst/opencode/releases/download/v1.0.129/opencode-linux-arm64.zip" cmd = "./opencode" args = ["acp"] [agent_servers.opencode.targets.linux-x86_64] -archive = "https://github.com/sst/opencode/releases/download/v1.0.128/opencode-linux-x64.zip" +archive = "https://github.com/sst/opencode/releases/download/v1.0.129/opencode-linux-x64.zip" cmd = "./opencode" args = ["acp"] [agent_servers.opencode.targets.windows-x86_64] -archive = "https://github.com/sst/opencode/releases/download/v1.0.128/opencode-windows-x64.zip" +archive = "https://github.com/sst/opencode/releases/download/v1.0.129/opencode-windows-x64.zip" cmd = "./opencode.exe" args = ["acp"] diff --git a/packages/function/package.json b/packages/function/package.json index 67d867872df..7c886f44d86 100644 --- a/packages/function/package.json +++ b/packages/function/package.json @@ -1,6 +1,6 @@ { "name": "@opencode-ai/function", - "version": "1.0.128", + "version": "1.0.129", "$schema": "https://json.schemastore.org/package.json", "private": true, "type": "module", diff --git a/packages/function/sst-env.d.ts b/packages/function/sst-env.d.ts index 91566bf6efc..0b09bfd0cd8 100644 --- a/packages/function/sst-env.d.ts +++ b/packages/function/sst-env.d.ts @@ -6,131 +6,130 @@ import "sst" declare module "sst" { export interface Resource { - ADMIN_SECRET: { - type: "sst.sst.Secret" - value: string - } - AUTH_API_URL: { - type: "sst.sst.Linkable" - value: string - } - AWS_SES_ACCESS_KEY_ID: { - type: "sst.sst.Secret" - value: string - } - AWS_SES_SECRET_ACCESS_KEY: { - type: "sst.sst.Secret" - value: string - } - CLOUDFLARE_API_TOKEN: { - type: "sst.sst.Secret" - value: string - } - CLOUDFLARE_DEFAULT_ACCOUNT_ID: { - type: "sst.sst.Secret" - value: string - } - Console: { - type: "sst.cloudflare.SolidStart" - url: string - } - Database: { - database: string - host: string - password: string - port: number - type: "sst.sst.Linkable" - username: string - } - Desktop: { - type: "sst.cloudflare.StaticSite" - url: string - } - EMAILOCTOPUS_API_KEY: { - type: "sst.sst.Secret" - value: string - } - Enterprise: { - type: "sst.cloudflare.SolidStart" - url: string - } - GITHUB_APP_ID: { - type: "sst.sst.Secret" - value: string - } - GITHUB_APP_PRIVATE_KEY: { - type: "sst.sst.Secret" - value: string - } - GITHUB_CLIENT_ID_CONSOLE: { - type: "sst.sst.Secret" - value: string - } - GITHUB_CLIENT_SECRET_CONSOLE: { - type: "sst.sst.Secret" - value: string - } - GOOGLE_CLIENT_ID: { - type: "sst.sst.Secret" - value: string - } - HONEYCOMB_API_KEY: { - type: "sst.sst.Secret" - value: string - } - R2AccessKey: { - type: "sst.sst.Secret" - value: string - } - R2SecretKey: { - type: "sst.sst.Secret" - value: string - } - STRIPE_SECRET_KEY: { - type: "sst.sst.Secret" - value: string - } - STRIPE_WEBHOOK_SECRET: { - type: "sst.sst.Linkable" - value: string - } - Web: { - type: "sst.cloudflare.Astro" - url: string - } - ZEN_MODELS1: { - type: "sst.sst.Secret" - value: string - } - ZEN_MODELS2: { - type: "sst.sst.Secret" - value: string - } - ZEN_MODELS3: { - type: "sst.sst.Secret" - value: string + "ADMIN_SECRET": { + "type": "sst.sst.Secret" + "value": string + } + "AUTH_API_URL": { + "type": "sst.sst.Linkable" + "value": string + } + "AWS_SES_ACCESS_KEY_ID": { + "type": "sst.sst.Secret" + "value": string + } + "AWS_SES_SECRET_ACCESS_KEY": { + "type": "sst.sst.Secret" + "value": string + } + "CLOUDFLARE_API_TOKEN": { + "type": "sst.sst.Secret" + "value": string + } + "CLOUDFLARE_DEFAULT_ACCOUNT_ID": { + "type": "sst.sst.Secret" + "value": string + } + "Console": { + "type": "sst.cloudflare.SolidStart" + "url": string + } + "Database": { + "database": string + "host": string + "password": string + "port": number + "type": "sst.sst.Linkable" + "username": string + } + "Desktop": { + "type": "sst.cloudflare.StaticSite" + "url": string + } + "EMAILOCTOPUS_API_KEY": { + "type": "sst.sst.Secret" + "value": string + } + "Enterprise": { + "type": "sst.cloudflare.SolidStart" + "url": string + } + "GITHUB_APP_ID": { + "type": "sst.sst.Secret" + "value": string + } + "GITHUB_APP_PRIVATE_KEY": { + "type": "sst.sst.Secret" + "value": string + } + "GITHUB_CLIENT_ID_CONSOLE": { + "type": "sst.sst.Secret" + "value": string + } + "GITHUB_CLIENT_SECRET_CONSOLE": { + "type": "sst.sst.Secret" + "value": string + } + "GOOGLE_CLIENT_ID": { + "type": "sst.sst.Secret" + "value": string + } + "HONEYCOMB_API_KEY": { + "type": "sst.sst.Secret" + "value": string + } + "R2AccessKey": { + "type": "sst.sst.Secret" + "value": string + } + "R2SecretKey": { + "type": "sst.sst.Secret" + "value": string + } + "STRIPE_SECRET_KEY": { + "type": "sst.sst.Secret" + "value": string + } + "STRIPE_WEBHOOK_SECRET": { + "type": "sst.sst.Linkable" + "value": string + } + "Web": { + "type": "sst.cloudflare.Astro" + "url": string + } + "ZEN_MODELS1": { + "type": "sst.sst.Secret" + "value": string + } + "ZEN_MODELS2": { + "type": "sst.sst.Secret" + "value": string + } + "ZEN_MODELS3": { + "type": "sst.sst.Secret" + "value": string } - ZEN_MODELS4: { - type: "sst.sst.Secret" - value: string + "ZEN_MODELS4": { + "type": "sst.sst.Secret" + "value": string } } } -// cloudflare -import * as cloudflare from "@cloudflare/workers-types" +// cloudflare +import * as cloudflare from "@cloudflare/workers-types"; declare module "sst" { export interface Resource { - Api: cloudflare.Service - AuthApi: cloudflare.Service - AuthStorage: cloudflare.KVNamespace - Bucket: cloudflare.R2Bucket - ConsoleData: cloudflare.R2Bucket - EnterpriseStorage: cloudflare.R2Bucket - GatewayKv: cloudflare.KVNamespace - LogProcessor: cloudflare.Service - ZenData: cloudflare.R2Bucket + "Api": cloudflare.Service + "AuthApi": cloudflare.Service + "AuthStorage": cloudflare.KVNamespace + "Bucket": cloudflare.R2Bucket + "EnterpriseStorage": cloudflare.R2Bucket + "GatewayKv": cloudflare.KVNamespace + "LogProcessor": cloudflare.Service + "ZenData": cloudflare.R2Bucket } } import "sst" -export {} +export {} \ No newline at end of file diff --git a/packages/opencode/package.json b/packages/opencode/package.json index fc8d87e006e..7c2a7f50d54 100644 --- a/packages/opencode/package.json +++ b/packages/opencode/package.json @@ -1,6 +1,6 @@ { "$schema": "https://json.schemastore.org/package.json", - "version": "1.0.128", + "version": "1.0.129", "name": "opencode", "type": "module", "private": true, @@ -64,8 +64,8 @@ "@opencode-ai/sdk": "workspace:*", "@opencode-ai/util": "workspace:*", "@openrouter/ai-sdk-provider": "1.2.8", - "@opentui/core": "0.1.54", - "@opentui/solid": "0.1.54", + "@opentui/core": "0.1.55", + "@opentui/solid": "0.1.55", "@parcel/watcher": "2.5.1", "@pierre/precision-diffs": "catalog:", "@solid-primitives/event-bus": "1.1.2", diff --git a/packages/opencode/src/cli/cmd/session.ts b/packages/opencode/src/cli/cmd/session.ts new file mode 100644 index 00000000000..c8b5b033660 --- /dev/null +++ b/packages/opencode/src/cli/cmd/session.ts @@ -0,0 +1,106 @@ +import type { Argv } from "yargs" +import { cmd } from "./cmd" +import { Session } from "../../session" +import { bootstrap } from "../bootstrap" +import { UI } from "../ui" +import { Locale } from "../../util/locale" +import { EOL } from "os" + +export const SessionCommand = cmd({ + command: "session", + describe: "manage sessions", + builder: (yargs: Argv) => yargs.command(SessionListCommand).demandCommand(), + async handler() {}, +}) + +export const SessionListCommand = cmd({ + command: "list", + describe: "list sessions", + builder: (yargs: Argv) => { + return yargs + .option("max-count", { + alias: "n", + describe: "limit to N most recent sessions", + type: "number", + }) + .option("format", { + describe: "output format", + type: "string", + choices: ["table", "json"], + default: "table", + }) + }, + handler: async (args) => { + await bootstrap(process.cwd(), async () => { + const sessions = [] + for await (const session of Session.list()) { + if (!session.parentID) { + sessions.push(session) + } + } + + sessions.sort((a, b) => b.time.updated - a.time.updated) + + const limitedSessions = args.maxCount ? sessions.slice(0, args.maxCount) : sessions + + if (limitedSessions.length === 0) { + return + } + + let output: string + if (args.format === "json") { + output = formatSessionJSON(limitedSessions) + } else { + output = formatSessionTable(limitedSessions) + } + + const shouldPaginate = process.stdout.isTTY && !args.maxCount && args.format === "table" + + if (shouldPaginate) { + const proc = Bun.spawn({ + cmd: ["less", "-R", "-S"], + stdin: "pipe", + stdout: "inherit", + stderr: "inherit", + }) + + proc.stdin.write(output) + proc.stdin.end() + await proc.exited + } else { + console.log(output) + } + }) + }, +}) + +function formatSessionTable(sessions: Session.Info[]): string { + const lines: string[] = [] + + const maxIdWidth = Math.max(20, ...sessions.map((s) => s.id.length)) + const maxTitleWidth = Math.max(25, ...sessions.map((s) => s.title.length)) + + const header = `Session ID${" ".repeat(maxIdWidth - 10)} Title${" ".repeat(maxTitleWidth - 5)} Updated` + lines.push(header) + lines.push("─".repeat(header.length)) + for (const session of sessions) { + const truncatedTitle = Locale.truncate(session.title, maxTitleWidth) + const timeStr = Locale.todayTimeOrDateTime(session.time.updated) + const line = `${session.id.padEnd(maxIdWidth)} ${truncatedTitle.padEnd(maxTitleWidth)} ${timeStr}` + lines.push(line) + } + + return lines.join(EOL) +} + +function formatSessionJSON(sessions: Session.Info[]): string { + const jsonData = sessions.map((session) => ({ + id: session.id, + title: session.title, + updated: session.time.updated, + created: session.time.created, + projectId: session.projectID, + directory: session.directory, + })) + return JSON.stringify(jsonData, null, 2) +} diff --git a/packages/opencode/src/cli/cmd/tui/app.tsx b/packages/opencode/src/cli/cmd/tui/app.tsx index b3e2b80460e..3fcda7d4563 100644 --- a/packages/opencode/src/cli/cmd/tui/app.tsx +++ b/packages/opencode/src/cli/cmd/tui/app.tsx @@ -5,6 +5,7 @@ import { RouteProvider, useRoute } from "@tui/context/route" import { Switch, Match, createEffect, untrack, ErrorBoundary, createSignal, onMount, batch, Show, on } from "solid-js" import { Installation } from "@/installation" import { Global } from "@/global" +import { Flag } from "@/flag/flag" import { DialogProvider, useDialog } from "@tui/ui/dialog" import { DialogProvider as DialogProviderList } from "@tui/component/dialog-provider" import { SDKProvider, useSDK } from "@tui/context/sdk" @@ -312,10 +313,11 @@ function App() { category: "System", }, { - title: `Switch to ${mode() === "dark" ? "light" : "dark"} mode`, + title: "Toggle appearance", value: "theme.switch_mode", - onSelect: () => { + onSelect: (dialog) => { setMode(mode() === "dark" ? "light" : "dark") + dialog.clear() }, category: "System", }, @@ -460,6 +462,10 @@ function App() { height={dimensions().height} backgroundColor={theme.background} onMouseUp={async () => { + if (Flag.OPENCODE_EXPERIMENTAL_DISABLE_COPY_ON_SELECT) { + renderer.clearSelection() + return + } const text = renderer.getSelection()?.getSelectedText() if (text && text.length > 0) { const base64 = Buffer.from(text).toString("base64") diff --git a/packages/opencode/src/cli/cmd/tui/context/theme.tsx b/packages/opencode/src/cli/cmd/tui/context/theme.tsx index c985dc0947e..2ae55ea47d8 100644 --- a/packages/opencode/src/cli/cmd/tui/context/theme.tsx +++ b/packages/opencode/src/cli/cmd/tui/context/theme.tsx @@ -161,7 +161,7 @@ function resolveTheme(theme: ThemeJson, mode: "dark" | "light") { if (c.startsWith("#")) return RGBA.fromHex(c) - if (defs[c]) { + if (defs[c] != null) { return resolveColor(defs[c]) } else if (theme.theme[c as keyof ThemeColors] !== undefined) { return resolveColor(theme.theme[c as keyof ThemeColors]!) diff --git a/packages/opencode/src/cli/cmd/tui/routes/session/index.tsx b/packages/opencode/src/cli/cmd/tui/routes/session/index.tsx index cf334da97ff..38a399848af 100644 --- a/packages/opencode/src/cli/cmd/tui/routes/session/index.tsx +++ b/packages/opencode/src/cli/cmd/tui/routes/session/index.tsx @@ -99,6 +99,7 @@ const context = createContext<{ showThinking: () => boolean showTimestamps: () => boolean showTokens: () => boolean + usernameVisible: () => boolean showDetails: () => boolean diffWrapMode: () => "word" | "none" sync: ReturnType @@ -148,6 +149,7 @@ export function Session() { const [showThinking, setShowThinking] = createSignal(kv.get("thinking_visibility", true)) const [showTimestamps, setShowTimestamps] = createSignal(kv.get("timestamps", "hide") === "show") const [showTokens, setShowTokens] = createSignal(kv.get("tokens", "hide") === "show") + const [usernameVisible, setUsernameVisible] = createSignal(kv.get("username_visible", true)) const [showDetails, setShowDetails] = createSignal(kv.get("tool_details_visibility", true)) const [bashOutput, setBashOutput] = createSignal(undefined) const [promptDraft, setPromptDraft] = createSignal("") @@ -573,6 +575,20 @@ export function Session() { dialog.clear() }, }, + { + title: usernameVisible() ? "Hide username" : "Show username", + value: "session.username_visible.toggle", + keybind: "username_toggle", + category: "Session", + onSelect: (dialog) => { + setUsernameVisible((prev) => { + const next = !prev + kv.set("username_visible", next) + return next + }) + dialog.clear() + }, + }, { title: "Toggle code concealment", value: "session.toggle.conceal", @@ -958,6 +974,7 @@ export function Session() { showThinking, showTimestamps, showTokens, + usernameVisible, showDetails, diffWrapMode, sync, @@ -1245,13 +1262,14 @@ function UserMessage(props: { pending?: string }) { const ctx = use() + const local = useLocal() const text = createMemo(() => props.parts.flatMap((x) => (x.type === "text" && !x.synthetic ? [x] : []))[0]) const files = createMemo(() => props.parts.flatMap((x) => (x.type === "file" ? [x] : []))) const sync = useSync() const { theme } = useTheme() const [hover, setHover] = createSignal(false) const queued = createMemo(() => props.pending && props.message.id > props.pending) - const color = createMemo(() => (queued() ? theme.accent : theme.secondary)) + const color = createMemo(() => (queued() ? theme.accent : local.agent.color(props.message.agent))) const individualTokens = createMemo(() => { return props.parts.reduce((sum, part) => { @@ -1314,7 +1332,7 @@ function UserMessage(props: { - {sync.data.config.username ?? "You"}{" "} + {ctx.usernameVisible() ? `${sync.data.config.username ?? "You"} ` : "You"}{" "} {}) + const method = await Installation.method() + const latest = await Installation.latest(method).catch(() => {}) if (!latest) return if (Installation.VERSION === latest) return @@ -17,7 +18,6 @@ export async function upgrade() { return } - const method = await Installation.method() if (method === "unknown") return await Installation.upgrade(method, latest) .then(() => Bus.publish(Installation.Event.Updated, { version: latest })) diff --git a/packages/opencode/src/config/config.ts b/packages/opencode/src/config/config.ts index 2425201ebc4..2ee32fbaf61 100644 --- a/packages/opencode/src/config/config.ts +++ b/packages/opencode/src/config/config.ts @@ -399,6 +399,7 @@ export namespace Config { editor_open: z.string().optional().default("e").describe("Open external editor"), theme_list: z.string().optional().default("t").describe("List available themes"), sidebar_toggle: z.string().optional().default("b").describe("Toggle sidebar"), + username_toggle: z.string().optional().default("none").describe("Toggle username visibility"), status_view: z.string().optional().default("s").describe("View status"), session_export: z.string().optional().default("x").describe("Export session to editor"), session_new: z.string().optional().default("n").describe("Create a new session"), diff --git a/packages/opencode/src/file/index.ts b/packages/opencode/src/file/index.ts index aae7061c17a..51934a2356d 100644 --- a/packages/opencode/src/file/index.ts +++ b/packages/opencode/src/file/index.ts @@ -276,11 +276,16 @@ export namespace File { const project = Instance.project let ignored = (_: string) => false if (project.vcs === "git") { + const ig = ignore() const gitignore = Bun.file(path.join(Instance.worktree, ".gitignore")) if (await gitignore.exists()) { - const ig = ignore().add(await gitignore.text()) - ignored = ig.ignores.bind(ig) + ig.add(await gitignore.text()) } + const ignoreFile = Bun.file(path.join(Instance.worktree, ".ignore")) + if (await ignoreFile.exists()) { + ig.add(await ignoreFile.text()) + } + ignored = ig.ignores.bind(ig) } const resolved = dir ? path.join(Instance.directory, dir) : Instance.directory const nodes: Node[] = [] diff --git a/packages/opencode/src/flag/flag.ts b/packages/opencode/src/flag/flag.ts index 4edbd5ace0a..9a3d0437be5 100644 --- a/packages/opencode/src/flag/flag.ts +++ b/packages/opencode/src/flag/flag.ts @@ -17,6 +17,7 @@ export namespace Flag { // Experimental export const OPENCODE_EXPERIMENTAL = truthy("OPENCODE_EXPERIMENTAL") export const OPENCODE_EXPERIMENTAL_WATCHER = OPENCODE_EXPERIMENTAL || truthy("OPENCODE_EXPERIMENTAL_WATCHER") + export const OPENCODE_EXPERIMENTAL_DISABLE_COPY_ON_SELECT = truthy("OPENCODE_EXPERIMENTAL_DISABLE_COPY_ON_SELECT") function truthy(key: string) { const value = process.env[key]?.toLowerCase() diff --git a/packages/opencode/src/index.ts b/packages/opencode/src/index.ts index 5fb6f966cfd..5ddf68e10cd 100644 --- a/packages/opencode/src/index.ts +++ b/packages/opencode/src/index.ts @@ -25,6 +25,7 @@ import { AcpCommand } from "./cli/cmd/acp" import { EOL } from "os" import { WebCommand } from "./cli/cmd/web" import { PrCommand } from "./cli/cmd/pr" +import { SessionCommand } from "./cli/cmd/session" process.on("unhandledRejection", (e) => { Log.Default.error("rejection", { @@ -93,6 +94,7 @@ const cli = yargs(hideBin(process.argv)) .command(ImportCommand) .command(GithubCommand) .command(PrCommand) + .command(SessionCommand) .fail((msg) => { if ( msg.startsWith("Unknown argument") || diff --git a/packages/opencode/src/installation/index.ts b/packages/opencode/src/installation/index.ts index cc148de7739..58c949a777e 100644 --- a/packages/opencode/src/installation/index.ts +++ b/packages/opencode/src/installation/index.ts @@ -149,9 +149,10 @@ export namespace Installation { return `${BASE_VERSION} (${VERSION})` } - export async function latest() { + export async function latest(_installMethod?: Method) { // Fetch latest version from npm registry for shuvcode // Use npm config registry if available, fallback to npmjs.org + // Note: shuvcode is not on brew, so we skip brew-specific checks const registry = await iife(async () => { const r = (await $`npm config get registry`.quiet().nothrow().text()).trim() const reg = r || "https://registry.npmjs.org" diff --git a/packages/opencode/src/lsp/client.ts b/packages/opencode/src/lsp/client.ts index f8b7db7aebe..37658e56d96 100644 --- a/packages/opencode/src/lsp/client.ts +++ b/packages/opencode/src/lsp/client.ts @@ -104,7 +104,7 @@ export namespace LSPClient { }, }, }), - 5_000, + 45_000, ).catch((err) => { l.error("initialize error", { error: err }) throw new InitializeError( diff --git a/packages/opencode/src/provider/provider.ts b/packages/opencode/src/provider/provider.ts index 06e1257b97a..fef4677bc28 100644 --- a/packages/opencode/src/provider/provider.ts +++ b/packages/opencode/src/provider/provider.ts @@ -515,7 +515,7 @@ export namespace Provider { continue } - if (providerID === "github-copilot") { + if (providerID === "github-copilot" || providerID === "github-copilot-enterprise") { provider.info.npm = "@ai-sdk/github-copilot" } diff --git a/packages/opencode/sst-env.d.ts b/packages/opencode/sst-env.d.ts index 0397645b50f..b6a7e9066ef 100644 --- a/packages/opencode/sst-env.d.ts +++ b/packages/opencode/sst-env.d.ts @@ -6,4 +6,4 @@ /// import "sst" -export {} +export {} \ No newline at end of file diff --git a/packages/plugin/package.json b/packages/plugin/package.json index 148273ddc18..2871fc7db2e 100644 --- a/packages/plugin/package.json +++ b/packages/plugin/package.json @@ -1,7 +1,7 @@ { "$schema": "https://json.schemastore.org/package.json", "name": "@opencode-ai/plugin", - "version": "1.0.128", + "version": "1.0.129", "type": "module", "scripts": { "typecheck": "tsgo --noEmit", diff --git a/packages/plugin/src/index.ts b/packages/plugin/src/index.ts index ab7aac251b3..291d68b794d 100644 --- a/packages/plugin/src/index.ts +++ b/packages/plugin/src/index.ts @@ -16,6 +16,12 @@ import { type ToolDefinition } from "./tool" export * from "./tool" +export type ProviderContext = { + source: "env" | "config" | "custom" | "api" + info: Provider + options: Record +} + export type PluginInput = { client: ReturnType project: Project @@ -153,7 +159,7 @@ export interface Hooks { * Modify parameters sent to LLM */ "chat.params"?: ( - input: { sessionID: string; agent: string; model: Model; provider: Provider; message: UserMessage }, + input: { sessionID: string; agent: string; model: Model; provider: ProviderContext; message: UserMessage }, output: { temperature: number; topP: number; options: Record }, ) => Promise "permission.ask"?: (input: Permission, output: { status: "ask" | "deny" | "allow" }) => Promise diff --git a/packages/plugin/sst-env.d.ts b/packages/plugin/sst-env.d.ts index 0397645b50f..b6a7e9066ef 100644 --- a/packages/plugin/sst-env.d.ts +++ b/packages/plugin/sst-env.d.ts @@ -6,4 +6,4 @@ /// import "sst" -export {} +export {} \ No newline at end of file diff --git a/packages/script/sst-env.d.ts b/packages/script/sst-env.d.ts index 0397645b50f..b6a7e9066ef 100644 --- a/packages/script/sst-env.d.ts +++ b/packages/script/sst-env.d.ts @@ -6,4 +6,4 @@ /// import "sst" -export {} +export {} \ No newline at end of file diff --git a/packages/sdk/js/package.json b/packages/sdk/js/package.json index ea30214854a..9ea1689ae24 100644 --- a/packages/sdk/js/package.json +++ b/packages/sdk/js/package.json @@ -1,7 +1,7 @@ { "$schema": "https://json.schemastore.org/package.json", "name": "@opencode-ai/sdk", - "version": "1.0.128", + "version": "1.0.129", "type": "module", "scripts": { "typecheck": "tsgo --noEmit", diff --git a/packages/sdk/js/src/gen/types.gen.ts b/packages/sdk/js/src/gen/types.gen.ts index 193f21089cc..d3a617b032e 100644 --- a/packages/sdk/js/src/gen/types.gen.ts +++ b/packages/sdk/js/src/gen/types.gen.ts @@ -738,6 +738,10 @@ export type KeybindsConfig = { * Toggle sidebar */ sidebar_toggle?: string + /** + * Toggle username visibility + */ + username_toggle?: string /** * View status */ diff --git a/packages/sdk/js/sst-env.d.ts b/packages/sdk/js/sst-env.d.ts index bd558821739..9b9de73273f 100644 --- a/packages/sdk/js/sst-env.d.ts +++ b/packages/sdk/js/sst-env.d.ts @@ -6,4 +6,4 @@ /// import "sst" -export {} +export {} \ No newline at end of file diff --git a/packages/sdk/python/sst.pyi b/packages/sdk/python/sst.pyi index 9fa612eb705..82d093d8118 100644 --- a/packages/sdk/python/sst.pyi +++ b/packages/sdk/python/sst.pyi @@ -39,9 +39,6 @@ class Resource: class Console: type: str url: str - class ConsoleData: - name: str - type: str class Database: database: str host: str diff --git a/packages/slack/package.json b/packages/slack/package.json index 3b9a5d8b737..f81f9069f2b 100644 --- a/packages/slack/package.json +++ b/packages/slack/package.json @@ -1,6 +1,6 @@ { "name": "@opencode-ai/slack", - "version": "1.0.128", + "version": "1.0.129", "type": "module", "scripts": { "dev": "bun run src/index.ts", diff --git a/packages/slack/sst-env.d.ts b/packages/slack/sst-env.d.ts index 0397645b50f..b6a7e9066ef 100644 --- a/packages/slack/sst-env.d.ts +++ b/packages/slack/sst-env.d.ts @@ -6,4 +6,4 @@ /// import "sst" -export {} +export {} \ No newline at end of file diff --git a/packages/tauri/package.json b/packages/tauri/package.json index b9e9412ecaf..01f42b4bfe1 100644 --- a/packages/tauri/package.json +++ b/packages/tauri/package.json @@ -1,7 +1,7 @@ { "name": "@opencode-ai/tauri", "private": true, - "version": "1.0.128", + "version": "1.0.129", "type": "module", "scripts": { "dev": "vite", diff --git a/packages/tauri/sst-env.d.ts b/packages/tauri/sst-env.d.ts index 0397645b50f..b6a7e9066ef 100644 --- a/packages/tauri/sst-env.d.ts +++ b/packages/tauri/sst-env.d.ts @@ -6,4 +6,4 @@ /// import "sst" -export {} +export {} \ No newline at end of file diff --git a/packages/ui/package.json b/packages/ui/package.json index 705c6c94e23..78d7c226568 100644 --- a/packages/ui/package.json +++ b/packages/ui/package.json @@ -1,6 +1,6 @@ { "name": "@opencode-ai/ui", - "version": "1.0.128", + "version": "1.0.129", "type": "module", "exports": { "./*": "./src/components/*.tsx", diff --git a/packages/ui/sst-env.d.ts b/packages/ui/sst-env.d.ts index 0397645b50f..b6a7e9066ef 100644 --- a/packages/ui/sst-env.d.ts +++ b/packages/ui/sst-env.d.ts @@ -6,4 +6,4 @@ /// import "sst" -export {} +export {} \ No newline at end of file diff --git a/packages/util/package.json b/packages/util/package.json index 2e73d2cb90c..a9f365df5fc 100644 --- a/packages/util/package.json +++ b/packages/util/package.json @@ -1,6 +1,6 @@ { "name": "@opencode-ai/util", - "version": "1.0.128", + "version": "1.0.129", "private": true, "type": "module", "exports": { diff --git a/packages/util/sst-env.d.ts b/packages/util/sst-env.d.ts index 0397645b50f..b6a7e9066ef 100644 --- a/packages/util/sst-env.d.ts +++ b/packages/util/sst-env.d.ts @@ -6,4 +6,4 @@ /// import "sst" -export {} +export {} \ No newline at end of file diff --git a/packages/web/package.json b/packages/web/package.json index c9e812b0c62..1789991fc32 100644 --- a/packages/web/package.json +++ b/packages/web/package.json @@ -1,7 +1,7 @@ { "name": "@opencode-ai/web", "type": "module", - "version": "1.0.128", + "version": "1.0.129", "scripts": { "dev": "astro dev", "dev:remote": "VITE_API_URL=https://api.opencode.ai astro dev", diff --git a/packages/web/src/content/docs/config.mdx b/packages/web/src/content/docs/config.mdx index 46d0d82685a..82ea391e8a4 100644 --- a/packages/web/src/content/docs/config.mdx +++ b/packages/web/src/content/docs/config.mdx @@ -362,7 +362,7 @@ You can disable providers that are loaded automatically through the `disabled_pr The `disabled_providers` option accepts an array of provider IDs. When a provider is disabled: - It won't be loaded even if environment variables are set. -- It won't be loaded even if API keys are configured through `opencode auth login`. +- It won't be loaded even if API keys are configured through the `/connect` command. - The provider's models won't appear in the model selection list. --- diff --git a/packages/web/src/content/docs/index.mdx b/packages/web/src/content/docs/index.mdx index 1e1b67782bd..f37dca19d06 100644 --- a/packages/web/src/content/docs/index.mdx +++ b/packages/web/src/content/docs/index.mdx @@ -132,23 +132,21 @@ If you are new to using LLM providers, we recommend using [OpenCode Zen](/docs/z It's a curated list of models that have been tested and verified by the OpenCode team. -1. Run `opencode auth login`, select opencode, and head to [opencode.ai/auth](https://opencode.ai/auth). +1. Run the `/connect` command in the TUI, select opencode, and head to [opencode.ai/auth](https://opencode.ai/auth). + + ```txt + /connect + ``` + 2. Sign in, add your billing details, and copy your API key. -3. Paste your API key. - ```bash - $ opencode auth login +3. Paste your API key. - ┌ Add credential - │ - ◇ Select provider - │ opencode + ```txt + ┌ API key │ - ● Create an api key at https://opencode.ai/auth │ - ◆ Enter your API key - │ _ - └ + └ enter ``` Alternatively, you can select one of the other providers. [Learn more](/docs/providers#directory). diff --git a/packages/web/src/content/docs/keybinds.mdx b/packages/web/src/content/docs/keybinds.mdx index afcff3a0edd..80a74c159bb 100644 --- a/packages/web/src/content/docs/keybinds.mdx +++ b/packages/web/src/content/docs/keybinds.mdx @@ -14,6 +14,7 @@ OpenCode has a list of keybinds that you can customize through the OpenCode conf "editor_open": "e", "theme_list": "t", "sidebar_toggle": "b", + "username_toggle": "none", "status_view": "s", "session_export": "x", "session_new": "n", diff --git a/packages/web/src/content/docs/models.mdx b/packages/web/src/content/docs/models.mdx index 38fa2cc4df6..0402d4973ec 100644 --- a/packages/web/src/content/docs/models.mdx +++ b/packages/web/src/content/docs/models.mdx @@ -9,7 +9,7 @@ OpenCode uses the [AI SDK](https://ai-sdk.dev/) and [Models.dev](https://models. ## Providers -Most popular providers are preloaded by default. If you've added the credentials for a provider through `opencode auth login`, they'll be available when you start OpenCode. +Most popular providers are preloaded by default. If you've added the credentials for a provider through the `/connect` command, they'll be available when you start OpenCode. Learn more about [providers](/docs/providers). diff --git a/packages/web/src/content/docs/providers.mdx b/packages/web/src/content/docs/providers.mdx index 0e801908295..bb284901f53 100644 --- a/packages/web/src/content/docs/providers.mdx +++ b/packages/web/src/content/docs/providers.mdx @@ -10,14 +10,14 @@ OpenCode uses the [AI SDK](https://ai-sdk.dev/) and [Models.dev](https://models. To add a provider you need to: -1. Add the API keys for the provider using `opencode auth login`. +1. Add the API keys for the provider using the `/connect` command. 2. Configure the provider in your OpenCode config. --- ### Credentials -When you add a provider's API keys with `opencode auth login`, they are stored +When you add a provider's API keys with the `/connect` command, they are stored in `~/.local/share/opencode/auth.json`. --- @@ -57,27 +57,29 @@ tested and verified to work well with OpenCode. [Learn more](/docs/zen). If you are new, we recommend starting with OpenCode Zen. ::: -1. Run `opencode auth login`, select opencode, and head to [opencode.ai/auth](https://opencode.ai/auth). +1. Run the `/connect` command in the TUI, select opencode, and head to [opencode.ai/auth](https://opencode.ai/auth). + + ```txt + /connect + ``` + 2. Sign in, add your billing details, and copy your API key. -3. Paste your API key. - ```bash - $ opencode auth login +3. Paste your API key. - ┌ Add credential - │ - ◇ Select provider - │ opencode + ```txt + ┌ API key │ - ● Create an api key at https://opencode.ai/auth │ - ◆ Enter your API key - │ _ - └ + └ enter ``` 4. Run `/models` in the TUI to see the list of models we recommend. + ```txt + /models + ``` + It works like any other provider in OpenCode. And is completely optional to use it. @@ -127,47 +129,43 @@ To use Amazon Bedrock with OpenCode: 1. Run the `/models` command to select the model you want. + ```txt + /models + ``` + --- ### Anthropic -We recommend signing up for [Claude Pro](https://www.anthropic.com/news/claude-pro) or [Max](https://www.anthropic.com/max), it's the most cost-effective way to use opencode. +We recommend signing up for [Claude Pro](https://www.anthropic.com/news/claude-pro) or [Max](https://www.anthropic.com/max). -Once you've signed up, run `opencode auth login` and select Anthropic. +1. Once you've signed up, run the `/connect` command and select Anthropic. -```bash -$ opencode auth login + ```txt + /connect + ``` -┌ Add credential -│ -◆ Select provider -│ ● Anthropic -│ ... -└ -``` +2. Here you can select the **Claude Pro/Max** option and it'll open your browser + and ask you to authenticate. -Here you can select the **Claude Pro/Max** option and it'll open your browser -and ask you to authenticate. - -```bash -$ opencode auth login -┌ Add credential -│ -◇ Select provider -│ Anthropic -│ -◆ Login method -│ ● Claude Pro/Max -│ ○ Create API Key -│ ○ Manually enter API Key -└ -``` + ```txt + ┌ Select auth method + │ + │ Claude Pro/Max + │ Create an API Key + │ Manually enter API Key + └ + ``` + +3. Now all the the Anthropic models should be available when you use the `/models` command. -Now all the the Anthropic models should be available when you use the `/models` command. + ```txt + /models + ``` ##### Using API keys -You can also select **Create API Key** if you don't have a Pro/Max subscription. It'll also open your browser and ask you to login to Anthropic and give you a code you can paste in your terminal. +You can also select **Create an API Key** if you don't have a Pro/Max subscription. It'll also open your browser and ask you to login to Anthropic and give you a code you can paste in your terminal. Or if you already have an API key, you can select **Manually enter API Key** and paste it in your terminal. @@ -185,32 +183,19 @@ Or if you already have an API key, you can select **Manually enter API Key** and The deployment name must match the model name for opencode to work properly. ::: -3. Run `opencode auth login` and select **Azure**. +3. Run the `/connect` command and search for **Azure**. - ```bash - $ opencode auth login - - ┌ Add credential - │ - ◆ Select provider - │ ● Azure - │ ... - └ + ```txt + /connect ``` 4. Enter your API key. - ```bash - $ opencode auth login - - ┌ Add credential + ```txt + ┌ API key │ - ◇ Select provider - │ Azure │ - ◇ Enter your API key - │ _ - └ + └ enter ``` 5. Set your resource name as an environment variable: @@ -227,6 +212,10 @@ Or if you already have an API key, you can select **Manually enter API Key** and 6. Run the `/models` command to select your deployed model. + ```txt + /models + ``` + --- ### Azure Cognitive Services @@ -241,32 +230,19 @@ Or if you already have an API key, you can select **Manually enter API Key** and The deployment name must match the model name for opencode to work properly. ::: -3. Run `opencode auth login` and select **Azure**. +3. Run the `/connect` command and search for **Azure Cognitive Services**. - ```bash - $ opencode auth login - - ┌ Add credential - │ - ◆ Select provider - │ ● Azure Cognitive Services - │ ... - └ + ```txt + /connect ``` 4. Enter your API key. - ```bash - $ opencode auth login - - ┌ Add credential + ```txt + ┌ API key │ - ◇ Select provider - │ Azure Cognitive Services │ - ◇ Enter your API key - │ _ - └ + └ enter ``` 5. Set your resource name as an environment variable: @@ -283,222 +259,172 @@ Or if you already have an API key, you can select **Manually enter API Key** and 6. Run the `/models` command to select your deployed model. + ```txt + /models + ``` + --- ### Baseten 1. Head over to the [Baseten](https://app.baseten.co/), create an account, and generate an API key. -2. Run `opencode auth login` and select **Baseten**. - - ```bash - $ opencode auth login +2. Run the `/connect` command and search for **Baseten**. - ┌ Add credential - │ - ◆ Select provider - │ ● Baseten - │ ... - └ + ```txt + /connect ``` 3. Enter your Baseten API key. - ```bash - $ opencode auth login - - ┌ Add credential + ```txt + ┌ API key │ - ◇ Select provider - │ Baseten │ - ◇ Enter your API key - │ _ - └ + └ enter ``` 4. Run the `/models` command to select a model. + ```txt + /models + ``` + --- ### Cerebras 1. Head over to the [Cerebras console](https://inference.cerebras.ai/), create an account, and generate an API key. -2. Run `opencode auth login` and select **Cerebras**. - - ```bash - $ opencode auth login +2. Run the `/connect` command and search for **Cerebras**. - ┌ Add credential - │ - ◆ Select provider - │ ● Cerebras - │ ... - └ + ```txt + /connect ``` 3. Enter your Cerebras API key. - ```bash - $ opencode auth login - - ┌ Add credential + ```txt + ┌ API key │ - ◇ Select provider - │ Cerebras │ - ◇ Enter your API key - │ _ - └ + └ enter ``` 4. Run the `/models` command to select a model like _Qwen 3 Coder 480B_. + ```txt + /models + ``` + --- ### Cortecs 1. Head over to the [Cortecs console](https://cortecs.ai/), create an account, and generate an API key. -2. Run `opencode auth login` and select **Cortecs**. +2. Run the `/connect` command and search for **Cortecs**. - ```bash - $ opencode auth login - - ┌ Add credential - │ - ◆ Select provider - │ ● Cortecs - │ ... - └ + ```txt + /connect ``` 3. Enter your Cortecs API key. - ```bash - $ opencode auth login - - ┌ Add credential + ```txt + ┌ API key │ - ◇ Select provider - │ Cortecs │ - ◇ Enter your API key - │ _ - └ + └ enter ``` 4. Run the `/models` command to select a model like _Kimi K2 Instruct_. + ```txt + /models + ``` + --- ### DeepSeek 1. Head over to the [DeepSeek console](https://platform.deepseek.com/), create an account, and click **Create new API key**. -2. Run `opencode auth login` and select **DeepSeek**. +2. Run the `/connect` command and search for **DeepSeek**. - ```bash - $ opencode auth login - - ┌ Add credential - │ - ◆ Select provider - │ ● DeepSeek - │ ... - └ + ```txt + /connect ``` 3. Enter your DeepSeek API key. - ```bash - $ opencode auth login - - ┌ Add credential + ```txt + ┌ API key │ - ◇ Select provider - │ DeepSeek │ - ◇ Enter your API key - │ _ - └ + └ enter ``` 4. Run the `/models` command to select a DeepSeek model like _DeepSeek Reasoner_. + ```txt + /models + ``` + --- ### Deep Infra 1. Head over to the [Deep Infra dashboard](https://deepinfra.com/dash), create an account, and generate an API key. -2. Run `opencode auth login` and select **Deep Infra**. - - ```bash - $ opencode auth login +2. Run the `/connect` command and search for **Deep Infra**. - ┌ Add credential - │ - ◆ Select provider - │ ● Deep Infra - │ ... - └ + ```txt + /connect ``` 3. Enter your Deep Infra API key. - ```bash - $ opencode auth login - - ┌ Add credential + ```txt + ┌ API key │ - ◇ Select provider - │ Deep Infra │ - ◇ Enter your API key - │ _ - └ + └ enter ``` 4. Run the `/models` command to select a model. + ```txt + /models + ``` + --- ### Fireworks AI 1. Head over to the [Fireworks AI console](https://app.fireworks.ai/), create an account, and click **Create API Key**. -2. Run `opencode auth login` and select **Fireworks AI**. - - ```bash - $ opencode auth login +2. Run the `/connect` command and search for **Fireworks AI**. - ┌ Add credential - │ - ◆ Select provider - │ ● Fireworks AI - │ ... - └ + ```txt + /connect ``` 3. Enter your Fireworks AI API key. - ```bash - $ opencode auth login - - ┌ Add credential + ```txt + ┌ API key │ - ◇ Select provider - │ Fireworks AI │ - ◇ Enter your API key - │ _ - └ + └ enter ``` 4. Run the `/models` command to select a model like _Kimi K2 Instruct_. + ```txt + /models + ``` + --- ### GitHub Copilot @@ -512,30 +438,30 @@ subscription](https://github.com/features/copilot/plans) to use. Some models need to be manually enabled in your [GitHub Copilot settings](https://docs.github.com/en/copilot/how-tos/use-ai-models/configure-access-to-ai-models#setup-for-individual-use). ::: -1. Run `opencode auth login` and select GitHub Copilot. +1. Run the `/connect` command and search for GitHub Copilot. - ```bash - $ opencode auth login - ┌ Add credential + ```txt + /connect + ``` +2. Navigate to [github.com/login/device](https://github.com/login/device) and enter the code. + + ```txt + ┌ Login with GitHub Copilot │ - ◇ Select provider - │ GitHub Copilot + │ https://github.com/login/device │ - ◇ ──────────────────────────────────────────────╮ - │ │ - │ Please visit: https://github.com/login/device │ - │ Enter code: 8F43-6FCF │ - │ │ - ├─────────────────────────────────────────────────╯ + │ Enter code: 8F43-6FCF │ - ◓ Waiting for authorization... + └ Waiting for authorization... ``` -2. Navigate to [github.com/login/device](https://github.com/login/device) and enter the code. - 3. Now run the `/models` command to select the model you want. + ```txt + /models + ``` + --- ### Google Vertex AI @@ -576,42 +502,37 @@ The `global` region improves availability and reduces errors at no extra cost. U 3. Run the `/models` command to select the model you want. + ```txt + /models + ``` + --- ### Groq 1. Head over to the [Groq console](https://console.groq.com/), click **Create API Key**, and copy the key. -2. Run `opencode auth login` and select Groq. +2. Run the `/connect` command and search for Groq. - ```bash - $ opencode auth login - - ┌ Add credential - │ - ◆ Select provider - │ ● Groq - │ ... - └ + ```txt + /connect ``` 3. Enter the API key for the provider. - ```bash - $ opencode auth login - - ┌ Add credential + ```txt + ┌ API key │ - ◇ Select provider - │ Groq │ - ◇ Enter your API key - │ _ - └ + └ enter ``` 4. Run the `/models` command to select the one you want. + ```txt + /models + ``` + --- ### Hugging Face @@ -620,36 +541,27 @@ The `global` region improves availability and reduces errors at no extra cost. U 1. Head over to [Hugging Face settings](https://huggingface.co/settings/tokens/new?ownUserPermissions=inference.serverless.write&tokenType=fineGrained) to create a token with permission to make calls to Inference Providers. -2. Run `opencode auth login` and select **Hugging Face**. - - ```bash - $ opencode auth login +2. Run the `/connect` command and search for **Hugging Face**. - ┌ Add credential - │ - ◆ Select provider - │ ● Hugging Face - │ ... - └ + ```txt + /connect ``` 3. Enter your Hugging Face token. - ```bash - $ opencode auth login - - ┌ Add credential + ```txt + ┌ API key │ - ◇ Select provider - │ Hugging Face │ - ◇ Enter your API key - │ _ - └ + └ enter ``` 4. Run the `/models` command to select a model like _Kimi-K2-Instruct_ or _GLM-4.6_. + ```txt + /models + ``` + --- ### llama.cpp @@ -696,36 +608,27 @@ IO.NET offers 17 models optimized for various use cases: 1. Head over to the [IO.NET console](https://ai.io.net/), create an account, and generate an API key. -2. Run `opencode auth login` and select **IO.NET**. - - ```bash - $ opencode auth login +2. Run the `/connect` command and search for **IO.NET**. - ┌ Add credential - │ - ◆ Select provider - │ ● IO.NET - │ ... - └ + ```txt + /connect ``` 3. Enter your IO.NET API key. - ```bash - $ opencode auth login - - ┌ Add credential + ```txt + ┌ API key │ - ◇ Select provider - │ IO.NET │ - ◇ Enter your API key - │ _ - └ + └ enter ``` 4. Run the `/models` command to select a model. + ```txt + /models + ``` + --- ### LM Studio @@ -768,36 +671,27 @@ To use Kimi K2 from Moonshot AI: 1. Head over to the [Moonshot AI console](https://platform.moonshot.ai/console), create an account, and click **Create API key**. -2. Run `opencode auth login` and select **Moonshot AI**. - - ```bash - $ opencode auth login +2. Run the `/connect` command and search for **Moonshot AI**. - ┌ Add credential - │ - ◆ Select provider - │ ... - │ ● Moonshot AI - └ + ```txt + /connect ``` 3. Enter your Moonshot API key. - ```bash - $ opencode auth login - - ┌ Add credential + ```txt + ┌ API key │ - ◇ Select provider - │ Moonshot AI │ - ◇ Enter your API key - │ _ - └ + └ enter ``` 4. Run the `/models` command to select _Kimi K2_. + ```txt + /models + ``` + --- ### Ollama @@ -848,32 +742,19 @@ To use Ollama Cloud with OpenCode: 3. Copy the API key for use in OpenCode. -4. Run `opencode auth login` and select **Ollama Cloud**. +4. Run the `/connect` command and search for **Ollama Cloud**. - ```bash - $ opencode auth login - - ┌ Add credential - │ - ◆ Select provider - │ ● Ollama Cloud - │ ... - └ + ```txt + /connect ``` 5. Enter your Ollama Cloud API key. - ```bash - $ opencode auth login - - ┌ Add credential + ```txt + ┌ API key │ - ◇ Select provider - │ Ollama Cloud │ - ◇ Enter your API key - │ _ - └ + └ enter ``` 6. **Important**: Before using cloud models in OpenCode, you must pull the model information locally: @@ -884,42 +765,37 @@ To use Ollama Cloud with OpenCode: 7. Run the `/models` command to select your Ollama Cloud model. + ```txt + /models + ``` + --- ### OpenAI 1. Head over to the [OpenAI Platform console](https://platform.openai.com/api-keys), click **Create new secret key**, and copy the key. -2. Run `opencode auth login` and select OpenAI. - - ```bash - $ opencode auth login +2. Run the `/connect` command and search for OpenAI. - ┌ Add credential - │ - ◆ Select provider - │ ● OpenAI - │ ... - └ + ```txt + /connect ``` 3. Enter the API key for the provider. - ```bash - $ opencode auth login - - ┌ Add credential + ```txt + ┌ API key │ - ◇ Select provider - │ OpenAI │ - ◇ Enter your API key - │ _ - └ + └ enter ``` 4. Run the `/models` command to select the one you want. + ```txt + /models + ``` + --- ### OpenCode Zen @@ -928,74 +804,54 @@ OpenCode Zen is a list of tested and verified models provided by the OpenCode te 1. Sign in to **OpenCode Zen** and click **Create API Key**. -2. Run `opencode auth login` and select **OpenCode Zen**. - - ```bash - $ opencode auth login +2. Run the `/connect` command and search for **OpenCode Zen**. - ┌ Add credential - │ - ◆ Select provider - │ ● OpenCode Zen - │ ... - └ + ```txt + /connect ``` 3. Enter your OpenCode API key. - ```bash - $ opencode auth login - - ┌ Add credential + ```txt + ┌ API key │ - ◇ Select provider - │ OpenCode Zen │ - ◇ Enter your API key - │ _ - └ + └ enter ``` 4. Run the `/models` command to select a model like _Qwen 3 Coder 480B_. + ```txt + /models + ``` + --- ### OpenRouter 1. Head over to the [OpenRouter dashboard](https://openrouter.ai/settings/keys), click **Create API Key**, and copy the key. -2. Run `opencode auth login` and select OpenRouter. - - ```bash - $ opencode auth login +2. Run the `/connect` command and search for OpenRouter. - ┌ Add credential - │ - ◆ Select provider - │ ● OpenRouter - │ ○ Anthropic - │ ○ Google - │ ... - └ + ```txt + /connect ``` 3. Enter the API key for the provider. - ```bash - $ opencode auth login - - ┌ Add credential + ```txt + ┌ API key │ - ◇ Select provider - │ OpenRouter │ - ◇ Enter your API key - │ _ - └ + └ enter ``` 4. Many OpenRouter models are preloaded by default, run the `/models` command to select the one you want. + ```txt + /models + ``` + You can also add additional models through your opencode config. ```json title="opencode.json" {6} @@ -1039,176 +895,164 @@ OpenCode Zen is a list of tested and verified models provided by the OpenCode te 1. Head over to the [OVHcloud panel](https://ovh.com/manager). Navigate to the `Public Cloud` section, `AI & Machine Learning` > `AI Endpoints` and in `API Keys` tab, click **Create a new API key**. -2. Run `opencode auth login` and select **OVHcloud AI Endpoints**. +2. Run the `/connect` command and search for **OVHcloud AI Endpoints**. - ```bash - $ opencode auth login - - ┌ Add credential - │ - ◆ Select provider - │ ● OVHcloud AI Endpoints - │ ... - └ + ```txt + /connect ``` 3. Enter your OVHcloud AI Endpoints API key. - ```bash - $ opencode auth login - - ┌ Add credential + ```txt + ┌ API key │ - ◇ Select provider - │ OVHcloud AI Endpoints │ - ◇ Enter your API key - │ _ - └ + └ enter ``` 4. Run the `/models` command to select a model like _gpt-oss-120b_. + ```txt + /models + ``` + --- ### Together AI 1. Head over to the [Together AI console](https://api.together.ai), create an account, and click **Add Key**. -2. Run `opencode auth login` and select **Together AI**. +2. Run the `/connect` command and search for **Together AI**. - ```bash - $ opencode auth login - - ┌ Add credential - │ - ◆ Select provider - │ ● Together AI - │ ... - └ + ```txt + /connect ``` 3. Enter your Together AI API key. - ```bash - $ opencode auth login - - ┌ Add credential + ```txt + ┌ API key │ - ◇ Select provider - │ Together AI │ - ◇ Enter your API key - │ _ - └ + └ enter ``` 4. Run the `/models` command to select a model like _Kimi K2 Instruct_. + ```txt + /models + ``` + --- -### xAI +### Venice AI -For a limited time, you can use xAI's Grok Code for free with opencode. +1. Head over to the [Venice AI console](https://venice.ai), create an account, and generate an API key. -:::tip -Grok Code is available for free for a limited time on opencode. -::: +2. Run the `/connect` command and search for **Venice AI**. + + ```txt + /connect + ``` -1. Make sure you are on the latest version of opencode. +3. Enter your Venice AI API key. + + ```txt + ┌ API key + │ + │ + └ enter + ``` -2. Run the `/models` command and select **Grok Code Free**. +4. Run the `/models` command to select a model like _Llama 3.3 70B_. -As a part of the trial period, the xAI team will be using the request logs to -monitor and improve Grok Code. + ```txt + /models + ``` --- -### Z.AI +### xAI -1. Head over to the [Z.AI API console](https://z.ai/manage-apikey/apikey-list), create an account, and click **Create a new API key**. +1. Head over to the [xAI console](https://console.x.ai/), create an account, and generate an API key. -2. Run `opencode auth login` and select **Z.AI**. +2. Run the `/connect` command and search for **xAI**. - ```bash - $ opencode auth login + ```txt + /connect + ``` - ┌ Add credential +3. Enter your xAI API key. + + ```txt + ┌ API key │ - ◆ Select provider - │ ● Z.AI - │ ... - └ + │ + └ enter ``` - If you are subscribed to the **GLM Coding Plan**, select **Z.AI Coding Plan**. +4. Run the `/models` command to select a model like _Grok Beta_. - ```bash - $ opencode auth login + ```txt + /models + ``` - ┌ Add credential - │ - ◆ Select provider - │ ● Z.AI Coding Plan - │ ... - └ +--- + +### Z.AI + +1. Head over to the [Z.AI API console](https://z.ai/manage-apikey/apikey-list), create an account, and click **Create a new API key**. + +2. Run the `/connect` command and search for **Z.AI**. + + ```txt + /connect ``` -3. Enter your Z.AI API key. + If you are subscribed to the **GLM Coding Plan**, select **Z.AI Coding Plan**. - ```bash - $ opencode auth login +3. Enter your Z.AI API key. - ┌ Add credential + ```txt + ┌ API key │ - ◇ Select provider - │ Z.AI │ - ◇ Enter your API key - │ _ - └ + └ enter ``` 4. Run the `/models` command to select a model like _GLM-4.5_. + ```txt + /models + ``` + --- ### ZenMux 1. Head over to the [ZenMux dashboard](https://zenmux.ai/settings/keys), click **Create API Key**, and copy the key. -2. Run `opencode auth login` and select ZenMux. - - ```bash - $ opencode auth login +2. Run the `/connect` command and search for ZenMux. - ┌ Add credential - │ - ◆ Select provider - │ ● ZenMux - │ ○ Zhipu AI - │ ○ Zhipu AI Coding Plan - │ ... - └ + ```txt + /connect ``` 3. Enter the API key for the provider. - ```bash - $ opencode auth login - - ┌ Add credential + ```txt + ┌ API key │ - ◇ Select provider - │ ZenMux │ - ◇ Enter your API key - │ _ - └ + └ enter ``` 4. Many ZenMux models are preloaded by default, run the `/models` command to select the one you want. + ```txt + /models + ``` + You can also add additional models through your opencode config. ```json title="opencode.json" {6} @@ -1228,16 +1072,16 @@ monitor and improve Grok Code. ## Custom provider -To add any **OpenAI-compatible** provider that's not listed in `opencode auth login`: +To add any **OpenAI-compatible** provider that's not listed in the `/connect` command: :::tip You can use any OpenAI-compatible provider with opencode. Most modern AI providers offer OpenAI-compatible APIs. ::: -1. Run `opencode auth login` and scroll down to **Other**. +1. Run the `/connect` command and scroll down to **Other**. ```bash - $ opencode auth login + $ /connect ┌ Add credential │ @@ -1250,7 +1094,7 @@ You can use any OpenAI-compatible provider with opencode. Most modern AI provide 2. Enter a unique ID for the provider. ```bash - $ opencode auth login + $ /connect ┌ Add credential │ @@ -1266,11 +1110,11 @@ You can use any OpenAI-compatible provider with opencode. Most modern AI provide 3. Enter your API key for the provider. ```bash - $ opencode auth login + $ /connect ┌ Add credential │ - ▲ This only stores a credential for myprovider - you will need configure it in opencode.json, check the docs for examples. + ▲ This only stores a credential for myprovider - you will need to configure it in opencode.json, check the docs for examples. │ ◇ Enter your API key │ sk-... @@ -1366,42 +1210,6 @@ If you are having trouble with configuring a provider, check the following: This doesn't apply to providers like Amazon Bedrock, that rely on environment variables for their auth. 2. For custom providers, check the opencode config and: - - Make sure the provider ID used in `opencode auth login` matches the ID in your opencode config. + - Make sure the provider ID used in the `/connect` command matches the ID in your opencode config. - The right npm package is used for the provider. For example, use `@ai-sdk/cerebras` for Cerebras. And for all other OpenAI-compatible providers, use `@ai-sdk/openai-compatible`. - Check correct API endpoint is used in the `options.baseURL` field. - ---- - -### Venice AI - -1. Head over to the [Venice AI console](https://venice.ai), create an account, and generate an API key. - -2. Run `opencode auth login` and select **Venice AI**. - - ```bash - $ opencode auth login - - ┌ Add credential - │ - ◆ Select provider - │ ● Venice AI - │ ... - └ - ``` - -3. Enter your Venice AI API key. - - ```bash - $ opencode auth login - - ┌ Add credential - │ - ◇ Select provider - │ Venice AI - │ - ◇ Enter your API key - │ _ - └ - ``` - -4. Run the `/models` command to select a model like _Llama 3.3 70B_. diff --git a/packages/web/src/content/docs/troubleshooting.mdx b/packages/web/src/content/docs/troubleshooting.mdx index d38b892fc5f..e3476887f47 100644 --- a/packages/web/src/content/docs/troubleshooting.mdx +++ b/packages/web/src/content/docs/troubleshooting.mdx @@ -64,7 +64,7 @@ Here are some common issues and how to resolve them. --- -### opencode won't start +### OpenCode won't start 1. Check the logs for error messages 2. Try running with `--print-logs` to see output in the terminal @@ -74,7 +74,7 @@ Here are some common issues and how to resolve them. ### Authentication issues -1. Try re-authenticating with `opencode auth login ` +1. Try re-authenticating with the `/connect` command in the TUI 2. Check that your API keys are valid 3. Ensure your network allows connections to the provider's API @@ -113,10 +113,7 @@ To resolve this: rm -rf ~/.local/share/opencode ``` -3. Re-authenticate with your provider: - ```bash - opencode auth login - ``` +3. Re-authenticate with your provider using the `/connect` command in the TUI. --- diff --git a/packages/web/src/content/docs/tui.mdx b/packages/web/src/content/docs/tui.mdx index a580a4ce8d3..83b5cd79869 100644 --- a/packages/web/src/content/docs/tui.mdx +++ b/packages/web/src/content/docs/tui.mdx @@ -69,6 +69,16 @@ Here are all available slash commands: --- +### connect + +Add a provider to OpenCode. Allows you to select from available providers and add their API keys. + +```bash frame="none" +/connect +``` + +--- + ### compact Compact the current session. _Alias_: `/summarize` @@ -348,3 +358,16 @@ You can customize TUI behavior through your OpenCode config file. - `scroll_acceleration` - Enable macOS-style scroll acceleration for smooth, natural scrolling. When enabled, scroll speed increases with rapid scrolling gestures and stays precise for slower movements. **This setting takes precedence over `scroll_speed` and overrides it when enabled.** - `scroll_speed` - Controls how fast the TUI scrolls when using scroll commands (minimum: `1`). Defaults to `1` on Unix and `3` on Windows. **Note: This is ignored if `scroll_acceleration.enabled` is set to `true`.** + +--- + +## View customization + +You can customize various aspects of the TUI view using the command palette (`ctrl+x h` or `/help`). These settings persist across restarts. + +### Username display + +Toggle whether your username appears in chat messages. Access this through: + +- Command palette: Search for "username" or "hide username" +- The setting persists automatically and will be remembered across TUI sessions diff --git a/packages/web/src/content/docs/zen.mdx b/packages/web/src/content/docs/zen.mdx index 5632bcca45c..5f266b0c239 100644 --- a/packages/web/src/content/docs/zen.mdx +++ b/packages/web/src/content/docs/zen.mdx @@ -51,7 +51,7 @@ OpenCode Zen works like any other provider in OpenCode. 1. You sign in to **OpenCode Zen**, add your billing details, and copy your API key. -2. You run `opencode auth login`, select opencode, and paste your API key. +2. You run the `/connect` command in the TUI, select OpenCode Zen, and paste your API key. 3. Run `/models` in the TUI to see the list of models we recommend. You are charged per request and you can add credits to your account. diff --git a/packages/web/sst-env.d.ts b/packages/web/sst-env.d.ts index 0397645b50f..b6a7e9066ef 100644 --- a/packages/web/sst-env.d.ts +++ b/packages/web/sst-env.d.ts @@ -6,4 +6,4 @@ /// import "sst" -export {} +export {} \ No newline at end of file diff --git a/script/publish.ts b/script/publish.ts index 8b546ec283e..7e3ec94e50e 100755 --- a/script/publish.ts +++ b/script/publish.ts @@ -85,6 +85,7 @@ if (!Script.preview) { "jayair", "fwang", "adamdotdevin", + "iamdavidhill", "opencode-agent[bot]", ] const compare = diff --git a/sdks/vscode/package.json b/sdks/vscode/package.json index 244bccaef92..bc20f1a18b1 100644 --- a/sdks/vscode/package.json +++ b/sdks/vscode/package.json @@ -2,7 +2,7 @@ "name": "opencode", "displayName": "opencode", "description": "opencode for VS Code", - "version": "1.0.128", + "version": "1.0.129", "publisher": "sst-dev", "repository": { "type": "git", diff --git a/sdks/vscode/sst-env.d.ts b/sdks/vscode/sst-env.d.ts index 0397645b50f..b6a7e9066ef 100644 --- a/sdks/vscode/sst-env.d.ts +++ b/sdks/vscode/sst-env.d.ts @@ -6,4 +6,4 @@ /// import "sst" -export {} +export {} \ No newline at end of file diff --git a/sst-env.d.ts b/sst-env.d.ts index 15255c7ec21..247b0ba8105 100644 --- a/sst-env.d.ts +++ b/sst-env.d.ts @@ -5,152 +5,148 @@ declare module "sst" { export interface Resource { - ADMIN_SECRET: { - type: "sst.sst.Secret" - value: string - } - AUTH_API_URL: { - type: "sst.sst.Linkable" - value: string - } - AWS_SES_ACCESS_KEY_ID: { - type: "sst.sst.Secret" - value: string - } - AWS_SES_SECRET_ACCESS_KEY: { - type: "sst.sst.Secret" - value: string - } - Api: { - type: "sst.cloudflare.Worker" - url: string - } - AuthApi: { - type: "sst.cloudflare.Worker" - url: string - } - AuthStorage: { - namespaceId: string - type: "sst.cloudflare.Kv" - } - Bucket: { - name: string - type: "sst.cloudflare.Bucket" - } - CLOUDFLARE_API_TOKEN: { - type: "sst.sst.Secret" - value: string - } - CLOUDFLARE_DEFAULT_ACCOUNT_ID: { - type: "sst.sst.Secret" - value: string - } - Console: { - type: "sst.cloudflare.SolidStart" - url: string + "ADMIN_SECRET": { + "type": "sst.sst.Secret" + "value": string + } + "AUTH_API_URL": { + "type": "sst.sst.Linkable" + "value": string + } + "AWS_SES_ACCESS_KEY_ID": { + "type": "sst.sst.Secret" + "value": string + } + "AWS_SES_SECRET_ACCESS_KEY": { + "type": "sst.sst.Secret" + "value": string + } + "Api": { + "type": "sst.cloudflare.Worker" + "url": string + } + "AuthApi": { + "type": "sst.cloudflare.Worker" + "url": string + } + "AuthStorage": { + "namespaceId": string + "type": "sst.cloudflare.Kv" + } + "Bucket": { + "name": string + "type": "sst.cloudflare.Bucket" + } + "CLOUDFLARE_API_TOKEN": { + "type": "sst.sst.Secret" + "value": string + } + "CLOUDFLARE_DEFAULT_ACCOUNT_ID": { + "type": "sst.sst.Secret" + "value": string } - ConsoleData: { - name: string - type: "sst.cloudflare.Bucket" + "Console": { + "type": "sst.cloudflare.SolidStart" + "url": string } - Database: { - database: string - host: string - password: string - port: number - type: "sst.sst.Linkable" - username: string + "Database": { + "database": string + "host": string + "password": string + "port": number + "type": "sst.sst.Linkable" + "username": string } - Desktop: { - type: "sst.cloudflare.StaticSite" - url: string + "Desktop": { + "type": "sst.cloudflare.StaticSite" + "url": string } - EMAILOCTOPUS_API_KEY: { - type: "sst.sst.Secret" - value: string + "EMAILOCTOPUS_API_KEY": { + "type": "sst.sst.Secret" + "value": string } - Enterprise: { - type: "sst.cloudflare.SolidStart" - url: string + "Enterprise": { + "type": "sst.cloudflare.SolidStart" + "url": string } - EnterpriseStorage: { - name: string - type: "sst.cloudflare.Bucket" + "EnterpriseStorage": { + "name": string + "type": "sst.cloudflare.Bucket" } - GITHUB_APP_ID: { - type: "sst.sst.Secret" - value: string + "GITHUB_APP_ID": { + "type": "sst.sst.Secret" + "value": string } - GITHUB_APP_PRIVATE_KEY: { - type: "sst.sst.Secret" - value: string + "GITHUB_APP_PRIVATE_KEY": { + "type": "sst.sst.Secret" + "value": string } - GITHUB_CLIENT_ID_CONSOLE: { - type: "sst.sst.Secret" - value: string + "GITHUB_CLIENT_ID_CONSOLE": { + "type": "sst.sst.Secret" + "value": string } - GITHUB_CLIENT_SECRET_CONSOLE: { - type: "sst.sst.Secret" - value: string + "GITHUB_CLIENT_SECRET_CONSOLE": { + "type": "sst.sst.Secret" + "value": string } - GOOGLE_CLIENT_ID: { - type: "sst.sst.Secret" - value: string + "GOOGLE_CLIENT_ID": { + "type": "sst.sst.Secret" + "value": string } - GatewayKv: { - namespaceId: string - type: "sst.cloudflare.Kv" + "GatewayKv": { + "namespaceId": string + "type": "sst.cloudflare.Kv" } - HONEYCOMB_API_KEY: { - type: "sst.sst.Secret" - value: string + "HONEYCOMB_API_KEY": { + "type": "sst.sst.Secret" + "value": string } - LogProcessor: { - type: "sst.cloudflare.Worker" + "LogProcessor": { + "type": "sst.cloudflare.Worker" } - R2AccessKey: { - type: "sst.sst.Secret" - value: string + "R2AccessKey": { + "type": "sst.sst.Secret" + "value": string } - R2SecretKey: { - type: "sst.sst.Secret" - value: string + "R2SecretKey": { + "type": "sst.sst.Secret" + "value": string } - STRIPE_SECRET_KEY: { - type: "sst.sst.Secret" - value: string + "STRIPE_SECRET_KEY": { + "type": "sst.sst.Secret" + "value": string } - STRIPE_WEBHOOK_SECRET: { - type: "sst.sst.Linkable" - value: string + "STRIPE_WEBHOOK_SECRET": { + "type": "sst.sst.Linkable" + "value": string } - Web: { - type: "sst.cloudflare.Astro" - url: string + "Web": { + "type": "sst.cloudflare.Astro" + "url": string } - ZEN_MODELS1: { - type: "sst.sst.Secret" - value: string + "ZEN_MODELS1": { + "type": "sst.sst.Secret" + "value": string } - ZEN_MODELS2: { - type: "sst.sst.Secret" - value: string + "ZEN_MODELS2": { + "type": "sst.sst.Secret" + "value": string } - ZEN_MODELS3: { - type: "sst.sst.Secret" - value: string + "ZEN_MODELS3": { + "type": "sst.sst.Secret" + "value": string } - ZEN_MODELS4: { - type: "sst.sst.Secret" - value: string + "ZEN_MODELS4": { + "type": "sst.sst.Secret" + "value": string } - ZenData: { - name: string - type: "sst.cloudflare.Bucket" + "ZenData": { + "name": string + "type": "sst.cloudflare.Bucket" } } } /// import "sst" -export {} +export {} \ No newline at end of file