Fork assistant turns into new drafts (#1788)
* feat(chat): fork assistant turns into new drafts Builds chat-history attachments on the daemon and routes them into draft composers so users can continue an assistant turn in an existing workspace tab or New Workspace. * fix(chat): clean up fork draft handling * fix(chat): address fork draft review feedback * fix(server): build fork context from bounded timeline * fix(app): restore assistant turn footer in streams * fix(app): preserve fork draft setup * fix(app): tighten assistant fork footers * fix(app): lock active fork draft handoff * fix(app): preserve attachment-only draft retries * fix(app): unify composer attachment scopes * fix(app): align chat history attachment labels * fix(app): centralize attachment pill content * fix(app): trim fork context for workspace naming
This commit is contained in:
@@ -238,6 +238,16 @@ describe("global routes", () => {
|
||||
}),
|
||||
).toBe("/new?serverId=local&dir=%2Frepo%2Fproject&name=Project&projectId=project-1");
|
||||
});
|
||||
|
||||
it("buildNewWorkspaceRoute carries a draft context id", () => {
|
||||
expect(
|
||||
buildNewWorkspaceRoute({
|
||||
serverId: "local",
|
||||
sourceDirectory: "/repo/project",
|
||||
draftId: "draft-1",
|
||||
}),
|
||||
).toBe("/new?serverId=local&dir=%2Frepo%2Fproject&draftId=draft-1");
|
||||
});
|
||||
});
|
||||
|
||||
describe("host settings section slugs", () => {
|
||||
|
||||
@@ -424,6 +424,7 @@ interface NewWorkspaceRouteOptions {
|
||||
sourceDirectory?: string;
|
||||
displayName?: string;
|
||||
projectId?: string;
|
||||
draftId?: string;
|
||||
}
|
||||
|
||||
function buildNewWorkspaceSearch(options: NewWorkspaceRouteOptions): string {
|
||||
@@ -441,6 +442,9 @@ function buildNewWorkspaceSearch(options: NewWorkspaceRouteOptions): string {
|
||||
if (options.projectId) {
|
||||
params.set("projectId", options.projectId);
|
||||
}
|
||||
if (options.draftId) {
|
||||
params.set("draftId", options.draftId);
|
||||
}
|
||||
return params.toString();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user