@tencent-adp/portal-cli 0.0.6 → 0.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/acp/agent.d.ts +0 -2
- package/dist/acp/agent.js +3 -7
- package/package.json +1 -1
package/dist/acp/agent.d.ts
CHANGED
|
@@ -23,8 +23,6 @@ export declare class PortalAcpAgent {
|
|
|
23
23
|
listSessions(params: ListSessionsRequest): ListSessionsResponse;
|
|
24
24
|
setConfig(params: SetSessionConfigOptionRequest): SetSessionConfigOptionResponse;
|
|
25
25
|
prompt(params: PromptRequest, acp: AgentContext): Promise<PromptResponse>;
|
|
26
|
-
/** Remembers which session started a task, so its exit reaches that session. */
|
|
27
|
-
private noteTaskOwner;
|
|
28
26
|
/**
|
|
29
27
|
* A background command finished. The model is told in a turn of its own, but
|
|
30
28
|
* only once the current turn is over: interrupting a reply the user is reading
|
package/dist/acp/agent.js
CHANGED
|
@@ -126,7 +126,9 @@ export class PortalAcpAgent {
|
|
|
126
126
|
message: promptText(params.prompt),
|
|
127
127
|
signal: abort.signal,
|
|
128
128
|
tools: this.tools,
|
|
129
|
-
|
|
129
|
+
// 归属按会话认,不按工作目录反查:同一个目录可以同时开多个会话,
|
|
130
|
+
// 反查只会命中第一个,任务退出的通知就投错地方了。
|
|
131
|
+
onTaskStarted: (taskId) => this.taskOwners.set(taskId, session.id),
|
|
130
132
|
// Checking a task is a safe point mid-turn: hand over what queued up
|
|
131
133
|
// rather than waiting for the turn to end.
|
|
132
134
|
onTaskChecked: () => session.queue.splice(0).map((notice) => notice.text),
|
|
@@ -146,12 +148,6 @@ export class PortalAcpAgent {
|
|
|
146
148
|
this.drainQueue(session);
|
|
147
149
|
}
|
|
148
150
|
}
|
|
149
|
-
/** Remembers which session started a task, so its exit reaches that session. */
|
|
150
|
-
noteTaskOwner(cwd, taskId) {
|
|
151
|
-
const session = [...this.sessions.values()].find((item) => item.cwd === cwd);
|
|
152
|
-
if (session)
|
|
153
|
-
this.taskOwners.set(taskId, session.id);
|
|
154
|
-
}
|
|
155
151
|
/**
|
|
156
152
|
* A background command finished. The model is told in a turn of its own, but
|
|
157
153
|
* only once the current turn is over: interrupting a reply the user is reading
|