fix: complete runtime and workspace workflows
Restore Ask workspace reads and output paging without granting write access, and let programming Subagents reuse their parent's browser page. Allocate browser resources only when used, keep Agent pages aligned with workbar tabs, recover released bindings, and remove unused automatic screenshot work. Preserve inherited Runtime selections during remote usage persistence and manual compression. Keep viable channel model fallbacks, display the actual scheduled-task mode and Harness model source, and avoid rediscovery delays when calling healthy MCP tools. Fix directory/history refresh, case-only renames, rename-aware commit diffs, and FastGPT probe success reporting. Add regression coverage and align feature documentation. The Agent-side connection timeout fix requires deploying an updated Agent; existing Ask read-only and Execute authorization boundaries remain unchanged. Final validation: 3839 tests passed, 66 skipped; typecheck, lint, development build, and diff checks passed. Isolated Electron UI/MCP workflows passed with a loopback model fixture. Current-source Linux x64 Host checks passed with three successful real model requests. Chromium loadURL rejection was not reproduced in the UI; released-binding recovery has automated coverage. Release note: 修复 Ask 读取项目文件、浏览器页面显示与恢复、文件管理及模型配置跟随中的不一致,并减少无用截图和 MCP 等待。定时任务显示实际工作模式,远程会话可正常保存继承 Runtime 的用量;远端连接超时修复需更新 Agent 后生效。
This commit is contained in:
@@ -16,7 +16,7 @@ import type {
|
||||
RuntimeAuthorizer,
|
||||
RuntimeEvent
|
||||
} from './runtime'
|
||||
import type { ModelToolProviderLike } from './model-tool-provider'
|
||||
import type { ModelToolDefinition, ModelToolProviderLike } from './model-tool-provider'
|
||||
import type { RuntimeSkillPackage } from '../capabilities/capability-service'
|
||||
import type { ControlledHarnessExtensionPackage } from './deepseek-harness-extension-loader'
|
||||
import {
|
||||
@@ -449,6 +449,7 @@ export class DeepSeekHarnessRuntime implements AgentRuntime {
|
||||
private fatalError?: Error
|
||||
private stderrBytes = 0
|
||||
private readonly sessions = new Map<string, string>()
|
||||
private readonly proxyToolCatalogs = new Map<string, ModelToolDefinition[]>()
|
||||
private readonly sessionInitializations = new Map<
|
||||
string,
|
||||
Promise<string>
|
||||
@@ -844,12 +845,11 @@ export class DeepSeekHarnessRuntime implements AgentRuntime {
|
||||
context,
|
||||
connection.signal
|
||||
)
|
||||
return {
|
||||
tools: boundedProxyToolCatalog(
|
||||
tools,
|
||||
context.workMode
|
||||
)
|
||||
}
|
||||
const catalog = boundedProxyToolCatalog(tools, context.workMode)
|
||||
this.proxyToolCatalogs.set(params.sessionId, tools.filter(
|
||||
(tool) => tool.source === 'mcp' || isMainWebTool(tool)
|
||||
))
|
||||
return { tools: catalog }
|
||||
}
|
||||
if (method === GOODBUDDY_TOOLS_CALL) {
|
||||
const sessionId = params.sessionId
|
||||
@@ -882,10 +882,7 @@ export class DeepSeekHarnessRuntime implements AgentRuntime {
|
||||
knowledgeCapabilityToken:
|
||||
run.request.knowledgeCapabilityToken
|
||||
}
|
||||
const tools = await this.options.toolProvider.listTools(
|
||||
context,
|
||||
run.toolController.signal
|
||||
)
|
||||
const tools = this.proxyToolCatalogs.get(sessionId as string) ?? []
|
||||
const tool = tools.find(
|
||||
(candidate) =>
|
||||
candidate.name === name &&
|
||||
@@ -1599,6 +1596,7 @@ export class DeepSeekHarnessRuntime implements AgentRuntime {
|
||||
async releaseConversation(conversationId: string): Promise<void> {
|
||||
const sessionId = this.sessions.get(conversationId)
|
||||
this.sessions.delete(conversationId)
|
||||
if (sessionId) this.proxyToolCatalogs.delete(sessionId)
|
||||
if (!sessionId || !this.state) {
|
||||
await this.options.toolProvider
|
||||
?.releaseConversation(conversationId)
|
||||
@@ -1646,6 +1644,7 @@ export class DeepSeekHarnessRuntime implements AgentRuntime {
|
||||
}
|
||||
this.activeRuns.clear()
|
||||
this.sessions.clear()
|
||||
this.proxyToolCatalogs.clear()
|
||||
this.sessionInitializations.clear()
|
||||
this.conversationTails.clear()
|
||||
if (!state) {
|
||||
|
||||
Reference in New Issue
Block a user