fix(phase2): restore agent streams and persist extension installations
This commit is contained in:
@@ -59,12 +59,16 @@ export function initialArguments(command: PluginCommand): Record<string, unknown
|
||||
|
||||
/** 按字段类型把输入框的字符串转成 schema 期望的类型。 */
|
||||
export function coerceArgument(field: CommandField, raw: string): unknown {
|
||||
if (raw.trim() === '') return undefined
|
||||
if (field.type === 'boolean') return raw === 'true'
|
||||
if (field.type === 'number' || field.type === 'integer') {
|
||||
if (raw.trim() === '') return undefined
|
||||
const parsed = Number(raw)
|
||||
return Number.isNaN(parsed) ? undefined : parsed
|
||||
}
|
||||
if (field.type === 'object' || field.type === 'array') {
|
||||
try { return JSON.parse(raw) } catch { return raw } // Backend reports the schema error without discarding the input.
|
||||
}
|
||||
return raw
|
||||
}
|
||||
|
||||
|
||||
@@ -130,7 +130,7 @@ export class SseClient {
|
||||
this.controller.abort()
|
||||
}
|
||||
|
||||
// TODO(streaming): 桌面网络策略确定后,在 Store 层增加有上限的指数退避重连。
|
||||
// 传输层不自动重试 POST;Agent Store 使用 sequence 游标执行有界 GET 重连。
|
||||
|
||||
isConnected() {
|
||||
return this.connected
|
||||
|
||||
Reference in New Issue
Block a user