Drop colour from the panel, and the message that said nothing
Two changes that turned out to be related. The chips painted their own red, amber and green. An indicator that picks its own colours competes with the shell's accents and stops following the theme, so the panel now draws everything in the panel's text colour and lets shape carry the state. Only alpha still varies, to push idle sessions back. That put real weight on the four shapes being distinguishable at 14 px, which is not something to guess at, so the drawing moved to lib/glyph.js -- free of St, Clutter and shell imports precisely so the glyphs can be rendered to a file and looked at. They were, and the first attempt was wrong twice: a disc filled to the ring's centreline reads smaller than the ring beside it, and the inner disc of "blocked" was too small to tell from a plain "working" ring. Radii are now matched at the outer edge and the inner disc sits at 0.55, both settled by comparing renders. Separately, hooking a live session showed the Notification that accompanies a permission prompt carries only "Claude needs your permission" -- no tool, no command -- and arrives identically when the session is putting a question to the user rather than asking to run something. The menu was giving that string the line, pushing out the tab and the path: strictly less information in more space. It is gone, and the comment claiming it "says what is about to run" is corrected. Recovering the real command means reading the tail of the transcript when the prompt fires; it is not in the event. The same finding settles how far the states can split. "Blocked" cannot be divided into "asking permission" and "asking a question" from this data.
This commit is contained in:
@@ -35,6 +35,10 @@ STATE_DIR = os.path.join(
|
||||
# Notification covers several unrelated things; only some mean "the session
|
||||
# stopped and is asking me something". auth_success / elicitation_complete /
|
||||
# elicitation_response are progress chatter and must not touch the state.
|
||||
# Observed: a question put to the user (AskUserQuestion) arrives as
|
||||
# "permission_prompt" too, with the same generic message as a tool asking to
|
||||
# run. The two are therefore not separable here, which is why the panel has one
|
||||
# "blocked" state rather than telling a permission from a question.
|
||||
NOTIFICATION_STATES = {
|
||||
"permission_prompt": "blocked",
|
||||
"agent_needs_input": "blocked",
|
||||
@@ -63,7 +67,8 @@ def debug_log(event):
|
||||
return
|
||||
try:
|
||||
with open(marker, "a") as fh:
|
||||
fh.write(json.dumps(event, sort_keys=True)[:2000] + "\n")
|
||||
stamped = dict(event, _at=time.strftime("%H:%M:%S"))
|
||||
fh.write(json.dumps(stamped, sort_keys=True)[:2000] + "\n")
|
||||
except OSError:
|
||||
pass
|
||||
|
||||
|
||||
Reference in New Issue
Block a user