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

@@ -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'
}
}