leaf-coding-agent 1.0.4 → 1.0.5
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.map +1 -1
- package/dist/core/agent-session.js +11 -1
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/tools/worker.d.ts +2 -0
- package/dist/core/tools/worker.d.ts.map +1 -1
- package/dist/core/tools/worker.js +23 -10
- package/dist/core/tools/worker.js.map +1 -1
- package/dist/core/worker-integration.d.ts +4 -3
- package/dist/core/worker-integration.d.ts.map +1 -1
- package/dist/core/worker-integration.js +22 -5
- package/dist/core/worker-integration.js.map +1 -1
- package/dist/modes/interactive/components/footer.d.ts.map +1 -1
- package/dist/modes/interactive/components/footer.js +4 -0
- package/dist/modes/interactive/components/footer.js.map +1 -1
- package/package.json +1 -1
|
@@ -1955,13 +1955,23 @@ export class AgentSession {
|
|
|
1955
1955
|
if (this._extensionRunnerRef) {
|
|
1956
1956
|
this._extensionRunnerRef.current = this._extensionRunner;
|
|
1957
1957
|
}
|
|
1958
|
-
// 初始化 Worker
|
|
1958
|
+
// 初始化 Worker 集成(API Key 将在首次使用时获取)
|
|
1959
1959
|
this.workerIntegration = createWorkerIntegration({
|
|
1960
1960
|
cwd: this._cwd,
|
|
1961
1961
|
agentSession: this,
|
|
1962
1962
|
extensionRunner: this._extensionRunner,
|
|
1963
1963
|
});
|
|
1964
1964
|
this.workerIntegration.initialize();
|
|
1965
|
+
// 异步获取 API Key
|
|
1966
|
+
if (this.model) {
|
|
1967
|
+
this._modelRegistry.getApiKeyAndHeaders(this.model).then(authResult => {
|
|
1968
|
+
if (authResult.ok && authResult.apiKey && this.workerIntegration) {
|
|
1969
|
+
this.workerIntegration.updateApiKey(authResult.apiKey);
|
|
1970
|
+
}
|
|
1971
|
+
}).catch(error => {
|
|
1972
|
+
console.warn("[WorkerIntegration] 获取 API Key 失败:", error);
|
|
1973
|
+
});
|
|
1974
|
+
}
|
|
1965
1975
|
this._bindExtensionCore(this._extensionRunner);
|
|
1966
1976
|
this._applyExtensionBindings(this._extensionRunner);
|
|
1967
1977
|
const defaultActiveToolNames = this._baseToolsOverride
|