@dreb/coding-agent 2.23.0 → 2.25.0
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/CHANGELOG.md +4 -0
- package/README.md +2 -0
- package/dist/core/agent-session.d.ts +11 -0
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +35 -2
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/extensions/index.d.ts +1 -1
- package/dist/core/extensions/index.d.ts.map +1 -1
- package/dist/core/extensions/index.js.map +1 -1
- package/dist/core/extensions/types.d.ts +14 -1
- package/dist/core/extensions/types.d.ts.map +1 -1
- package/dist/core/extensions/types.js.map +1 -1
- package/dist/core/sdk.d.ts.map +1 -1
- package/dist/core/sdk.js +4 -0
- package/dist/core/sdk.js.map +1 -1
- package/dist/core/settings-manager.d.ts +14 -0
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +41 -0
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/core/tools/index.d.ts +1 -1
- package/dist/core/tools/index.d.ts.map +1 -1
- package/dist/core/tools/index.js +1 -1
- package/dist/core/tools/index.js.map +1 -1
- package/dist/core/tools/subagent.d.ts +5 -1
- package/dist/core/tools/subagent.d.ts.map +1 -1
- package/dist/core/tools/subagent.js +51 -13
- package/dist/core/tools/subagent.js.map +1 -1
- package/dist/modes/interactive/components/settings-selector.d.ts +36 -1
- package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-selector.js +195 -1
- package/dist/modes/interactive/components/settings-selector.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +51 -1
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/interactive/tab-title.d.ts +5 -0
- package/dist/modes/interactive/tab-title.d.ts.map +1 -1
- package/dist/modes/interactive/tab-title.js +6 -0
- package/dist/modes/interactive/tab-title.js.map +1 -1
- package/docs/agent-models.md +64 -0
- package/docs/extensions.md +13 -0
- package/docs/mach6.md +2 -0
- package/docs/settings.md +18 -0
- package/package.json +1 -1
|
@@ -23,7 +23,7 @@ import { SessionManager } from "../../core/session-manager.js";
|
|
|
23
23
|
import { BUILTIN_SLASH_COMMANDS } from "../../core/slash-commands.js";
|
|
24
24
|
import { restoreStderr, takeOverStderr } from "../../core/stderr-guard.js";
|
|
25
25
|
import { resolveToCwd } from "../../core/tools/path-utils.js";
|
|
26
|
-
import { abortBackgroundAgents, getRunningBackgroundAgents } from "../../core/tools/subagent.js";
|
|
26
|
+
import { abortBackgroundAgents, discoverAgentTypes, getRunningBackgroundAgents } from "../../core/tools/subagent.js";
|
|
27
27
|
import { getChangelogPath, getNewEntries, parseChangelog } from "../../utils/changelog.js";
|
|
28
28
|
import { copyToClipboard } from "../../utils/clipboard.js";
|
|
29
29
|
import { extensionForImageMimeType, readClipboardImage } from "../../utils/clipboard-image.js";
|
|
@@ -487,6 +487,7 @@ export class InteractiveMode {
|
|
|
487
487
|
getModel: () => this.session.model,
|
|
488
488
|
getModelRegistry: () => this.session.modelRegistry,
|
|
489
489
|
getProvider: () => this.session.model?.provider,
|
|
490
|
+
getAgentModelsOverride: (name) => this.settingsManager.getAgentModelsForAgent(name),
|
|
490
491
|
});
|
|
491
492
|
}
|
|
492
493
|
/**
|
|
@@ -2229,6 +2230,33 @@ export class InteractiveMode {
|
|
|
2229
2230
|
this.ui.requestRender();
|
|
2230
2231
|
break;
|
|
2231
2232
|
}
|
|
2233
|
+
case "length_retry": {
|
|
2234
|
+
// Remove the ghost streaming component left from the truncated stream
|
|
2235
|
+
if (this.streamingComponent) {
|
|
2236
|
+
this.chatContainer.removeChild(this.streamingComponent);
|
|
2237
|
+
this.streamingComponent = undefined;
|
|
2238
|
+
this.streamingMessage = undefined;
|
|
2239
|
+
}
|
|
2240
|
+
// Clear any pending tool components from the truncated partial
|
|
2241
|
+
for (const [, component] of this.pendingTools.entries()) {
|
|
2242
|
+
this.chatContainer.removeChild(component);
|
|
2243
|
+
}
|
|
2244
|
+
this.pendingTools.clear();
|
|
2245
|
+
// Show retry status
|
|
2246
|
+
this.statusContainer.clear();
|
|
2247
|
+
if (this.loadingAnimation) {
|
|
2248
|
+
this.loadingAnimation.stop();
|
|
2249
|
+
this.loadingAnimation = undefined;
|
|
2250
|
+
}
|
|
2251
|
+
if (this.retryLoader) {
|
|
2252
|
+
this.retryLoader.stop();
|
|
2253
|
+
this.retryLoader = undefined;
|
|
2254
|
+
}
|
|
2255
|
+
this.retryLoader = new Loader(this.ui, (spinner) => theme.fg("warning", spinner), (text) => theme.fg("muted", text), `Response truncated, retrying with larger token budget (${event.attempt}/${event.maxAttempts})... (${keyText("app.interrupt")} to cancel)`);
|
|
2256
|
+
this.statusContainer.addChild(this.retryLoader);
|
|
2257
|
+
this.ui.requestRender();
|
|
2258
|
+
break;
|
|
2259
|
+
}
|
|
2232
2260
|
case "background_agent_start":
|
|
2233
2261
|
case "background_agent_end": {
|
|
2234
2262
|
this.updateBackgroundAgentStatus();
|
|
@@ -2945,6 +2973,11 @@ export class InteractiveMode {
|
|
|
2945
2973
|
}
|
|
2946
2974
|
showSettingsSelector() {
|
|
2947
2975
|
this.showSelector((done) => {
|
|
2976
|
+
// Discover agent types for agent models section
|
|
2977
|
+
const agentTypes = discoverAgentTypes(process.cwd());
|
|
2978
|
+
const agentNames = Array.from(agentTypes.keys()).sort();
|
|
2979
|
+
const availableModels = this.session.modelRegistry.getAvailable();
|
|
2980
|
+
const availableModelIds = availableModels.map((m) => `${m.provider}/${m.id}`);
|
|
2948
2981
|
const selector = new SettingsSelectorComponent({
|
|
2949
2982
|
autoCompact: this.session.autoCompactionEnabled,
|
|
2950
2983
|
showImages: this.settingsManager.getShowImages(),
|
|
@@ -2966,6 +2999,9 @@ export class InteractiveMode {
|
|
|
2966
2999
|
editorPaddingX: this.settingsManager.getEditorPaddingX(),
|
|
2967
3000
|
autocompleteMaxVisible: this.settingsManager.getAutocompleteMaxVisible(),
|
|
2968
3001
|
quietStartup: this.settingsManager.getQuietStartup(),
|
|
3002
|
+
agentModels: this.settingsManager.getAgentModels(),
|
|
3003
|
+
agentNames: agentNames,
|
|
3004
|
+
availableModelIds,
|
|
2969
3005
|
}, {
|
|
2970
3006
|
onAutoCompactChange: (enabled) => {
|
|
2971
3007
|
this.session.setAutoCompactionEnabled(enabled);
|
|
@@ -3060,6 +3096,20 @@ export class InteractiveMode {
|
|
|
3060
3096
|
this.editor.setAutocompleteMaxVisible(maxVisible);
|
|
3061
3097
|
}
|
|
3062
3098
|
},
|
|
3099
|
+
onAgentModelsChange: (agentName, models) => {
|
|
3100
|
+
const shadowedByProject = this.settingsManager.hasProjectAgentModelOverride(agentName);
|
|
3101
|
+
if (models.length > 0) {
|
|
3102
|
+
this.settingsManager.setAgentModelsForAgent(agentName, models);
|
|
3103
|
+
}
|
|
3104
|
+
else {
|
|
3105
|
+
this.settingsManager.removeAgentModelsForAgent(agentName);
|
|
3106
|
+
}
|
|
3107
|
+
if (shadowedByProject) {
|
|
3108
|
+
this.showWarning(`A project-level agentModels override for "${agentName}" (.dreb/settings.json) ` +
|
|
3109
|
+
"takes precedence — this change to global settings will have no effect. " +
|
|
3110
|
+
"Edit the project settings file to change it.");
|
|
3111
|
+
}
|
|
3112
|
+
},
|
|
3063
3113
|
onCancel: () => {
|
|
3064
3114
|
done();
|
|
3065
3115
|
this.ui.requestRender();
|