Say why a leading < marks Claude Code's entry and why a trust failure only warns
This commit was merged in pull request #137.
This commit is contained in:
@@ -36,6 +36,7 @@ def written_by_human(entry):
|
||||
# {"type": "user", "message": {"content": "<command-name>/model</command-name>\n..."}}
|
||||
# {"type": "user", "promptSource": "system", "message": {"content": "<task-notification>..."}}
|
||||
# {"type": "user", "promptSource": "typed", "message": {"content": "merge it"}}
|
||||
# Claude Code tags what it injects, and an entry without promptSource carries no other mark, so a leading < is its own.
|
||||
if isinstance(text := content(entry), str):
|
||||
source = entry.get("promptSource")
|
||||
return source != "system" and (source == "typed" or not text.startswith("<"))
|
||||
|
||||
@@ -6,6 +6,7 @@ from loop_claude.file_writes import replace_json
|
||||
from loop_claude.outcome import Failure
|
||||
|
||||
|
||||
# A failure only warns: the interrupt still runs, and the human answers Claude Code's trust dialog.
|
||||
def trust(config, roots):
|
||||
try:
|
||||
with open(config, encoding="utf-8") as handle:
|
||||
|
||||
Reference in New Issue
Block a user