Skip to content

Commit 2415bb4

Browse files
authored
Merge branch 'dev' into add-opencode-chromium-browser-plugin
2 parents 9efa4d5 + 2ba2ee5 commit 2415bb4

284 files changed

Lines changed: 8207 additions & 3840 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

AGENTS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
### General Principles
1010

1111
- Keep things in one function unless composable or reusable
12+
- Do not extract single-use helpers preemptively. Inline the logic at the call site unless the helper is reused, hides a genuinely complex boundary, or has a clear independent name that improves the caller.
1213
- Avoid `try`/`catch` where possible
1314
- Avoid using the `any` type
1415
- Use Bun APIs when possible, like `Bun.file()`

bun.lock

Lines changed: 21 additions & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

nix/hashes.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"nodeModules": {
3-
"x86_64-linux": "sha256-LTo0ohJN5hBOubqFLVL45unVEIwBDkACNVv64k2nkq4=",
4-
"aarch64-linux": "sha256-oYKY2UJRWG2fhufW4aGujX/Poou93023ZF2Fu7oyYOw=",
5-
"aarch64-darwin": "sha256-618c9vqKN5I+no1nzylctAiWvqw7Bsa+bzSTNwXmSQA=",
6-
"x86_64-darwin": "sha256-1ro3/gH0FC0TWXwWT+k675xR396GE98HpnBEeuD4t6k="
3+
"x86_64-linux": "sha256-baGxh+hk/rPhg0xI/OdMDz6dPwncgercYNBdTPnLX9o=",
4+
"aarch64-linux": "sha256-VTWKq679B3Q4ZnAoQzC4VSCYA09wWecNJ+JajvjNB1U=",
5+
"aarch64-darwin": "sha256-orf2zIBMTiiQrt/6qCzE+o0oKhv6u8zXF9DH1Bo3lbo=",
6+
"x86_64-darwin": "sha256-1MZC1fadRoY4lhkmjlcUQTLYH9Q8pDI1bxd5f94f1xU="
77
}
88
}

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@
133133
},
134134
"patchedDependencies": {
135135
"@npmcli/agent@4.0.0": "patches/@npmcli%2Fagent@4.0.0.patch",
136+
"@silvia-odwyer/photon-node@0.3.4": "patches/@silvia-odwyer%2Fphoton-node@0.3.4.patch",
136137
"@standard-community/standard-openapi@0.2.9": "patches/@standard-community%2Fstandard-openapi@0.2.9.patch",
137138
"solid-js@1.9.10": "patches/solid-js@1.9.10.patch"
138139
}

