Repository navigation
feat: track assistant turn changes #408
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
Merged
Merged
Changes from 2 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
34161dc
feat: track assistant turn changes
Astro-Han 69aeca8
fix: harden turn change restore safety
Astro-Han be03ff3
fix: address turn change review followups
Astro-Han 2411a4a
fix: harden turn change consistency
Astro-Han ad387e3
fix: isolate turn change finalization
Astro-Han 0e2f9ef
fix: classify turn change permission failures
Astro-Han bcff173
fix: localize turn change UI
Astro-Han 0b4e497
refactor: make turn changes an effect service
Astro-Han 5138f35
fix: rollback failed turn change state updates
Astro-Han a3ca9a0
fix: redact external turn change display paths
Astro-Han 5dbcc97
fix: classify sensitive paths relative to workspace
Astro-Han d66c2db
fix: block truncated turn restore
Astro-Han e0ae6ce
fix: harden external turn change display
Astro-Han 879d676
fix: keep truncated changes unavailable
Astro-Han eda4810
fix: preserve sensitive patch status
Astro-Han 661db91
fix: show truncated turn changes
Astro-Han 4c69108
fix: guard turn change actions
Astro-Han 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
28 changes: 28 additions & 0 deletions
28
packages/opencode/migration/20260503120000_turn_changes/migration.sql
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 @@ | ||
| CREATE TABLE `turn_change_display` ( | ||
| `session_id` text NOT NULL, | ||
| `message_id` text NOT NULL, | ||
| `data` text NOT NULL, | ||
| `state` text NOT NULL, | ||
| `time_created` integer NOT NULL, | ||
| `time_updated` integer NOT NULL, | ||
| CONSTRAINT `fk_turn_change_display_session_id_session_id_fk` FOREIGN KEY (`session_id`) REFERENCES `session`(`id`) ON DELETE CASCADE, | ||
| CONSTRAINT `fk_turn_change_display_message_id_message_id_fk` FOREIGN KEY (`message_id`) REFERENCES `message`(`id`) ON DELETE CASCADE | ||
| ); | ||
| --> statement-breakpoint | ||
| CREATE UNIQUE INDEX `turn_change_display_session_id_message_id_idx` ON `turn_change_display` (`session_id`,`message_id`);--> statement-breakpoint | ||
| CREATE INDEX `turn_change_display_session_id_idx` ON `turn_change_display` (`session_id`);--> statement-breakpoint | ||
| CREATE TABLE `turn_change_restore` ( | ||
| `session_id` text NOT NULL, | ||
| `message_id` text NOT NULL, | ||
| `file_path` text NOT NULL, | ||
| `position` integer NOT NULL, | ||
| `data` text NOT NULL, | ||
| `finalized` integer DEFAULT false NOT NULL, | ||
| `time_created` integer NOT NULL, | ||
| `time_updated` integer NOT NULL, | ||
| CONSTRAINT `fk_turn_change_restore_session_id_session_id_fk` FOREIGN KEY (`session_id`) REFERENCES `session`(`id`) ON DELETE CASCADE, | ||
| CONSTRAINT `fk_turn_change_restore_message_id_message_id_fk` FOREIGN KEY (`message_id`) REFERENCES `message`(`id`) ON DELETE CASCADE | ||
| ); | ||
| --> statement-breakpoint | ||
| CREATE UNIQUE INDEX `turn_change_restore_session_id_message_id_file_path_idx` ON `turn_change_restore` (`session_id`,`message_id`,`file_path`);--> statement-breakpoint | ||
| CREATE INDEX `turn_change_restore_session_id_message_id_idx` ON `turn_change_restore` (`session_id`,`message_id`); |
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
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.