agent-sh 0.12.4 → 0.12.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/context-manager.js +7 -2
- package/package.json +1 -1
package/dist/context-manager.js
CHANGED
|
@@ -124,7 +124,10 @@ export class ContextManager {
|
|
|
124
124
|
return null;
|
|
125
125
|
const lastSeq = this.exchanges[this.exchanges.length - 1].id;
|
|
126
126
|
// Outputs already carry head+tail+spillPath stubs from capture time.
|
|
127
|
-
const
|
|
127
|
+
const parts = fresh.map((ex) => this.formatExchangeTruncated(ex)).filter((s) => s.length > 0);
|
|
128
|
+
if (parts.length === 0)
|
|
129
|
+
return null;
|
|
130
|
+
const body = parts.join("\n");
|
|
128
131
|
return {
|
|
129
132
|
text: `<shell-events>\n${body}</shell-events>`,
|
|
130
133
|
lastSeq,
|
|
@@ -171,7 +174,9 @@ export class ContextManager {
|
|
|
171
174
|
return s;
|
|
172
175
|
}
|
|
173
176
|
case "agent_query":
|
|
174
|
-
|
|
177
|
+
// Suppress: query already appears as the turn's user message.
|
|
178
|
+
// Kept in `exchanges` so search() can find it by id.
|
|
179
|
+
return "";
|
|
175
180
|
}
|
|
176
181
|
}
|
|
177
182
|
formatExchangeFull(ex) {
|