@caupulican/pi-adaptative 0.80.91 → 0.80.94
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 +29 -0
- package/dist/core/agent-session.d.ts +18 -0
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +134 -36
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/compaction/compaction.d.ts +2 -2
- package/dist/core/compaction/compaction.d.ts.map +1 -1
- package/dist/core/compaction/compaction.js +15 -5
- package/dist/core/compaction/compaction.js.map +1 -1
- package/dist/core/context/brain-curator.d.ts +21 -0
- package/dist/core/context/brain-curator.d.ts.map +1 -1
- package/dist/core/context/brain-curator.js +66 -0
- package/dist/core/context/brain-curator.js.map +1 -1
- package/dist/core/settings-manager.d.ts +8 -0
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +25 -0
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +17 -10
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- 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
|
@@ -5844,6 +5844,18 @@ export class InteractiveMode {
|
|
|
5844
5844
|
const loader = this.session.resourceLoader;
|
|
5845
5845
|
const base = (p) => p.split(/[\\/]/).pop() ?? p;
|
|
5846
5846
|
const allDiscoverableExtensions = await loader.getDiscoverableExtensionPaths();
|
|
5847
|
+
// Defined BEFORE the skills/prompts arrays below that call it (const = TDZ: defining it
|
|
5848
|
+
// later crashes the whole app with a ReferenceError when the library editor opens).
|
|
5849
|
+
const getFrontmatterDescription = (filePath) => {
|
|
5850
|
+
try {
|
|
5851
|
+
const content = fs.readFileSync(filePath, "utf-8");
|
|
5852
|
+
const { frontmatter } = parseFrontmatter(content);
|
|
5853
|
+
if (typeof frontmatter.description === "string")
|
|
5854
|
+
return frontmatter.description;
|
|
5855
|
+
}
|
|
5856
|
+
catch { }
|
|
5857
|
+
return undefined;
|
|
5858
|
+
};
|
|
5847
5859
|
// The editor's universe must be profile-INDEPENDENT (discovery, not loading): the loaded
|
|
5848
5860
|
// getters are narrowed by the active profile, so building the lists from them makes
|
|
5849
5861
|
// currently-blocked skills/prompts/context files ungrantable — including expanding the
|
|
@@ -5895,16 +5907,6 @@ export class InteractiveMode {
|
|
|
5895
5907
|
.filter((agentPath) => !loadedAgentPaths.has(agentPath))
|
|
5896
5908
|
.map((agentPath) => ({ path: agentPath })),
|
|
5897
5909
|
];
|
|
5898
|
-
const getFrontmatterDescription = (filePath) => {
|
|
5899
|
-
try {
|
|
5900
|
-
const content = fs.readFileSync(filePath, "utf-8");
|
|
5901
|
-
const { frontmatter } = parseFrontmatter(content);
|
|
5902
|
-
if (typeof frontmatter.description === "string")
|
|
5903
|
-
return frontmatter.description;
|
|
5904
|
-
}
|
|
5905
|
-
catch { }
|
|
5906
|
-
return undefined;
|
|
5907
|
-
};
|
|
5908
5910
|
const getAgentDescription = (filePath) => {
|
|
5909
5911
|
try {
|
|
5910
5912
|
const content = fs.readFileSync(filePath, "utf-8");
|
|
@@ -6106,6 +6108,8 @@ export class InteractiveMode {
|
|
|
6106
6108
|
if (normalizedName.length === 0 || normalizedLower === "none" || normalizedLower === "(none)") {
|
|
6107
6109
|
try {
|
|
6108
6110
|
this.settingsManager.setRuntimeResourceProfiles([]);
|
|
6111
|
+
// Clearing must also survive restarts (otherwise the old global selection returns).
|
|
6112
|
+
this.settingsManager.setActiveProfile(undefined, "global");
|
|
6109
6113
|
this.session.sessionManager.appendCustomEntry("pi.activeResourceProfiles", {
|
|
6110
6114
|
profiles: [],
|
|
6111
6115
|
});
|
|
@@ -6153,6 +6157,9 @@ export class InteractiveMode {
|
|
|
6153
6157
|
this.session.setThinkingLevel(profile.thinking, { persistSettings: false });
|
|
6154
6158
|
}
|
|
6155
6159
|
this.settingsManager.setRuntimeResourceProfiles([profile.name]);
|
|
6160
|
+
// Selection must survive pi restarts: persist globally (like model/theme selections).
|
|
6161
|
+
// Runtime + session-entry alone made every /profile choice evaporate on exit.
|
|
6162
|
+
this.settingsManager.setActiveProfile(profile.name, "global");
|
|
6156
6163
|
this.session.sessionManager.appendCustomEntry("pi.activeResourceProfiles", {
|
|
6157
6164
|
profiles: [profile.name],
|
|
6158
6165
|
});
|