@caupulican/pi-adaptative 0.81.21 → 0.81.22
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 +7 -0
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +4 -4
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/model-router/intent-classifier.d.ts.map +1 -1
- package/dist/core/model-router/intent-classifier.js +1 -1
- package/dist/core/model-router/intent-classifier.js.map +1 -1
- package/dist/core/model-router/route-judge.d.ts.map +1 -1
- package/dist/core/model-router/route-judge.js +10 -6
- package/dist/core/model-router/route-judge.js.map +1 -1
- package/dist/core/model-router/tool-escalation.d.ts.map +1 -1
- package/dist/core/model-router/tool-escalation.js +2 -1
- package/dist/core/model-router/tool-escalation.js.map +1 -1
- package/dist/core/model-router-controller.d.ts.map +1 -1
- package/dist/core/model-router-controller.js +27 -2
- package/dist/core/model-router-controller.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +3 -0
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +25 -1
- 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
|
@@ -1864,6 +1864,29 @@ export class InteractiveMode {
|
|
|
1864
1864
|
getUserMessageText(message) {
|
|
1865
1865
|
return historyReloadMath.getUserMessageText(message);
|
|
1866
1866
|
}
|
|
1867
|
+
setEditorInputHistory(history) {
|
|
1868
|
+
if (this.editor.setHistory) {
|
|
1869
|
+
this.editor.setHistory(history);
|
|
1870
|
+
return;
|
|
1871
|
+
}
|
|
1872
|
+
for (const text of history) {
|
|
1873
|
+
this.editor.addToHistory?.(text);
|
|
1874
|
+
}
|
|
1875
|
+
}
|
|
1876
|
+
populateEditorInputHistoryFromMessages(messages) {
|
|
1877
|
+
const history = messages
|
|
1878
|
+
.filter((message) => message.role === "user")
|
|
1879
|
+
.map((message) => this.getUserMessageText(message).trim())
|
|
1880
|
+
.filter((text) => text.length > 0)
|
|
1881
|
+
.slice(-100);
|
|
1882
|
+
this.setEditorInputHistory(history);
|
|
1883
|
+
}
|
|
1884
|
+
populateEditorInputHistoryFromSession() {
|
|
1885
|
+
const sessionManager = this.sessionManager;
|
|
1886
|
+
const history = sessionManager.getRecentUserInputHistory?.(100);
|
|
1887
|
+
if (history)
|
|
1888
|
+
this.setEditorInputHistory(history);
|
|
1889
|
+
}
|
|
1867
1890
|
resetLiveTuiHistoryTrim() {
|
|
1868
1891
|
this.liveHistoryHiddenNotice = undefined;
|
|
1869
1892
|
this.liveHistoryHiddenComponents = 0;
|
|
@@ -2227,6 +2250,7 @@ export class InteractiveMode {
|
|
|
2227
2250
|
}
|
|
2228
2251
|
async renderInitialMessages(options = {}) {
|
|
2229
2252
|
if (!options.forceHistoryLoad) {
|
|
2253
|
+
this.populateEditorInputHistoryFromSession();
|
|
2230
2254
|
this.tuiHistoryLoaded = false;
|
|
2231
2255
|
this.showDeferredHistoryPlaceholder({ requestRender: true });
|
|
2232
2256
|
this.footer.invalidate();
|
|
@@ -2236,9 +2260,9 @@ export class InteractiveMode {
|
|
|
2236
2260
|
// Get aligned messages and entries from session context only when the user
|
|
2237
2261
|
// explicitly requests TUI history. The model/session state is already loaded.
|
|
2238
2262
|
const context = this.sessionManager.buildSessionContext();
|
|
2263
|
+
this.populateEditorInputHistoryFromMessages(context.messages);
|
|
2239
2264
|
await this.renderSessionContext(context, {
|
|
2240
2265
|
updateFooter: true,
|
|
2241
|
-
populateHistory: true,
|
|
2242
2266
|
});
|
|
2243
2267
|
this.tuiHistoryLoaded = true;
|
|
2244
2268
|
// Show compaction info if session was compacted
|