packages/app/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@opencode-ai/app",
3-
"version": "1.14.41",
3+
"version": "1.14.46",
44
"description": "",
55
"type": "module",
66
"exports": {

packages/app/src/pages/session/session-side-panel.tsx

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@ import { createOpenSessionFileTab, createSessionTabs, getTabReorderIndex, type S
2828
import { setSessionHandoff } from "@/pages/session/handoff"
2929
import { useSessionLayout } from "@/pages/session/session-layout"
3030

31+
type RenderDiff = (SnapshotFileDiff & { file: string }) | VcsFileDiff
32+
33+
function renderDiff(value: SnapshotFileDiff | VcsFileDiff): value is RenderDiff {
34+
return typeof value.file === "string"
35+
}
36+
3137
export function SessionSidePanel(props: {
3238
canReview: () => boolean
3339
diffs: () => (SnapshotFileDiff | VcsFileDiff)[]
@@ -70,7 +76,8 @@ export function SessionSidePanel(props: {
7076
})
7177
const treeWidth = createMemo(() => (fileOpen() ? `${layout.fileTree.width()}px` : "0px"))
7278

73-
const diffFiles = createMemo(() => props.diffs().map((d) => d.file))
79+
const diffs = createMemo(() => props.diffs().filter(renderDiff))
80+
const diffFiles = createMemo(() => diffs().map((d) => d.file))
7481
const kinds = createMemo(() => {
7582
const merge = (a: "add" | "del" | "mix" | undefined, b: "add" | "del" | "mix") => {
7683
if (!a) return b
@@ -81,7 +88,7 @@ export function SessionSidePanel(props: {
8188
const normalize = (p: string) => p.replaceAll("\\\\", "/").replace(/\/+$/, "")
8289

8390
const out = new Map<string, "add" | "del" | "mix">()
84-
for (const diff of props.diffs()) {
91+
for (const diff of diffs()) {
8592
const file = normalize(diff.file)
8693
const kind = diff.status === "added" ? "add" : diff.status === "deleted" ? "del" : "mix"
8794

packages/console/app/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@opencode-ai/console-app",
3-
"version": "1.14.41",
3+
"version": "1.14.46",
44
"type": "module",
55
"license": "MIT",
66
"scripts": {

packages/console/app/src/routes/workspace/[id]/usage/usage-section.module.css

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@
6767
display: inline-flex;
6868
align-items: center;
6969
justify-content: center;
70+
flex-shrink: 0;
7071
padding: 0;
7172
background: transparent;
7273
border: none;
@@ -79,6 +80,7 @@
7980
}
8081

8182
svg {
83+
flex-shrink: 0;
8284
width: 16px;
8385
height: 16px;
8486
}

packages/console/app/src/routes/workspace/[id]/usage/usage-section.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export function UsageSection() {
5353
}
5454

5555
const calculateTotalOutputTokens = (u: Awaited<ReturnType<typeof getUsageInfo>>[0]) => {
56-
return u.outputTokens + (u.reasoningTokens ?? 0)
56+
return u.outputTokens
5757
}
5858

5959
const goPrev = async () => {

packages/console/app/src/routes/zen/util/handler.ts

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -889,10 +889,6 @@ export async function handler(
889889

890890
const inputCost = modelCost.input * inputTokens * 100
891891
const outputCost = modelCost.output * outputTokens * 100
892-
const reasoningCost = (() => {
893-
if (!reasoningTokens) return undefined
894-
return modelCost.output * reasoningTokens * 100
895-
})()
896892
const cacheReadCost = (() => {
897893
if (!cacheReadTokens) return undefined
898894
if (!modelCost.cacheRead) return undefined
@@ -909,17 +905,11 @@ export async function handler(
909905
return modelCost.cacheWrite1h * cacheWrite1hTokens * 100
910906
})()
911907
const totalCostInCent =
912-
inputCost +
913-
outputCost +
914-
(reasoningCost ?? 0) +
915-
(cacheReadCost ?? 0) +
916-
(cacheWrite5mCost ?? 0) +
917-
(cacheWrite1hCost ?? 0)
908+
inputCost + outputCost + (cacheReadCost ?? 0) + (cacheWrite5mCost ?? 0) + (cacheWrite1hCost ?? 0)
918909
return {
919910
totalCostInCent,
920911
inputCost,
921912
outputCost,
922-
reasoningCost,
923913
cacheReadCost,
924914
cacheWrite5mCost,
925915
cacheWrite1hCost,
@@ -941,8 +931,7 @@ export async function handler(
941931
) {
942932
const { inputTokens, outputTokens, reasoningTokens, cacheReadTokens, cacheWrite5mTokens, cacheWrite1hTokens } =
943933
usageInfo
944-
const { totalCostInCent, inputCost, outputCost, reasoningCost, cacheReadCost, cacheWrite5mCost, cacheWrite1hCost } =
945-
costInfo
934+
const { totalCostInCent, inputCost, outputCost, cacheReadCost, cacheWrite5mCost, cacheWrite1hCost } = costInfo
946935

947936
logger.metric({
948937
"tokens.input": inputTokens,
@@ -953,14 +942,12 @@ export async function handler(
953942
"tokens.cache_write_1h": cacheWrite1hTokens,
954943
"cost.input.microcents": centsToMicroCents(inputCost),
955944
"cost.output.microcents": centsToMicroCents(outputCost),
956-
"cost.reasoning.microcents": reasoningCost ? centsToMicroCents(reasoningCost) : undefined,
957945
"cost.cache_read.microcents": cacheReadCost ? centsToMicroCents(cacheReadCost) : undefined,
958946
"cost.cache_write.microcents": cacheWrite5mCost ? centsToMicroCents(cacheWrite5mCost) : undefined,
959947
"cost.total.microcents": centsToMicroCents(totalCostInCent),
960948
// deprecated - remove after May 20, 2026
961949
"cost.input": Math.round(inputCost),
962950
"cost.output": Math.round(outputCost),
963-
"cost.reasoning": reasoningCost ? Math.round(reasoningCost) : undefined,
964951
"cost.cache_read": cacheReadCost ? Math.round(cacheReadCost) : undefined,
965952
"cost.cache_write_5m": cacheWrite5mCost ? Math.round(cacheWrite5mCost) : undefined,
966953
"cost.cache_write_1h": cacheWrite1hCost ? Math.round(cacheWrite1hCost) : undefined,

0 commit comments

Comments
 (0)