leaf-coding-agent 1.0.1 → 1.0.2
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/core/agent-session.d.ts +3 -0
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +11 -0
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/slash-commands.d.ts.map +1 -1
- package/dist/core/slash-commands.js +1 -0
- package/dist/core/slash-commands.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +1 -0
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +47 -0
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/package.json +1 -1
|
@@ -30,6 +30,7 @@ import { emitSessionShutdownEvent } from "./extensions/runner.js";
|
|
|
30
30
|
import { expandPromptTemplate } from "./prompt-templates.js";
|
|
31
31
|
import { CURRENT_SESSION_VERSION, getLatestCompactionEntry } from "./session-manager.js";
|
|
32
32
|
import { createSyntheticSourceInfo } from "./source-info.js";
|
|
33
|
+
import { createWorkerIntegration } from "./worker-integration.js";
|
|
33
34
|
import { buildDynamicContext, buildSystemPrompt } from "./system-prompt.js";
|
|
34
35
|
import { createLocalBashOperations } from "./tools/bash.js";
|
|
35
36
|
import { createAllToolDefinitions } from "./tools/index.js";
|
|
@@ -110,6 +111,9 @@ export class AgentSession {
|
|
|
110
111
|
_toolPromptSnippets = new Map();
|
|
111
112
|
_toolPromptGuidelines = new Map();
|
|
112
113
|
// Base system prompt (without extension appends) - used to apply fresh appends each turn
|
|
114
|
+
// Worker 模式
|
|
115
|
+
workerEnabled = false;
|
|
116
|
+
workerIntegration;
|
|
113
117
|
_baseSystemPrompt = "";
|
|
114
118
|
_baseSystemPromptOptions;
|
|
115
119
|
constructor(config) {
|
|
@@ -1912,6 +1916,13 @@ export class AgentSession {
|
|
|
1912
1916
|
if (this._extensionRunnerRef) {
|
|
1913
1917
|
this._extensionRunnerRef.current = this._extensionRunner;
|
|
1914
1918
|
}
|
|
1919
|
+
// 初始化 Worker 集成
|
|
1920
|
+
this.workerIntegration = createWorkerIntegration({
|
|
1921
|
+
cwd: this._cwd,
|
|
1922
|
+
agentSession: this,
|
|
1923
|
+
extensionRunner: this._extensionRunner,
|
|
1924
|
+
});
|
|
1925
|
+
this.workerIntegration.initialize();
|
|
1915
1926
|
this._bindExtensionCore(this._extensionRunner);
|
|
1916
1927
|
this._applyExtensionBindings(this._extensionRunner);
|
|
1917
1928
|
const defaultActiveToolNames = this._baseToolsOverride
|