-
Notifications
You must be signed in to change notification settings - Fork 3
Add structured freeform context payload + ExecutingTask/ready recovery #51
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
Open
m-nash
wants to merge
20
commits into
main
Choose a base branch
from
feature/freeform-context-payload
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
6b68529
Add structured freeform context payload + ExecutingTask/ready recovery
m-nash a765a5d
Distinguish sampling-classified custom instruction from sampling-unav…
m-nash b8bef58
Attach comment context for waiting-for-reply elicitations too
m-nash 126fed6
Don't leak synthetic 'ready_unresolved' event name into user prompt
m-nash 0cd0b53
Add 'Treat as comment replied' option to comment-flow recovery prompt
m-nash 6bb39be
Don't assume comment_addressed for ambiguous push-detected recovery
m-nash 5a8a976
Preserve waiting-comment context in ExecutingTask recovery prompt
m-nash 97d597e
Handle 'skip' in all comment-flow sub-states in recovery prompt
m-nash 42aad23
Fix InvalidOperationException leak in ClassifyFreeformAsync (PR #51 r…
m-nash 51fd161
Route freeform Path B in waiting-comment context (PR #51 review)
m-nash decce7b
Extend (ready) recovery to ApplyingFix state (PR #51 review)
m-nash ba7a0c6
Preserve recovery snapshot in EmitComposeReplyAction (PR #51 review)
m-nash baaa2a9
Fix duplicate <summary> tag in TryClassifyFreeformViaSamplingAsync (P…
m-nash 9649219
Hoist "stop" choice above per-flow routing (PR #51 review)
m-nash 3240197
Make treat_as_replied_externally flow-aware (PR #51 review)
m-nash 021e99a
Guard ProcessTaskComplete against waiting-thread stale indexing (PR #…
m-nash cede694
Add misattributes and rerequest to cspell dictionary
m-nash 10991be
Rename 'Treat as comment replied' to 'Treat as replied externally' (P…
m-nash 4de9393
Distinguish HEAD-refresh failure from no-push in recover_from_ready (…
m-nash 9274c74
Use actual state in BuildRecoverFromReadyAction debug log (PR #51 rev…
m-nash 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
Some comments aren't visible on the classic Files Changed page.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| // Licensed under the MIT License. | ||
|
|
||
| using System.Text.Json.Serialization; | ||
|
|
||
| namespace PrCopilot.Tools; | ||
|
|
||
| /// <summary> | ||
| /// CI failure context, attached to <see cref="FreeformInterpretContext"/> when the | ||
| /// user is replying about a failed CI check. | ||
| /// </summary> | ||
| internal sealed class CiFailureContext | ||
| { | ||
| [JsonPropertyName("failedChecks")] | ||
| public List<FailedCheckContext> FailedChecks { get; set; } = []; | ||
| } |
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 |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| // Licensed under the MIT License. | ||
|
|
||
| using System.Text.Json.Serialization; | ||
|
|
||
| namespace PrCopilot.Tools; | ||
|
|
||
| /// <summary> | ||
| /// The active comment thread context, attached to <see cref="FreeformInterpretContext"/> | ||
| /// when the user is replying about a code review comment. | ||
| /// </summary> | ||
| internal sealed class CommentContext | ||
| { | ||
| [JsonPropertyName("author")] | ||
| public string Author { get; set; } = ""; | ||
|
|
||
| [JsonPropertyName("filePath")] | ||
| public string FilePath { get; set; } = ""; | ||
|
|
||
| [JsonPropertyName("line")] | ||
| [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] | ||
| public int? Line { get; set; } | ||
|
|
||
| [JsonPropertyName("body")] | ||
| public string Body { get; set; } = ""; | ||
|
|
||
| [JsonPropertyName("url")] | ||
| public string Url { get; set; } = ""; | ||
| } |
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 |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| // Licensed under the MIT License. | ||
|
|
||
| using System.Text.Json.Serialization; | ||
|
|
||
| namespace PrCopilot.Tools; | ||
|
|
||
| /// <summary> | ||
| /// A single choice from an elicitation prompt. <see cref="Display"/> is what the | ||
| /// user saw; <see cref="Value"/> is the internal mapped value the agent should | ||
| /// pass back as <c>choice</c> for a Path A clean choice match. | ||
| /// </summary> | ||
| internal sealed class ElicitationChoiceContext | ||
| { | ||
| /// <summary>Human-readable choice label as shown to the user.</summary> | ||
| [JsonPropertyName("display")] | ||
| public string Display { get; set; } = ""; | ||
|
|
||
| /// <summary>Internal mapped value (what would be passed back as <c>choice</c>).</summary> | ||
| [JsonPropertyName("value")] | ||
| public string Value { get; set; } = ""; | ||
| } |
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 |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| // Licensed under the MIT License. | ||
|
|
||
| using System.Text.Json.Serialization; | ||
|
|
||
| namespace PrCopilot.Tools; | ||
|
|
||
| /// <summary> | ||
| /// The elicitation prompt that was shown to the user, captured for the | ||
| /// <see cref="FreeformInterpretContext"/> payload so the agent knows what | ||
| /// question the user was responding to. | ||
| /// </summary> | ||
| internal sealed class ElicitationContext | ||
| { | ||
| [JsonPropertyName("question")] | ||
| public string Question { get; set; } = ""; | ||
|
|
||
| [JsonPropertyName("choices")] | ||
| public List<ElicitationChoiceContext> Choices { get; set; } = []; | ||
| } |
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 |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| // Licensed under the MIT License. | ||
|
|
||
| using System.Text.Json.Serialization; | ||
|
|
||
| namespace PrCopilot.Tools; | ||
|
|
||
| /// <summary> | ||
| /// A single failed CI check entry in <see cref="CiFailureContext.FailedChecks"/>. | ||
| /// </summary> | ||
| internal sealed class FailedCheckContext | ||
| { | ||
| [JsonPropertyName("name")] | ||
| public string Name { get; set; } = ""; | ||
|
|
||
| [JsonPropertyName("conclusion")] | ||
| public string Conclusion { get; set; } = ""; | ||
|
|
||
| [JsonPropertyName("url")] | ||
| public string Url { get; set; } = ""; | ||
| } |
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.