Repository navigation
feat(nudge): persist nudge injections as display-only session entries (closes #326) - #514
Closed
liu-zhengdong wants to merge 1 commit into
Closed
liu-zhengdong wants to merge 1 commit into
liu-zhengdong wants to merge 1 commit into
Conversation
Author
|
Re-opening with branch name matching repo convention YYYY-MM-DD_short-title |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #326. Supersedes #329 (rebased and resolved cleanly on current master v0.1.76).
Summary
When a context-limit nudge is injected, it was previously only shown transiently via
ctx.ui.notify()(if debug mode was on), and never written to the session log. Restarts or resuming sessions would wipe all injection history, and multi-line nudge logs spilled onto un-tagged physical lines inacp.log.Changes
src/index.ts):[ACP nudge] EMERGENCY 95% · T1 · top range m00120–m00168) viapi.appendEntry("acp-nudge", { text }).runtime.markNudgeRecorded()to prevent spamming the session file during repeated emergency LLM retries.@earendil-works/pi-tui(Box,Text), making records visible in TUI scrollback across process restarts.type: "custom"entries are structurally excluded from core message projection.src/log.ts):\rand\nin string fields so every log entry strictly occupies one physical line for clean grep-ability.tests/nudge-record.test.ts(format unit test, integration persistence test, entry renderer test) andtests/log.test.tssingle-line test.CHANGELOG.md,README.md, andREADME.zh-CN.md.Verification
npm run typecheck: PASSnpm test: PASS (470 tests pass)npm run build: PASS (dist built self-contained, pi-tui inlined)