feat: unify execution and add workspace file imports

Remove Ask/Execute modes and general product tool approvals so requests use the selected runtime, enabled capabilities, and execution account permissions. Migrate retired application metadata while preserving user content.

Retire the Results page while retaining conversation images and stored artifacts. Add local and remote workspace file imports, timestamps and sorting, improve image discovery and saving, and refine workspace navigation and supervision responsiveness. Include the accompanying web-search changes, tests, probes, and product documentation.

Remote imports require an updated Agent. Existing artifacts are not automatically copied into project directories. Validation evidence and outstanding failures remain documented in feature progress files; no full test suite or real-model calls were rerun for this commit.

Release note: Run requests without switching work modes, import files into a selected local or remote workspace folder, sort workspace files by date, and keep using conversation images after removal of the Results page.
This commit is contained in:
mesalogo
2026-10-04 20:02:59 +08:00
parent 0cd5da33f4
commit 56ebd40bd8
374 changed files with 7075 additions and 6224 deletions
+6 -33
View File
@@ -313,43 +313,16 @@ export class AgentRuntimeController implements AgentRuntime {
}
const slot = this.current
this.ownedConversationIds.add(request.conversationId)
const toolsAllowed = request.workMode === 'execute'
let toolDenied = false
const effectiveAuthorize: RuntimeAuthorizer | undefined = toolsAllowed
? authorize === undefined
? undefined
: async (authorizationRequest) => {
const decision = await authorize(authorizationRequest)
if (decision === 'deny') {
toolDenied = true
}
return decision
}
: async () => {
toolDenied = true
return 'deny'
const effectiveAuthorize: RuntimeAuthorizer = authorize
? async (approval, approvalSignal) => {
const decision = await authorize(approval, approvalSignal)
toolDenied = decision === 'deny'
return decision
}
: async () => 'once'
slot.activeRequests += 1
try {
if (toolsAllowed && !slot.runtime.supportsToolExecution) {
throw new Error('当前 Runtime 不支持工具执行,请切换到 OpenCode 或 Continue')
}
if (
toolsAllowed &&
slot.runtime.requiresToolApproval &&
effectiveAuthorize
) {
const decision = await effectiveAuthorize({
scopeKey: 'runtime:whole-run',
title: '允许 Agent 使用工作区工具?',
description:
'该 Runtime 尚不能报告单个工具调用,可能读取或修改工作区文件并执行命令。',
allowPermanent: false
})
if (decision === 'deny') {
throw new Error('用户拒绝了 Agent 工具执行')
}
}
try {
for await (const event of slot.runtime.run(
request,