Merge remote-tracking branch 'origin/master' into worktree/web-multimodal-image-input

# Conflicts:
#	.gitignore
#	apps/cli/package.json
#	apps/cli/src/web.ts
#	docs/architecture.i18n.yaml
#	docs/config-catalog.md
#	docs/module-graph.md
#	packages/client/connection/README.md
#	packages/client/connection/src/client/api.ts
#	packages/client/connection/src/client/fixture.ts
#	packages/client/runtime/README.md
#	packages/client/runtime/src/client/sessions/service.ts
#	packages/client/runtime/src/client/sessions/session.ts
#	packages/client/runtime/src/client/workspaces/service.ts
#	packages/client/ui-conversation/src/client/apply.ts
#	packages/client/ui-conversation/src/client/chat/MessageItem.tsx
#	packages/client/ui-conversation/src/client/contract/slots.ts
#	packages/client/ui-conversation/src/client/index.ts
#	packages/client/ui-conversation/src/client/service.ts
#	packages/client/ui-conversation/src/client/skeleton/ConversationRoot.tsx
#	packages/client/ui-conversation/src/client/skeleton/EmptyHero.tsx
#	packages/client/ui-conversation/src/client/skeleton/EmptyState.tsx
#	packages/client/ui-conversation/src/client/skeleton/InputBar.module.css
#	packages/client/ui-conversation/src/client/skeleton/InputBar.tsx
#	packages/client/ui-conversation/tests/apply-inject.spec.tsx
#	packages/client/ui-conversation/tests/input-bar.spec.tsx
#	packages/client/ui-conversation/tests/skeleton.spec.tsx
#	packages/client/ui-trajectory/tests/views.spec.tsx
#	packages/host/apiproxy/src/api-proxy.ts
#	pnpm-lock.yaml
This commit is contained in:
Yichen Jiang
2026-07-27 12:27:30 +08:00
1799 changed files with 63595 additions and 13464 deletions

View File

@@ -9,8 +9,11 @@ export class TestSessionQueryService extends SessionQueryService {
}
override searchEvents(
..._args: Parameters<SessionQueryService['searchEvents']>
...args: Parameters<SessionQueryService['searchEvents']>
): ReturnType<SessionQueryService['searchEvents']> {
return Promise.resolve({ items: [] })
return this.readSurface(args[0].sessionId).then(surface => ({
session: surface.session,
items: [],
}))
}
}

View File

@@ -1,7 +1,7 @@
terminal 96x36 buffer=normal length=36 base=0 viewport=0
lifecycle started=1 stopped=0 progress=inactive
title "DSH snapshot"
cursor hidden column=1 viewportRow=13 bufferRow=13
cursor hidden column=1 viewportRow=12 bufferRow=12
buffer
0| " DEEPSEEK HARNESS"
style 1-8 fg=bright-blue bold
@@ -13,30 +13,27 @@ buffer
3| <blank>
4| "▌ "
style 0-0 fg=yellow
5| "▌ ◌ const first = await tools.bash({ command: 'echo CODE_ONE' }) "
5| "▌ ◌ Echo two markers and combine them "
style 0-0 fg=yellow
style 2-2 fg=yellow bold
style 3-95 bold
6| "▌ const second = await tools.bas "
style 3-36 bold
6| "▌ const first = await tools.bash({ command: 'echo CODE_ONE' }) "
style 0-0 fg=yellow
style 2-31 bold
7| "▌ const first = await tools.bash({ command: 'echo CODE_ONE' }) "
7| "▌ const second = await tools.bash({ command: 'echo CODE_TWO' }) "
style 0-0 fg=yellow
8| "▌ const second = await tools.bash({ command: 'echo CODE_TWO' }) "
8| "▌ console.log(first, second) "
style 0-0 fg=yellow
9| "▌ console.log(first, second) "
9| "▌ return `${first}+${second}` "
style 0-0 fg=yellow
10| "▌ return `${first}+${second}` "
10| "▌ "
style 0-0 fg=yellow
11| "▌ "
style 0-0 fg=yellow
12| "────────────────────────────────────────────────────────────────────────────────────────────────"
11| "────────────────────────────────────────────────────────────────────────────────────────────────"
style 0-95 dim
13| " "
12| " "
style 1-1 inverse
14| "────────────────────────────────────────────────────────────────────────────────────────────────"
13| "────────────────────────────────────────────────────────────────────────────────────────────────"
style 0-95 dim
15| "deepseek-v4-flash /workspace/project ↑0 ↓0 0% context tools:collapsed"
14| "deepseek-v4-flash /workspace/project ↑0 ↓0 0% context tools:collapsed"
style 0-43 dim
style 69-95 dim
16-35| <blank>
15-35| <blank>

