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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1,680 changes: 1,586 additions & 94 deletions Cargo.lock

Large diffs are not rendered by default.

15 changes: 15 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,14 @@
members = [
"crates/core",
"crates/code-search",
"crates/execpolicy",
"crates/tools",
"crates/provider",
"crates/safety",
"crates/sandbox",
"crates/linux-sandbox",
"crates/sandbox-network-proxy",
"crates/windows-sandbox",
"crates/tasks",
"crates/mcp",
"crates/network-proxy",
Expand Down Expand Up @@ -57,6 +62,7 @@ devo-client = { path = "crates/client" }
devo-code-search = { path = "crates/code-search" }
devo-config = { path = "crates/config" }
devo-core = { path = "crates/core" }
devo-execpolicy = { path = "crates/execpolicy" }
devo-file-search = { path = "crates/file-search" }
devo-keyring-store = { path = "crates/keyring-store" }
devo-mcp = { path = "crates/mcp" }
Expand All @@ -65,6 +71,10 @@ devo-protocol = { path = "crates/protocol" }
devo-provider = { path = "crates/provider" }
devo-rmcp-client = { path = "crates/rmcp-client" }
devo-safety = { path = "crates/safety" }
devo-sandbox = { path = "crates/sandbox" }
devo-linux-sandbox = { path = "crates/linux-sandbox" }
devo-sandbox-network-proxy = { path = "crates/sandbox-network-proxy" }
devo-windows-sandbox = { path = "crates/windows-sandbox" }
devo-server = { path = "crates/server" }
devo-skills = { path = "crates/skills" }
devo-tasks = { path = "crates/tasks" }
Expand All @@ -77,8 +87,10 @@ devo-util-process = { path = "crates/utils/process" }
devo-util-shell-command = { path = "crates/utils/shell-command" }
diffy = "0.4.2"
dirs = "6"
dunce = "1"
fs2 = "0.4"
futures = { version = "0.3", default-features = false }
globset = "0.4"
hf-hub = { version = "1.0.0-rc.1", features = ["blocking", "rustls-tls"] }
hnsw_rs = "0.3.4"
iana-time-zone = "0.1.65"
Expand All @@ -90,8 +102,10 @@ itertools = "0.14.0"
keyring = { version = "3.6", default-features = false }
lazy_static = "1"
libc = "0.2.182"
multimap = "0.10.1"
model2vec = "0.3.0"
notify = "8.2.0"
nono = { version = "=0.53.0", default-features = false }
nucleo = { git = "https://github.com/helix-editor/nucleo.git", rev = "4253de9faabb4e5c6d81d946a5e35a90f87347ee" }
once_cell = "1.20.2"
pathdiff = "0.2"
Expand Down Expand Up @@ -120,6 +134,7 @@ serial_test = "3.2.0"
sha2 = "0.10"
shlex = "1.3.0"
smol_str = { version = "0.3", features = ["serde"] }
starlark = { version = "0.14.2", default-features = false }
strum = "0.27.2"
strum_macros = "0.28.0"
supports-color = "3.0.2"
Expand Down
2 changes: 1 addition & 1 deletion README.ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ Desktop 体験、terminal workflow、ランタイムの動作、ワークスペ
<img alt="GLM 5.2" src="https://img.shields.io/badge/GLM-5.2-7856FF?style=flat-square&logo=huggingfacei&logoColor=white" />
<img alt="MiniMax M3" src="https://img.shields.io/badge/MiniMax-M3-0B5FFF?style=flat-square&logo=minimax&logoColor=white" />
<img alt="Qwen3 Coder Next" src="https://img.shields.io/badge/Qwen3-Coder%20Next-615CED?style=flat-square&logo=qwen&logoColor=white" />
<img alt="Kimi K2.5" src="https://img.shields.io/badge/Kimi-K2.5-111111?style=flat-square&logo=moonshotai&logoColor=white" />
<img alt="Kimi K3" src="https://img.shields.io/badge/Kimi-K3-111111?style=flat-square&logo=moonshotai&logoColor=white" />
</p>

Devo の組み込みモデルカタログには、Qwen、Kimi、MiniMax、GLM、DeepSeek の検証済みモデル定義が含まれています。
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ runtime behavior, and workspace execution under your control.
<img alt="GLM 5.2" src="https://img.shields.io/badge/GLM-5.2-7856FF?style=flat-square&logo=huggingfacei&logoColor=white" />
<img alt="MiniMax M3" src="https://img.shields.io/badge/MiniMax-M3-0B5FFF?style=flat-square&logo=minimax&logoColor=white" />
<img alt="Qwen3 Coder Next" src="https://img.shields.io/badge/Qwen3-Coder%20Next-615CED?style=flat-square&logo=qwen&logoColor=white" />
<img alt="Kimi K2.5" src="https://img.shields.io/badge/Kimi-K2.5-111111?style=flat-square&logo=moonshotai&logoColor=white" />
<img alt="Kimi K3" src="https://img.shields.io/badge/Kimi-K3-111111?style=flat-square&logo=moonshotai&logoColor=white" />
</p>

Devo's built-in model catalog includes tested model definitions for Qwen, Kimi,
Expand Down
2 changes: 1 addition & 1 deletion README.ru.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ Devo предназначен для команд, которым нужен cod
<img alt="GLM 5.2" src="https://img.shields.io/badge/GLM-5.2-7856FF?style=flat-square&logo=huggingfacei&logoColor=white" />
<img alt="MiniMax M3" src="https://img.shields.io/badge/MiniMax-M3-0B5FFF?style=flat-square&logo=minimax&logoColor=white" />
<img alt="Qwen3 Coder Next" src="https://img.shields.io/badge/Qwen3-Coder%20Next-615CED?style=flat-square&logo=qwen&logoColor=white" />
<img alt="Kimi K2.5" src="https://img.shields.io/badge/Kimi-K2.5-111111?style=flat-square&logo=moonshotai&logoColor=white" />
<img alt="Kimi K3" src="https://img.shields.io/badge/Kimi-K3-111111?style=flat-square&logo=moonshotai&logoColor=white" />
</p>

Встроенный каталог моделей Devo содержит проверенные определения моделей для
Expand Down
2 changes: 1 addition & 1 deletion README.zh-Hans.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ Desktop 体验、终端工作流以及工作区执行边界的团队。
<img alt="GLM 5.2" src="https://img.shields.io/badge/GLM-5.2-7856FF?style=flat-square&logo=huggingfacei&logoColor=white" />
<img alt="MiniMax M3" src="https://img.shields.io/badge/MiniMax-M3-0B5FFF?style=flat-square&logo=minimax&logoColor=white" />
<img alt="Qwen3 Coder Next" src="https://img.shields.io/badge/Qwen3-Coder%20Next-615CED?style=flat-square&logo=qwen&logoColor=white" />
<img alt="Kimi K2.5" src="https://img.shields.io/badge/Kimi-K2.5-111111?style=flat-square&logo=moonshotai&logoColor=white" />
<img alt="Kimi K3" src="https://img.shields.io/badge/Kimi-K3-111111?style=flat-square&logo=moonshotai&logoColor=white" />
</p>

Devo 的内置模型目录包含 Qwen、Kimi、MiniMax、GLM 和 DeepSeek 的已测试模型定义。
Expand Down
2 changes: 1 addition & 1 deletion README.zh-Hant.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ Desktop 體驗、終端機工作流以及工作區執行邊界的團隊。
<img alt="GLM 5.2" src="https://img.shields.io/badge/GLM-5.2-7856FF?style=flat-square&logo=huggingfacei&logoColor=white" />
<img alt="MiniMax M3" src="https://img.shields.io/badge/MiniMax-M3-0B5FFF?style=flat-square&logo=minimax&logoColor=white" />
<img alt="Qwen3 Coder Next" src="https://img.shields.io/badge/Qwen3-Coder%20Next-615CED?style=flat-square&logo=qwen&logoColor=white" />
<img alt="Kimi K2.5" src="https://img.shields.io/badge/Kimi-K2.5-111111?style=flat-square&logo=moonshotai&logoColor=white" />
<img alt="Kimi K3" src="https://img.shields.io/badge/Kimi-K3-111111?style=flat-square&logo=moonshotai&logoColor=white" />
</p>

Devo 的內建模型目錄包含 Qwen、Kimi、MiniMax、GLM 和 DeepSeek 的已測試模型定義。
Expand Down
8 changes: 4 additions & 4 deletions apps/desktop/src/main/tray-menu.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { describe, expect, test } from "bun:test"
import type { MenuItemConstructorOptions } from "electron"
import { buildCodexStyleTrayMenuTemplate } from "./tray-menu"
import { buildDevoTrayMenuTemplate } from "./tray-menu"

function menuShape(items: MenuItemConstructorOptions[]): unknown[] {
return items.map((item) => ({
Expand All @@ -13,8 +13,8 @@ function menuShape(items: MenuItemConstructorOptions[]): unknown[] {
}))
}

describe("buildCodexStyleTrayMenuTemplate", () => {
test("builds a Codex-style tray menu with running, recent, usage, and actions", () => {
describe("buildDevoTrayMenuTemplate", () => {
test("builds a Devo tray menu with running, recent, usage, and actions", () => {
const liveSessions = new Map([
[
"s1",
Expand Down Expand Up @@ -74,7 +74,7 @@ describe("buildCodexStyleTrayMenuTemplate", () => {
},
]

const template = buildCodexStyleTrayMenuTemplate({
const template = buildDevoTrayMenuTemplate({
liveSessions,
discovery: {
projects: [],
Expand Down
6 changes: 3 additions & 3 deletions apps/desktop/src/main/tray-menu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export interface DiscoveryCache {
sessions: Session[]
}

export interface CodexStyleTrayMenuOptions {
export interface DevoTrayMenuOptions {
liveSessions: ReadonlyMap<string, SessionState>
discovery: DiscoveryCache | null
pendingCount: number
Expand Down Expand Up @@ -40,8 +40,8 @@ interface UsageSummary {
cacheReadTokens: number
}

export function buildCodexStyleTrayMenuTemplate(
options: CodexStyleTrayMenuOptions,
export function buildDevoTrayMenuTemplate(
options: DevoTrayMenuOptions,
): MenuItemConstructorOptions[] {
const template: MenuItemConstructorOptions[] = []

Expand Down
4 changes: 2 additions & 2 deletions apps/desktop/src/main/tray.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import {
type SessionState,
} from "./notification-watcher"
import { getAcpTransport, getServerUrl, onServerReady } from "./devo-manager"
import { buildCodexStyleTrayMenuTemplate, type DiscoveryCache } from "./tray-menu"
import { buildDevoTrayMenuTemplate, type DiscoveryCache } from "./tray-menu"

const log = createLogger("tray")

Expand Down Expand Up @@ -182,7 +182,7 @@ function rebuildMenu(): void {
const liveSessions = getSessionStates()
const pendingCount = getPendingCount()

const template = buildCodexStyleTrayMenuTemplate({
const template = buildDevoTrayMenuTemplate({
liveSessions,
discovery: discoveryCache,
pendingCount,
Expand Down
2 changes: 1 addition & 1 deletion apps/desktop/src/renderer/atoms/derived/session-metrics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*/
import { atom } from "jotai"
import { atomFamily } from "jotai-family"
import { getToolCategory } from "../../components/chat/tool-card"
import { getToolCategory } from "../../components/chat/tool-category"
import {
computeSessionMetricsExtended,
formatCost,
Expand Down
94 changes: 63 additions & 31 deletions apps/desktop/src/renderer/components/chat/chat-tool-call.test.ts
Original file line number Diff line number Diff line change
@@ -1,48 +1,67 @@
import { readFileSync } from "node:fs"
import { describe, expect, test } from "bun:test"
import { getToolDuration, getToolSubtitle, shouldDefaultOpen } from "./chat-tool-call"
import { buildBashTerminalOutput, getToolSubtitle, stripShellEnvelope } from "./chat-tool-call"

const elapsedHookSource = readFileSync(new URL("../../hooks/use-elapsed-time.ts", import.meta.url), "utf8")
const chatToolCallSource = readFileSync(new URL("./chat-tool-call.tsx", import.meta.url), "utf8")
const rendererCssSource = readFileSync(new URL("../../index.css", import.meta.url), "utf8")

describe("shouldDefaultOpen", () => {
test("keeps all tool output collapsed by default", () => {
describe("buildBashTerminalOutput", () => {
test("joins command and output into a single terminal block", () => {
expect({
bash: shouldDefaultOpen("bash", "completed"),
read: shouldDefaultOpen("read", "completed"),
bashError: shouldDefaultOpen("bash", "error"),
readError: shouldDefaultOpen("read", "error"),
unknown: shouldDefaultOpen("unknown", "error"),
plain: buildBashTerminalOutput("bun test", "ok\nDone", undefined),
echoed: buildBashTerminalOutput("bun test", "$ bun test\nok", undefined),
errorPreferred: buildBashTerminalOutput("bun test", "partial", "boom"),
pending: buildBashTerminalOutput("bun test", undefined, undefined),
noCommand: buildBashTerminalOutput(undefined, "plain output", undefined),
}).toEqual({
bash: false,
read: false,
bashError: false,
readError: false,
unknown: false,
plain: "$ bun test\nok\nDone",
echoed: "$ bun test\nok",
errorPreferred: "$ bun test\nboom",
pending: "$ bun test",
noCommand: "plain output",
})
})
})

describe("getToolDuration", () => {
test("uses SDK tool state start and end timestamps", () => {
expect(
getToolDuration({
id: "tool-1",
type: "tool",
state: { status: "completed", time: { start: 1_000, end: 3_500 } },
} as any),
).toBe("2s")
test("truncates very long output", () => {
const truncated = buildBashTerminalOutput(undefined, "x".repeat(6000), undefined)
expect({
endsWithMarker: truncated.endsWith("... (truncated)"),
length: truncated.length,
}).toEqual({
endsWithMarker: true,
length: 5000 + "\n... (truncated)".length,
})
})
})

test("clamps reversed timestamps instead of showing negative durations", () => {
expect(
getToolDuration({
id: "tool-1",
type: "tool",
state: { status: "completed", time: { start: 3_500, end: 1_000 } },
} as any),
).toBe("0ms")
describe("stripShellEnvelope", () => {
test("strips the shell result envelope from tool output", () => {
const envelope = JSON.stringify({
output: "",
command: "ls",
exit: 0,
description: "List files",
cwd: "/repo",
yield_time_ms: 1000,
})
expect({
envelopeOnly: stripShellEnvelope(envelope),
stdoutPlusEnvelope: stripShellEnvelope(`hello\nworld\n${envelope}`),
plainOutput: stripShellEnvelope("just text"),
otherJson: stripShellEnvelope('{"foo": 1}'),
envelopeWithOutput: stripShellEnvelope(
JSON.stringify({ output: "files", command: "ls", exit: 0 }),
),
cmdEnvelope: stripShellEnvelope(JSON.stringify({ output: "ok", cmd: "ls", exit: 0 })),
}).toEqual({
envelopeOnly: "",
stdoutPlusEnvelope: "hello\nworld",
plainOutput: "just text",
otherJson: '{"foo": 1}',
envelopeWithOutput: "files",
cmdEnvelope: "ok",
})
})
})

Expand Down Expand Up @@ -140,3 +159,16 @@ describe("useToolElapsedTime source", () => {
})
})
})


describe("ChatToolCall memo comparison", () => {
test("re-renders when the controlled open state changes so rows can expand", () => {
expect({
comparesOpen: chatToolCallSource.includes("prev.open !== next.open"),
comparesTurnError: chatToolCallSource.includes("prev.turnHasError !== next.turnHasError"),
}).toEqual({
comparesOpen: true,
comparesTurnError: true,
})
})
})
Loading
Loading