Fix ask_user_question review findings

This commit is contained in:
Yichen Jiang
2026-06-29 10:49:07 +08:00
parent 08fc8467bc
commit 51700d4685
38 changed files with 611 additions and 54 deletions

View File

@@ -23,10 +23,12 @@
"license": "BSD-3-Clause",
"peerDependencies": {
"@deepseek-ai/dsh-agent": "^0.0.1",
"@deepseek-ai/dsh-llm": "^0.0.1",
"cordis": "^4.0.0-rc.6"
},
"devDependencies": {
"@deepseek-ai/dsh-agent": "workspace:^",
"@deepseek-ai/dsh-llm": "workspace:^",
"cordis": "^4.0.0-rc.6"
}
}

View File

@@ -9,6 +9,7 @@
import { Context, Service } from 'cordis'
import type { Agent } from '@deepseek-ai/dsh-agent'
import { HarnessError } from '@deepseek-ai/dsh-llm'
declare module 'cordis' {
interface Context {
@@ -58,12 +59,9 @@ export interface UserInteractionProvider {
}
/** Stable error taxonomy for user-interaction failures. */
export class UserInteractionError extends Error {
readonly code: string
export class UserInteractionError extends HarnessError {
constructor(message: string, code: string, options?: ErrorOptions) {
super(message, options)
this.code = code
super(message, code, options)
this.name = 'UserInteractionError'
}
}

View File

@@ -16,6 +16,9 @@
},
{
"path": "../agent"
},
{
"path": "../../llm/llm"
}
]
}