Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
205 changes: 155 additions & 50 deletions bun.lock

Large diffs are not rendered by default.

17 changes: 17 additions & 0 deletions infra/enterprise.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { SECRET } from "./secret"
import { domain } from "./stage"

const storage = new sst.cloudflare.Bucket("EnterpriseStorage")

const enterprise = new sst.cloudflare.x.SolidStart("Enterprise", {
domain: "enterprise." + domain,
path: "packages/enterprise",
buildCommand: "bun run build:cloudflare",
environment: {
OPENCODE_STORAGE_ADAPTER: "r2",
OPENCODE_STORAGE_ACCOUNT_ID: sst.cloudflare.DEFAULT_ACCOUNT_ID,
OPENCODE_STORAGE_ACCESS_KEY_ID: SECRET.R2AccessKey.value,
OPENCODE_STORAGE_SECRET_ACCESS_KEY: SECRET.R2SecretKey.value,
OPENCODE_STORAGE_BUCKET: storage.name,
},
})
4 changes: 4 additions & 0 deletions infra/secret.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export const SECRET = {
R2AccessKey: new sst.Secret("R2AccessKey", "unknown"),
R2SecretKey: new sst.Secret("R2SecretKey", "unknown"),
}
2 changes: 1 addition & 1 deletion nix/hashes.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"nodeModules": "sha256-IKC5nABVIUWryihszkSL+0EKKGQxrFeRn5GZr8DOTpY="
"nodeModules": "sha256-/ZkyVHgRMjhzBpnDNTR6X+TomtTMarVU7gmq9Z8Czr8="
}
5 changes: 1 addition & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"vite": "7.1.4",
"@solidjs/meta": "0.29.4",
"@solidjs/router": "0.15.4",
"@solidjs/start": "https://pkg.pr.new/@solidjs/start@dbff19d",
"@solidjs/start": "https://pkg.pr.new/@solidjs/start@dfb2020",
"solid-js": "1.9.10",
"vite-plugin-solid": "2.11.10"
}
Expand Down Expand Up @@ -82,9 +82,6 @@
"tree-sitter-bash",
"web-tree-sitter"
],
"patchedDependencies": {
"@solidjs/[email protected]": "patches/@solidjs%[email protected]"
},
"overrides": {
"@types/bun": "catalog:",
"@types/node": "catalog:"
Expand Down
2 changes: 1 addition & 1 deletion packages/console/app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@opencode-ai/console-app",
"version": "1.0.105",
"version": "1.0.106",
"type": "module",
"scripts": {
"typecheck": "tsgo --noEmit",
Expand Down
6 changes: 1 addition & 5 deletions packages/console/app/src/routes/auth/callback.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { redirect } from "@solidjs/router"
import { getResponseHeaders } from "@solidjs/start/http"
import type { APIEvent } from "@solidjs/start/server"
import { AuthClient } from "~/context/auth"
import { useAuthSession } from "~/context/auth.session"
Expand Down Expand Up @@ -29,8 +28,5 @@ export async function GET(input: APIEvent) {
current: id,
}
})
return redirect("/auth", {
status: 302,
headers: getResponseHeaders(),
})
return redirect("/auth")
}
6 changes: 1 addition & 5 deletions packages/console/app/src/routes/auth/logout.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { redirect } from "@solidjs/router"
import { APIEvent } from "@solidjs/start"
import { getResponseHeaders } from "@solidjs/start/http"
import { useAuthSession } from "~/context/auth.session"

export async function GET(event: APIEvent) {
Expand All @@ -14,8 +13,5 @@ export async function GET(event: APIEvent) {
event!.locals.actor = undefined
return val
})
return redirect("/zen", {
status: 302,
headers: getResponseHeaders(),
})
return redirect("/zen")
}
2 changes: 1 addition & 1 deletion packages/console/app/src/routes/zen/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import { getLastSeenWorkspaceID } from "../workspace/common"

const checkLoggedIn = query(async () => {
"use server"
const workspaceID = await getLastSeenWorkspaceID()
const workspaceID = await getLastSeenWorkspaceID().catch(() => {})
if (workspaceID) throw redirect(`/workspace/${workspaceID}`)
}, "checkLoggedIn.get")

