@caupulican/pi-adaptative 0.80.82 → 0.80.84
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 +15 -0
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +5 -1
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/sdk.d.ts.map +1 -1
- package/dist/core/sdk.js +1 -0
- package/dist/core/sdk.js.map +1 -1
- package/dist/core/settings-manager.d.ts +3 -0
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +6 -1
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-selector.js +143 -24
- package/dist/modes/interactive/components/settings-selector.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 +41 -6
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/docs/settings.md +4 -2
- package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
- package/examples/extensions/custom-provider-anthropic/package.json +1 -1
- package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
- package/examples/extensions/sandbox/package-lock.json +2 -2
- package/examples/extensions/sandbox/package.json +1 -1
- package/examples/extensions/with-deps/package-lock.json +2 -2
- package/examples/extensions/with-deps/package.json +1 -1
- package/npm-shrinkwrap.json +12 -12
- package/package.json +4 -4
|
@@ -5048,6 +5048,7 @@ export class InteractiveMode {
|
|
|
5048
5048
|
return [
|
|
5049
5049
|
"Autonomy status",
|
|
5050
5050
|
`Mode: ${autonomy.mode}${autonomy.mode === "full" ? " (standing autonomy)" : ""}`,
|
|
5051
|
+
`Goal loop rounds: ${autonomy.maxStallTurns}`,
|
|
5051
5052
|
`Auto Learn: ${settings.enabled ? "enabled" : "disabled"}; model=${settings.model}; applyHighConfidence=${settings.applyHighConfidence}`,
|
|
5052
5053
|
`Long-session trigger: ${settings.longSessionMessages} messages or ${settings.longSessionContextPercent}% context; cooldown=${settings.cooldownMinutes}m`,
|
|
5053
5054
|
reflectionLine,
|
|
@@ -5063,7 +5064,7 @@ export class InteractiveMode {
|
|
|
5063
5064
|
applyAutonomyMode(mode, scope = "global") {
|
|
5064
5065
|
const currentAutoLearn = this.settingsManager.getAutoLearnSettings();
|
|
5065
5066
|
const preset = this.getAutoLearnPresetForAutonomyMode(mode, currentAutoLearn);
|
|
5066
|
-
this.settingsManager.setAutonomySettings({ mode }, scope);
|
|
5067
|
+
this.settingsManager.setAutonomySettings({ ...this.settingsManager.getAutonomySettings(), mode }, scope);
|
|
5067
5068
|
this.settingsManager.setAutoLearnSettings(preset, scope);
|
|
5068
5069
|
this.updateAutoLearnFooter();
|
|
5069
5070
|
}
|
|
@@ -5568,8 +5569,14 @@ export class InteractiveMode {
|
|
|
5568
5569
|
return;
|
|
5569
5570
|
}
|
|
5570
5571
|
try {
|
|
5572
|
+
const profileModel = await this.selectProfileModelForCreate();
|
|
5573
|
+
if (profileModel === undefined) {
|
|
5574
|
+
void this.openLibraryManagerFlow();
|
|
5575
|
+
return;
|
|
5576
|
+
}
|
|
5571
5577
|
this.settingsManager.setProfileDefinition(trimmed, {
|
|
5572
5578
|
name: trimmed,
|
|
5579
|
+
model: profileModel ?? undefined,
|
|
5573
5580
|
resources: {},
|
|
5574
5581
|
}, "directory");
|
|
5575
5582
|
await this.applyProfile(trimmed);
|
|
@@ -5944,10 +5951,37 @@ export class InteractiveMode {
|
|
|
5944
5951
|
this.showError(`Profile/situation "${trimmed}" already exists`);
|
|
5945
5952
|
return this.createProfileFlow();
|
|
5946
5953
|
}
|
|
5954
|
+
const profileModel = await this.selectProfileModelForCreate();
|
|
5955
|
+
if (profileModel === undefined) {
|
|
5956
|
+
this.ui.requestRender();
|
|
5957
|
+
return;
|
|
5958
|
+
}
|
|
5947
5959
|
// Open the resource editor on the NEW profile
|
|
5948
|
-
void this.openNewProfileEditor(trimmed);
|
|
5960
|
+
void this.openNewProfileEditor(trimmed, profileModel ?? undefined);
|
|
5961
|
+
}
|
|
5962
|
+
async selectProfileModelForCreate() {
|
|
5963
|
+
const modelOptions = [
|
|
5964
|
+
{
|
|
5965
|
+
value: "(none)",
|
|
5966
|
+
label: "(none)",
|
|
5967
|
+
description: "Do not pin a foreground profile model; use the session/default model",
|
|
5968
|
+
},
|
|
5969
|
+
...this.getAutoLearnModelOptions(),
|
|
5970
|
+
];
|
|
5971
|
+
return await new Promise((resolve) => {
|
|
5972
|
+
this.showSelector((done) => {
|
|
5973
|
+
const selector = new SelectSubmenu("Profile Model", "Pick the foreground model for this profile from authenticated/configured providers.", modelOptions, "(none)", (value) => {
|
|
5974
|
+
done();
|
|
5975
|
+
resolve(value === "(none)" ? null : value);
|
|
5976
|
+
}, () => {
|
|
5977
|
+
done();
|
|
5978
|
+
resolve(undefined);
|
|
5979
|
+
});
|
|
5980
|
+
return { component: selector, focus: selector.getSelectList() };
|
|
5981
|
+
});
|
|
5982
|
+
});
|
|
5949
5983
|
}
|
|
5950
|
-
async openNewProfileEditor(profileName) {
|
|
5984
|
+
async openNewProfileEditor(profileName, profileModel) {
|
|
5951
5985
|
const scope = "reusable-file";
|
|
5952
5986
|
const kinds = await this.getProfileResourceKinds();
|
|
5953
5987
|
this.showSelector((done) => {
|
|
@@ -5964,6 +5998,7 @@ export class InteractiveMode {
|
|
|
5964
5998
|
try {
|
|
5965
5999
|
this.settingsManager.setProfileDefinition(profileName, {
|
|
5966
6000
|
name: profileName,
|
|
6001
|
+
model: profileModel,
|
|
5967
6002
|
resources,
|
|
5968
6003
|
}, scope);
|
|
5969
6004
|
this.showStatus(`Saved profile "${profileName}" to ${scope}.`);
|
|
@@ -5982,17 +6017,17 @@ export class InteractiveMode {
|
|
|
5982
6017
|
const resolvedEditPath = resolveResourceEditPath(id, pathValue, kind);
|
|
5983
6018
|
if (!resolvedEditPath) {
|
|
5984
6019
|
this.showWarning(`Resource "${id}" of kind "${kind}" has no editable file path.`);
|
|
5985
|
-
void this.openNewProfileEditor(profileName);
|
|
6020
|
+
void this.openNewProfileEditor(profileName, profileModel);
|
|
5986
6021
|
return;
|
|
5987
6022
|
}
|
|
5988
6023
|
if (!fs.existsSync(resolvedEditPath)) {
|
|
5989
6024
|
this.showError(`Resolved path for "${id}" does not exist: ${resolvedEditPath}`);
|
|
5990
|
-
void this.openNewProfileEditor(profileName);
|
|
6025
|
+
void this.openNewProfileEditor(profileName, profileModel);
|
|
5991
6026
|
return;
|
|
5992
6027
|
}
|
|
5993
6028
|
await this.openEditorForPath(resolvedEditPath);
|
|
5994
6029
|
await this.handleReloadCommand();
|
|
5995
|
-
void this.openNewProfileEditor(profileName);
|
|
6030
|
+
void this.openNewProfileEditor(profileName, profileModel);
|
|
5996
6031
|
},
|
|
5997
6032
|
});
|
|
5998
6033
|
return { component: editor, focus: editor };
|