Repository navigation
Retire a terminal-answered Claude prompt by tool name and input #1601
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
3fe212b
Retire a terminal-answered Claude prompt by tool name and input (#1603)
alexeyzimarev a4fc908
Scope a settled tool's withdrawal by subagent and owed completion (#1…
alexeyzimarev fd6b7ef
Keep owed completions through a grace period after the turn ends (#1603)
alexeyzimarev e34252e
Owe the report of a prompt retired at turn end and re-arm suspension …
alexeyzimarev d6d38a2
Owe a prompt's report on every settlement but the report's own (#1603)
alexeyzimarev cc3769e
Owe nothing to an agent the daemon has withdrawn (#1603)
alexeyzimarev File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,13 @@ | ||
| using System.Text.Json; | ||
|
|
||
| namespace Capacitor.Cli.Daemon.Services; | ||
|
|
||
| /// What a hosted vendor's hook reports as finished, and so which of its pending prompts are moot: | ||
| /// one tool by its id, a subagent's whole turn, or, with neither, the main agent's own turn. The | ||
| /// session is the one the hook ran in; a prompt registered under another is not its to retire. | ||
| internal readonly record struct ToolSettledNotice(string SessionId, string? ToolUseId, string? SubagentId); | ||
| /// one tool by its id or by its name and input, a subagent's whole turn, or, with none of those, | ||
| /// the main agent's own turn. The session is the one the hook ran in; a prompt registered under | ||
| /// another is not its to retire. Claude's permission hook raises a prompt without a tool-use id, | ||
| /// which is why the name and input travel too. | ||
| internal readonly record struct ToolSettledNotice( | ||
| string SessionId, string? ToolUseId, string? SubagentId, string? ToolName = null, JsonElement? ToolInput = null) { | ||
| public bool NamesATool => ToolUseId is not null || ToolName is not null; | ||
| } |
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.