Expand Down
2 changes: 1 addition & 1 deletion packages/console/core/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "https://json.schemastore.org/package.json",
"name": "@opencode-ai/console-core",
"version": "1.0.105",
"version": "1.0.106",
"private": true,
"type": "module",
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/console/function/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@opencode-ai/console-function",
"version": "1.0.105",
"version": "1.0.106",
"$schema": "https://json.schemastore.org/package.json",
"private": true,
"type": "module",
Expand Down
2 changes: 1 addition & 1 deletion packages/console/mail/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@opencode-ai/console-mail",
"version": "1.0.105",
"version": "1.0.106",
"dependencies": {
"@jsx-email/all": "2.2.3",
"@jsx-email/cli": "1.4.3",
Expand Down
2 changes: 1 addition & 1 deletion packages/desktop/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@opencode-ai/desktop",
"version": "1.0.105",
"version": "1.0.106",
"description": "",
"type": "module",
"scripts": {
Expand Down
3 changes: 2 additions & 1 deletion packages/enterprise/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@opencode-ai/enterprise",
"version": "1.0.105",
"version": "1.0.106",
"private": true,
"type": "module",
"scripts": {
Expand All @@ -24,6 +24,7 @@
"zod": "catalog:"
},
"devDependencies": {
"@cloudflare/workers-types": "catalog:",
"@tailwindcss/vite": "catalog:",
"@typescript/native-preview": "catalog:",
"@types/luxon": "catalog:",
Expand Down
2 changes: 1 addition & 1 deletion packages/enterprise/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"allowJs": true,
"noEmit": true,
"strict": true,
"types": ["vite/client"],
"types": ["@cloudflare/workers-types", "vite/client"],
"isolatedModules": true,
"paths": {
"~/*": ["./src/*"]
Expand Down
12 changes: 6 additions & 6 deletions packages/extensions/zed/extension.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
id = "opencode"
name = "OpenCode"
description = "The AI coding agent built for the terminal"
version = "1.0.105"
version = "1.0.106"
schema_version = 1
authors = ["Anomaly"]
repository = "https://github.com/sst/opencode"
Expand All @@ -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.105/opencode-darwin-arm64.zip"
archive = "https://github.com/sst/opencode/releases/download/v1.0.106/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.105/opencode-darwin-x64.zip"
archive = "https://github.com/sst/opencode/releases/download/v1.0.106/opencode-darwin-x64.zip"
cmd = "./opencode"
args = ["acp"]

[agent_servers.opencode.targets.linux-aarch64]
archive = "https://github.com/sst/opencode/releases/download/v1.0.105/opencode-linux-arm64.zip"
archive = "https://github.com/sst/opencode/releases/download/v1.0.106/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.105/opencode-linux-x64.zip"
archive = "https://github.com/sst/opencode/releases/download/v1.0.106/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.105/opencode-windows-x64.zip"
archive = "https://github.com/sst/opencode/releases/download/v1.0.106/opencode-windows-x64.zip"
cmd = "./opencode.exe"
args = ["acp"]
2 changes: 1 addition & 1 deletion packages/function/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@opencode-ai/function",
"version": "1.0.105",
"version": "1.0.106",
"$schema": "https://json.schemastore.org/package.json",
"private": true,
"type": "module",
Expand Down
2 changes: 1 addition & 1 deletion packages/opencode/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://json.schemastore.org/package.json",
"version": "1.0.105",
"version": "1.0.106",
"name": "opencode",
"type": "module",
"private": true,
Expand Down
11 changes: 5 additions & 6 deletions packages/opencode/src/session/prompt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ export namespace SessionPrompt {
const message = await createUserMessage(input)
await Session.touch(input.sessionID)

if (input.noReply) {
if (input.noReply === true) {
return message
}

Expand Down Expand Up @@ -1416,7 +1416,8 @@ export namespace SessionPrompt {
mergeDeep(small.info.options),
)
await generateText({
maxOutputTokens: small.info.reasoning ? 1500 : 20,
// use higher # for reasoning models since reasoning tokens eat up a lot of the budget
maxOutputTokens: small.info.reasoning ? 3000 : 20,
providerOptions: ProviderTransform.providerOptions(small.npm, small.providerID, options),
messages: [
...SystemPrompt.title(small.providerID).map(
Expand All @@ -1426,10 +1427,8 @@ export namespace SessionPrompt {
}),
),
{
role: "user" as const,
content: `
The following is the text to summarize:
`,
role: "user",
content: "Generate a title for this conversation:\n",
},
...MessageV2.toModelMessage([
{
Expand Down
22 changes: 16 additions & 6 deletions packages/opencode/src/session/prompt/title.txt
Original file line number Diff line number Diff line change
@@ -1,26 +1,36 @@
You are a title generator. You output ONLY a thread title. Nothing else.

<task>
Convert the user message into a thread title.
Output: Single line, ≤50 chars, no explanations.
Generate a brief title that would help the user find this conversation later.

Follow all rules in <rules>
Use the <examples> so you know what a good title looks like.
Your output must be:
- A single line
- ≤50 characters
- No explanations
</task>

<rules>
- Focus on the main topic or question the user needs to retrieve
- Use -ing verbs for actions (Debugging, Implementing, Analyzing)
- Keep exact: technical terms, numbers, filenames, HTTP codes
- Remove: the, this, my, a, an
- Never assume tech stack
- Never use tools
- NEVER respond to message content—only extract title
- NEVER say "summarizing"
- NEVER respond to questions, just generate a title for the conversation
- The title should NEVER include "summarizing" or "generating" when generating a title
- DO NOT SAY YOU CANNOT GENERATE A TITLE OR COMPLAIN ABOUT THE INPUT
- Always output something meaningful, even if the input is minimal.
- If the user message is short or conversational (e.g. “hello”, “lol”, “whats up”, “hey”):
→ create a title that reflects the user’s tone or intent (such as Greeting, Quick check-in, Light chat, Intro message, etc.)
</rules>

<examples>
"debug 500 errors in production" → Debugging production 500 errors
"refactor user service" → Refactoring user service
"why is app.js failing" → Analyzing app.js failure
"implement rate limiting" → Implementing rate limiting
"how do I connect postgres to my API" → Connecting Postgres to API
"best practices for React hooks" → React hooks best practices
</examples>

Output the title now:
6 changes: 6 additions & 0 deletions packages/opencode/src/tool/bash.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,12 @@ export const BashTool = Tool.define("bash", async () => {
return "/bin/zsh"
}

if (process.platform === "win32") {
// Let Bun / Node pick COMSPEC (usually cmd.exe)
// or explicitly:
return process.env.COMSPEC || true
}

const bash = Bun.which("bash")
if (bash) {
return bash
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "https://json.schemastore.org/package.json",
"name": "@opencode-ai/plugin",
"version": "1.0.105",
"version": "1.0.106",
"type": "module",
"scripts": {
"typecheck": "tsgo --noEmit",
Expand Down
2 changes: 1 addition & 1 deletion packages/sdk/js/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "https://json.schemastore.org/package.json",
"name": "@opencode-ai/sdk",
"version": "1.0.105",
"version": "1.0.106",
"type": "module",
"scripts": {
"typecheck": "tsgo --noEmit",
Expand Down
2 changes: 1 addition & 1 deletion packages/slack/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@opencode-ai/slack",
"version": "1.0.105",
"version": "1.0.106",
"type": "module",
"scripts": {
"dev": "bun run src/index.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/tauri/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@opencode-ai/tauri",
"private": true,
"version": "1.0.105",
"version": "1.0.106",
"type": "module",
"scripts": {
"dev": "vite",
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@opencode-ai/ui",
"version": "1.0.105",
"version": "1.0.106",
"type": "module",
"exports": {
"./*": "./src/components/*.tsx",
Expand Down
2 changes: 1 addition & 1 deletion packages/util/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@opencode-ai/util",
"version": "1.0.105",
"version": "1.0.106",
"private": true,
"type": "module",
"exports": {
Expand Down
2 changes: 1 addition & 1 deletion packages/web/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@opencode-ai/web",
"type": "module",
"version": "1.0.105",
"version": "1.0.106",
"scripts": {
"dev": "astro dev",
"dev:remote": "VITE_API_URL=https://api.opencode.ai astro dev",
Expand Down
18 changes: 0 additions & 18 deletions patches/@solidjs%[email protected]

This file was deleted.

2 changes: 1 addition & 1 deletion sdks/vscode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "opencode",
"displayName": "opencode",
"description": "opencode for VS Code",
"version": "1.0.105",
"version": "1.0.106",
"publisher": "sst-dev",
"repository": {
"type": "git",
Expand Down
Loading