jaitus 0.3.9 → 0.3.10
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/package.json +1 -1
- package/src/index.js +7 -2
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -1181,7 +1181,8 @@ async function session({ flags }) {
|
|
|
1181
1181
|
ledger.note('compacted', `The conversation was automatically summarised to free context: ${dropped} messages became one summary. Detail you are not shown above is genuinely gone — ask or re-read rather than assuming.`);
|
|
1182
1182
|
} catch (error) {
|
|
1183
1183
|
// Not fatal: the turn can still run, it just runs closer to the ceiling.
|
|
1184
|
-
|
|
1184
|
+
const id = isJaitusError(error) && error.requestId ? ` (request id ${error.requestId})` : '';
|
|
1185
|
+
tui.notice?.(`Auto-compaction failed (${error.message}${id}) — continuing without it. /compact retries.`, 'warn');
|
|
1185
1186
|
ledger.note('compact-failed', `Automatic context compaction failed (${error.message}); the conversation is close to the context limit.`);
|
|
1186
1187
|
} finally {
|
|
1187
1188
|
tui.clearStatus?.();
|
|
@@ -1830,7 +1831,11 @@ async function slashCommand(verb, args, ctx) {
|
|
|
1830
1831
|
ok('Conversation compacted. Context freed.');
|
|
1831
1832
|
try { ctx.resetContext?.(); } catch { /* header keeps last value */ }
|
|
1832
1833
|
} catch (e) {
|
|
1833
|
-
|
|
1834
|
+
// The request id is the only thing that ties this failure to a backend log
|
|
1835
|
+
// line. fail() takes a string, so a JaitusError passed bare would shed it —
|
|
1836
|
+
// and "where do I get the request id" is exactly what that produces.
|
|
1837
|
+
const id = isJaitusError(e) && e.requestId ? ` (request id ${e.requestId})` : '';
|
|
1838
|
+
fail(`Compact failed: ${e.message}${id}`);
|
|
1834
1839
|
} finally {
|
|
1835
1840
|
spin.stop();
|
|
1836
1841
|
}
|