refactor(workbench): use persistent mode switch
This commit is contained in:
1 parent
c804a373ca
commit
00d5f7650f
5 files changed
+20
-41
No files matched your search
@@ -72,8 +72,7 @@ export const api = {
|
||||
acceptJunctionCandidate: (index: number) =>
|
||||
request<WorkbenchState & { added: { id: string } }>('/api/junction-clusters', json({ index })),
|
||||
|
||||
// Direct edit. Only reached when the `directEdit` flag is on; with it off the
|
||||
// workbench never touches these routes, so behaviour matches main exactly.
|
||||
// Direct-edit endpoints used by the in-page browser/edit switch.
|
||||
editState: (selection?: EditSelection) => {
|
||||
const query = selection ? `?${new URLSearchParams(selection as Record<string, string>)}` : '';
|
||||
return request<EditStateResponse | { active: false }>(`/api/edit-state${query}`);
|
||||
|
||||
Reference in new issue
Block a user