-
Notifications
You must be signed in to change notification settings - Fork 7.2k
feat: fork conversation/thread #8866
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b19cc16f33
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
b19cc16 to
3bded88
Compare
40d306d to
9ada6f1
Compare
jif-oai
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would definitely drop v1
Could you also pipe this in the CLI?
|
|
||
| #[derive(Serialize, Deserialize, Debug, Clone, JsonSchema, TS)] | ||
| #[serde(rename_all = "camelCase")] | ||
| pub struct ForkConversationResponse { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think it is necessary to add it to v1 tbh
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agreed, we plan to delete v1 as soon as cloud is migrated to v2
|
|
||
| /// [UNSTABLE] Specify the rollout path to fork from. | ||
| /// If specified, the thread_id param will be ignored. | ||
| pub path: Option<PathBuf>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be cleaner to have something like:
pub thread_reference: ThreadReference
...
enum ThreadReference {
ThreadId(String),
ThreadPath(PathBuf)
}
Then you can just make the thread_reference as untagged and you should have something clean
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did it this way originally for thread/resume because I wanted to be able to deprecate the path option and have the client work solely using IDs
| } | ||
| } | ||
|
|
||
| async fn handle_fork_conversation( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 to drop v1. It does not make sense to duplicate all this code
owenlin0
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
approving for v2 api changes. thanks for updating the readme too!
we still using v1 in web, until we drop it from web, I would like to keep them on par.
will follow up in separate review with tui changes |
Summary
thread/forkusage