Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
f1138b9
ignore: update download stats 2025-12-03
actions-user Dec 3, 2025
5b34636
ignore: docs & style
rekram1-node Dec 3, 2025
0eb9708
chore: format code
actions-user Dec 3, 2025
91db82c
add retry case for grok resource exhausted
rekram1-node Dec 3, 2025
0bccd1d
feat: experimental.primary_tools, allow user to set the tools that sh…
spoons-and-mirrors Dec 3, 2025
c5b4cc8
fix: bunfs path on windows (#5011)
Hona Dec 3, 2025
921b980
feat: add messages_last_user command to scroll TUI to last user messa…
ariane-emory Dec 3, 2025
c3c9003
ci: add pr review
rekram1-node Dec 3, 2025
3181c68
ci: make review only fire on non draft pr creation
rekram1-node Dec 3, 2025
e5b13b7
zen: usage graph respect light/dark mode
Dec 3, 2025
8898bf7
ci: tweak review cmd
rekram1-node Dec 3, 2025
70f4722
ci: review ready for review action
rekram1-node Dec 3, 2025
c00d488
feat: add tool_details keybind w/ no default (#4976)
ariane-emory Dec 3, 2025
f00380d
ci: review tweak
rekram1-node Dec 3, 2025
7a4aa68
zen: fix chart loading
Dec 3, 2025
ee4437f
core: add provider test coverage for upcoming refactor
thdxr Dec 3, 2025
6d3fc63
core: refactor provider and model system (#5033)
thdxr Dec 4, 2025
e8c9b21
bump opentui
rekram1-node Dec 4, 2025
38bff1b
Update Nix flake.lock and hashes
actions-user Dec 4, 2025
598d63d
fix: dax typo
rekram1-node Dec 4, 2025
f33f8ca
fix: compaction type issue
rekram1-node Dec 4, 2025
32b5db7
fix: provider id issue
rekram1-node Dec 4, 2025
88cfb97
ci: add note about iife
rekram1-node Dec 4, 2025
4bc3fa0
docs: remove outdated theme section as system theme is now added back…
jackbisceglia Dec 4, 2025
46790e5
feat: Enhance DeepSeek reasoning content handling (#4975)
matjanos Dec 4, 2025
dcfeb52
release: v1.0.130
Dec 4, 2025
4ff5783
zen: fix chart loading
Dec 4, 2025
e8aa79b
chore: format code
actions-user Dec 4, 2025
0237905
fix: TypeError: undefined is not an object
rekram1-node Dec 4, 2025
adf7681
release: v1.0.131
Dec 4, 2025
7d36123
sync: merge upstream v1.0.131 into integration
opencode-agent[bot] Dec 4, 2025
ed09d72
sync: record last synced tag v1.0.131
opencode-agent[bot] Dec 4, 2025
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
2 changes: 1 addition & 1 deletion .github/last-synced-tag
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1.0.130
v1.0.131
549 changes: 97 additions & 452 deletions bun.lock

Large diffs are not rendered by default.

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.130",
"version": "1.0.131",
"type": "module",
"scripts": {
"typecheck": "tsgo --noEmit",
Expand Down
147 changes: 69 additions & 78 deletions packages/console/app/src/routes/workspace/[id]/graph-section.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { UsageTable } from "@opencode-ai/console-core/schema/billing.sql.js"
import { KeyTable } from "@opencode-ai/console-core/schema/key.sql.js"
import { UserTable } from "@opencode-ai/console-core/schema/user.sql.js"
import { AuthTable } from "@opencode-ai/console-core/schema/auth.sql.js"
import { createAsync, query, useParams } from "@solidjs/router"
import { useParams } from "@solidjs/router"
import { createEffect, createMemo, onCleanup, Show, For } from "solid-js"
import { createStore } from "solid-js/store"
import { withActor } from "~/context/auth.withActor"
Expand Down Expand Up @@ -94,8 +94,6 @@ async function getCosts(workspaceID: string, year: number, month: number) {
}, workspaceID)
}

const queryCosts = query(getCosts, "costs.get")

const MODEL_COLORS: Record<string, string> = {
"claude-sonnet-4-5": "#D4745C",
"claude-sonnet-4": "#E8B4A4",
Expand Down Expand Up @@ -160,45 +158,25 @@ export function GraphSection() {
keyDropdownOpen: false,
colorScheme: "light" as "light" | "dark",
})
const initialData = createAsync(() => queryCosts(params.id!, store.year, store.month))

createEffect(() => {
if (typeof window === "undefined") return

const mediaQuery = window.matchMedia("(prefers-color-scheme: dark)")
setStore({ colorScheme: mediaQuery.matches ? "dark" : "light" })

const handleColorSchemeChange = (e: MediaQueryListEvent) => {
setStore({ colorScheme: e.matches ? "dark" : "light" })
}

mediaQuery.addEventListener("change", handleColorSchemeChange)
onCleanup(() => mediaQuery.removeEventListener("change", handleColorSchemeChange))
})

const onPreviousMonth = async () => {
const month = store.month === 0 ? 11 : store.month - 1
const year = store.month === 0 ? store.year - 1 : store.year
const data = await getCosts(params.id!, year, month)
setStore({ month, year, data })
setStore({ month, year })
}

const onNextMonth = async () => {
const month = store.month === 11 ? 0 : store.month + 1
const year = store.month === 11 ? store.year + 1 : store.year
setStore({ month, year, data: await getCosts(params.id!, year, month) })
setStore({ month, year })
}

const onSelectModel = (model: string | null) => setStore({ model, modelDropdownOpen: false })

const onSelectKey = (keyID: string | null) => setStore({ key: keyID, keyDropdownOpen: false })

const getData = createMemo(() => store.data ?? initialData())

const getModels = createMemo(() => {
const data = getData()
if (!data?.usage) return []
return Array.from(new Set(data.usage.map((row) => row.model))).sort()
if (!store.data?.usage) return []
return Array.from(new Set(store.data.usage.map((row) => row.model))).sort()
})

const getDates = createMemo(() => {
Expand All @@ -221,9 +199,7 @@ export function GraphSection() {
const isCurrentMonth = () => store.year === now.getFullYear() && store.month === now.getMonth()

const chartConfig = createMemo((): ChartConfiguration | null => {
if (typeof window === "undefined") return null

const data = getData()
const data = store.data
const dates = getDates()
if (!data?.usage?.length) return null

Expand Down Expand Up @@ -365,15 +341,32 @@ export function GraphSection() {
}
})

createEffect(async () => {
const data = await getCosts(params.id!, store.year, store.month)
setStore({ data })
})

createEffect(() => {
const config = chartConfig()
if (!config || !canvasRef) return

if (chartInstance) chartInstance.destroy()
chartInstance = new Chart(canvasRef, config)

onCleanup(() => chartInstance?.destroy())
})

onCleanup(() => chartInstance?.destroy())
createEffect(() => {
const mediaQuery = window.matchMedia("(prefers-color-scheme: dark)")
setStore({ colorScheme: mediaQuery.matches ? "dark" : "light" })

const handleColorSchemeChange = (e: MediaQueryListEvent) => {
setStore({ colorScheme: e.matches ? "dark" : "light" })
}

mediaQuery.addEventListener("change", handleColorSchemeChange)
onCleanup(() => mediaQuery.removeEventListener("change", handleColorSchemeChange))
})

return (
<section class={styles.root}>
Expand All @@ -382,55 +375,53 @@ export function GraphSection() {
<p>Usage costs broken down by model.</p>
</div>

<Show when={getData()}>
<div data-slot="filter-container">
<div data-slot="month-picker">
<button data-slot="month-button" onClick={onPreviousMonth}>
<IconChevronLeft />
<div data-slot="filter-container">
<div data-slot="month-picker">
<button data-slot="month-button" onClick={onPreviousMonth}>
<IconChevronLeft />
</button>
<span data-slot="month-label">{formatMonthYear()}</span>
<button data-slot="month-button" onClick={onNextMonth} disabled={isCurrentMonth()}>
<IconChevronRight />
</button>
</div>
<Dropdown
trigger={store.model === null ? "All Models" : store.model}
open={store.modelDropdownOpen}
onOpenChange={(open) => setStore({ modelDropdownOpen: open })}
>
<>
<button data-slot="model-item" onClick={() => onSelectModel(null)}>
<span>All Models</span>
</button>
<span data-slot="month-label">{formatMonthYear()}</span>
<button data-slot="month-button" onClick={onNextMonth} disabled={isCurrentMonth()}>
<IconChevronRight />
<For each={getModels()}>
{(model) => (
<button data-slot="model-item" onClick={() => onSelectModel(model)}>
<span>{model}</span>
</button>
)}
</For>
</>
</Dropdown>
<Dropdown
trigger={getKeyName(store.key)}
open={store.keyDropdownOpen}
onOpenChange={(open) => setStore({ keyDropdownOpen: open })}
>
<>
<button data-slot="model-item" onClick={() => onSelectKey(null)}>
<span>All Keys</span>
</button>
</div>
<Dropdown
trigger={store.model === null ? "All Models" : store.model}
open={store.modelDropdownOpen}
onOpenChange={(open) => setStore({ modelDropdownOpen: open })}
>
<>
<button data-slot="model-item" onClick={() => onSelectModel(null)}>
<span>All Models</span>
</button>
<For each={getModels()}>
{(model) => (
<button data-slot="model-item" onClick={() => onSelectModel(model)}>
<span>{model}</span>
</button>
)}
</For>
</>
</Dropdown>
<Dropdown
trigger={getKeyName(store.key)}
open={store.keyDropdownOpen}
onOpenChange={(open) => setStore({ keyDropdownOpen: open })}
>
<>
<button data-slot="model-item" onClick={() => onSelectKey(null)}>
<span>All Keys</span>
</button>
<For each={getData()?.keys || []}>
{(key) => (
<button data-slot="model-item" onClick={() => onSelectKey(key.id)}>
<span>{key.displayName}</span>
</button>
)}
</For>
</>
</Dropdown>
</div>
</Show>
<For each={store.data?.keys || []}>
{(key) => (
<button data-slot="model-item" onClick={() => onSelectKey(key.id)}>
<span>{key.displayName}</span>
</button>
)}
</For>
</>
</Dropdown>
</div>

<Show
when={chartConfig()}
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.130",
"version": "1.0.131",
"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.130",
"version": "1.0.131",
"$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.130",
"version": "1.0.131",
"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.130",
"version": "1.0.131",
"description": "",
"type": "module",
"scripts": {
Expand Down
2 changes: 1 addition & 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.130",
"version": "1.0.131",
"private": true,
"type": "module",
"scripts": {
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.130"
version = "1.0.131"
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.130/opencode-darwin-arm64.zip"
archive = "https://github.com/sst/opencode/releases/download/v1.0.131/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.130/opencode-darwin-x64.zip"
archive = "https://github.com/sst/opencode/releases/download/v1.0.131/opencode-darwin-x64.zip"
cmd = "./opencode"
args = ["acp"]

[agent_servers.opencode.targets.linux-aarch64]
archive = "https://github.com/sst/opencode/releases/download/v1.0.130/opencode-linux-arm64.zip"
archive = "https://github.com/sst/opencode/releases/download/v1.0.131/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.130/opencode-linux-x64.zip"
archive = "https://github.com/sst/opencode/releases/download/v1.0.131/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.130/opencode-windows-x64.zip"
archive = "https://github.com/sst/opencode/releases/download/v1.0.131/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.130",
"version": "1.0.131",
"$schema": "https://json.schemastore.org/package.json",
"private": true,
"type": "module",
Expand Down
3 changes: 1 addition & 2 deletions 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.130",
"version": "1.0.131",
"name": "opencode",
"type": "module",
"private": true,
Expand Down Expand Up @@ -84,7 +84,6 @@
"jsonc-parser": "3.3.1",
"minimatch": "10.0.3",
"open": "10.1.2",
"opentui-ansi-vt": "1.2.12",
"opentui-spinner": "0.0.6",
"partial-json": "0.1.7",
"remeda": "catalog:",
Expand Down
4 changes: 2 additions & 2 deletions packages/opencode/src/session/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -432,8 +432,8 @@ export namespace Session {
new Decimal(0)
.add(new Decimal(tokens.input).mul(costInfo?.input ?? 0).div(1_000_000))
.add(new Decimal(tokens.output).mul(costInfo?.output ?? 0).div(1_000_000))
.add(new Decimal(tokens.cache.read).mul(costInfo?.cache.read ?? 0).div(1_000_000))
.add(new Decimal(tokens.cache.write).mul(costInfo?.cache.write ?? 0).div(1_000_000))
.add(new Decimal(tokens.cache.read).mul(costInfo?.cache?.read ?? 0).div(1_000_000))
.add(new Decimal(tokens.cache.write).mul(costInfo?.cache?.write ?? 0).div(1_000_000))
// TODO: update models.dev to have better pricing model, for now:
// charge reasoning tokens at the same rate as output tokens
.add(new Decimal(tokens.reasoning).mul(costInfo?.output ?? 0).div(1_000_000))
Expand Down
4 changes: 2 additions & 2 deletions 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.130",
"version": "1.0.131",
"type": "module",
"scripts": {
"typecheck": "tsgo --noEmit",
Expand All @@ -24,4 +24,4 @@
"typescript": "catalog:",
"@typescript/native-preview": "catalog:"
}
}
}
4 changes: 2 additions & 2 deletions 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.130",
"version": "1.0.131",
"type": "module",
"scripts": {
"typecheck": "tsgo --noEmit",
Expand All @@ -26,4 +26,4 @@
"publishConfig": {
"directory": "dist"
}
}
}
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.130",
"version": "1.0.131",
"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.130",
"version": "1.0.131",
"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.130",
"version": "1.0.131",
"type": "module",
"exports": {
"./*": "./src/components/*.tsx",
Expand Down
Loading
Loading