Skip to content

Commit 9ea2db1

Browse files
committed
Merge remote-tracking branch 'upstream/dev' into dev
2 parents fb5c34a + 97f3c74 commit 9ea2db1

21 files changed

Lines changed: 570 additions & 417 deletions

File tree

packages/console/app/src/routes/zen/util/provider/anthropic.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,11 +148,13 @@ export const anthropicHelper: ProviderHelper = ({ reqModel, providerModel }) =>
148148
return {
149149
parse: (chunk: string) => {
150150
const data = chunk.split("\n")[1]
151-
if (!data.startsWith("data: ")) return
151+
// Claude models start with "data: {"
152+
// Alibaba models start with "data:{"
153+
if (!data.startsWith("data:")) return
152154

153155
let json
154156
try {
155-
json = JSON.parse(data.slice(6))
157+
json = JSON.parse(data.replace(/^data:\s*/, ""))
156158
} catch {
157159
return
158160
}

packages/desktop/src-tauri/release/appstream.metainfo.xml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,14 @@
2828

2929
<screenshots>
3030
<screenshot type="default">
31-
<image>https://opencode.ai/docs/_astro/screenshot.Bs5D4atL_ZvsvFu.webp</image>
31+
<image>https://raw.githubusercontent.com/anomalyco/opencode/b75d4d1c5ec449585d515c756fc81f080a157a9a/packages/web/src/assets/lander/screenshot.png</image>
3232
</screenshot>
3333
</screenshots>
3434

3535
<releases>
36+
<release version="1.4.0" date="2026-04-08">
37+
<url type="details">https://github.com/anomalyco/opencode/releases/tag/v1.4.0</url>
38+
</release>
3639
<release version="1.0.223" date="2026-01-01">
3740
<url type="details">https://github.com/anomalyco/opencode/releases/tag/v1.0.223</url>
3841
</release>

packages/desktop/src-tauri/tauri.conf.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
"icons/dev/icon.ico"
3333
],
3434
"active": true,
35+
"category": "DeveloperTool",
3536
"targets": ["deb", "rpm", "dmg", "nsis", "app"],
3637
"externalBin": ["sidecars/opencode-cli"],
3738
"linux": {

packages/opencode/specs/effect/schema.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -159,15 +159,15 @@ Schema at source.
159159
These are the highest-priority next targets. Each is a small, self-contained
160160
schema module with a clear domain.
161161

162-
- [ ] `src/control-plane/schema.ts`
163-
- [ ] `src/permission/schema.ts`
164-
- [ ] `src/project/schema.ts`
162+
- [x] `src/control-plane/schema.ts`
163+
- [x] `src/permission/schema.ts`
164+
- [x] `src/project/schema.ts`
165165
- [x] `src/provider/schema.ts`
166-
- [ ] `src/pty/schema.ts`
167-
- [ ] `src/question/schema.ts`
168-
- [ ] `src/session/schema.ts`
169-
- [ ] `src/sync/schema.ts`
170-
- [ ] `src/tool/schema.ts`
166+
- [x] `src/pty/schema.ts`
167+
- [x] `src/question/schema.ts`
168+
- [x] `src/session/schema.ts`
169+
- [x] `src/sync/schema.ts`
170+
- [x] `src/tool/schema.ts`
171171

172172
### Session domain
173173

packages/opencode/src/cli/cmd/github.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -985,7 +985,8 @@ export const GithubRunCommand = cmd({
985985
const err = result.info.error
986986
console.error("Agent error:", err)
987987
if (err.name === "ContextOverflowError") throw new Error(formatPromptTooLargeError(files))
988-
throw new Error(`${err.name}: ${err.data?.message || ""}`)
988+
const message = "message" in err.data ? err.data.message : ""
989+
throw new Error(`${err.name}: ${message}`)
989990
}
990991

991992
const text = extractResponseText(result.parts)
@@ -1014,7 +1015,8 @@ export const GithubRunCommand = cmd({
10141015
const err = summary.info.error
10151016
console.error("Summary agent error:", err)
10161017
if (err.name === "ContextOverflowError") throw new Error(formatPromptTooLargeError(files))
1017-
throw new Error(`${err.name}: ${err.data?.message || ""}`)
1018+
const message = "message" in err.data ? err.data.message : ""
1019+
throw new Error(`${err.name}: ${message}`)
10181020
}
10191021

10201022
const summaryText = extractResponseText(summary.parts)

packages/opencode/src/cli/cmd/import.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ export const ImportCommand = cmd({
168168
)
169169

170170
for (const msg of exportData.messages) {
171-
const msgInfo = MessageV2.Info.parse(msg.info)
171+
const msgInfo = MessageV2.Info.zod.parse(msg.info)
172172
const { id, sessionID: _, ...msgData } = msgInfo
173173
Database.use((db) =>
174174
db
@@ -184,7 +184,7 @@ export const ImportCommand = cmd({
184184
)
185185

186186
for (const part of msg.parts) {
187-
const partInfo = MessageV2.Part.parse(part)
187+
const partInfo = MessageV2.Part.zod.parse(part)
188188
const { id: partId, sessionID: _s, messageID, ...partData } = partInfo
189189
Database.use((db) =>
190190
db

packages/opencode/src/control-plane/schema.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
import { Schema } from "effect"
2-
import z from "zod"
32

43
import { Identifier } from "@/id/id"
5-
import { ZodOverride } from "@/util/effect-zod"
4+
import { zod, ZodOverride } from "@/util/effect-zod"
65
import { withStatics } from "@/util/schema"
76

87
const workspaceIdSchema = Schema.String.annotate({ [ZodOverride]: Identifier.schema("workspace") }).pipe(
@@ -14,6 +13,6 @@ export type WorkspaceID = typeof workspaceIdSchema.Type
1413
export const WorkspaceID = workspaceIdSchema.pipe(
1514
withStatics((schema: typeof workspaceIdSchema) => ({
1615
ascending: (id?: string) => schema.make(Identifier.ascending("workspace", id)),
17-
zod: Identifier.schema("workspace").pipe(z.custom<WorkspaceID>()),
16+
zod: zod(schema),
1817
})),
1918
)
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
import { Schema } from "effect"
2-
import z from "zod"
32

43
import { Identifier } from "@/id/id"
5-
import { ZodOverride } from "@/util/effect-zod"
4+
import { zod, ZodOverride } from "@/util/effect-zod"
65
import { Newtype } from "@/util/schema"
76

87
export class PermissionID extends Newtype<PermissionID>()(
@@ -13,5 +12,5 @@ export class PermissionID extends Newtype<PermissionID>()(
1312
return this.make(Identifier.ascending("permission", id))
1413
}
1514

16-
static readonly zod = Identifier.schema("permission") as unknown as z.ZodType<PermissionID>
15+
static readonly zod = zod(this)
1716
}

packages/opencode/src/plugin/codex.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -374,6 +374,7 @@ export async function CodexAuthPlugin(input: PluginInput): Promise<Hooks> {
374374
"gpt-5.3-codex",
375375
"gpt-5.4",
376376
"gpt-5.4-mini",
377+
"gpt-5.5",
377378
])
378379
for (const [modelId, model] of Object.entries(provider.models)) {
379380
if (modelId.includes("codex")) continue
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Schema } from "effect"
2-
import z from "zod"
32

3+
import { zod } from "@/util/effect-zod"
44
import { withStatics } from "@/util/schema"
55

66
const projectIdSchema = Schema.String.pipe(Schema.brand("ProjectID"))
@@ -10,6 +10,6 @@ export type ProjectID = typeof projectIdSchema.Type
1010
export const ProjectID = projectIdSchema.pipe(
1111
withStatics((schema: typeof projectIdSchema) => ({
1212
global: schema.make("global"),
13-
zod: z.string().pipe(z.custom<ProjectID>()),
13+
zod: zod(schema),
1414
})),
1515
)

0 commit comments

Comments
 (0)