View File

@@ -364,6 +364,7 @@ describe('TUI terminal-state snapshots', () => {
name: 'run_code',
arguments: {
code: "const first = await tools.bash({ command: 'echo CODE_ONE' })\nconst second = await tools.bash({ command: 'echo CODE_TWO' })\nconsole.log(first, second)\nreturn `${first}+${second}`",
description: 'Echo two markers and combine them',
},
}
await renderAfter(harness, () => { appendToolCalls(harness.session, [call]) })
@@ -650,7 +651,7 @@ describe('TUI terminal-state snapshots', () => {
const dateNow = vi.spyOn(Date, 'now').mockReturnValue(Date.parse('2026-07-23T08:00:00.000Z'))
const earlier = { version: 0, id: SessionId('earlier-session'), createdAt: Date.parse('2024-01-01T00:00:00Z'), cwd: '/workspace/project' }
const harness = await setupSnapshot({
config: { resumeCommand: 'RESUME_SESSION_ID={session} dsh' },
config: { resumeCommand: 'dsh --resume {session}' },
sessionPersistence: {
list: async () => [earlier],
load: async () => ({

View File

@@ -206,7 +206,7 @@ describe('TUI config', () => {
})
describe('resume command and /resume', () => {
const RESUME = 'RESUME_SESSION_ID={session} dsh'
const RESUME = 'dsh --resume {session}'
const header = (id: string, createdAt: number, cwd: string): SessionHeader =>
({ version: 0, id: SessionId(id), createdAt, cwd })
const resumeEvents = (
@@ -234,7 +234,7 @@ describe('resume command and /resume', () => {
result.terminal.send('/exit')
result.terminal.send('\r')
await tick()
expect(result.terminal.output).toContain('To resume this session: RESUME_SESSION_ID=main-session dsh')
expect(result.terminal.output).toContain('To resume this session: dsh --resume main-session')
expect(result.exit).toHaveBeenCalledWith(0)
await dispose(result)
})
@@ -998,9 +998,10 @@ describe('resume command and /resume', () => {
await tick(); await tick()
result.terminal.send('Fallback target')
result.terminal.send('\r')
await tick()
expect(result.terminal.output).toContain('This host cannot hand off in place. Exit and run:')
expect(result.terminal.output).toContain('RESUME_SESSION_ID=fallback-session')
await vi.waitFor(() => {
expect(result.terminal.output).toContain('This host cannot hand off in place. Exit and run:')
})
expect(result.terminal.output).toContain('dsh --resume fallback-session')
expect(result.terminal.stopped).toBe(0)
await dispose(result)
})
@@ -1019,8 +1020,9 @@ describe('resume command and /resume', () => {
await tick(); await tick()
result.terminal.send('No fallback target')
result.terminal.send('\r')
await tick()
expect(result.terminal.output).toContain('Session is resumable, but this host cannot hand it off in place')
await vi.waitFor(() => {
expect(result.terminal.output).toContain('Session is resumable, but this host cannot hand it off in place')
})
await dispose(result)
})