fix(ui): the open workflow is in the URL, so chat knows which one you mean
This commit is contained in:
2 files changed
+10
-1
No files matched your search
@@ -663,7 +663,9 @@ export const pageTag = computed(() => {
|
||||
const label =
|
||||
route.name === "task-detail"
|
||||
? `Task #${route.params.id}`
|
||||
: typeof route.meta.label === "string"
|
||||
: route.name === "workflows" && typeof route.query.workflow === "string"
|
||||
? `Workflow ${route.query.workflow}`
|
||||
: typeof route.meta.label === "string"
|
||||
? route.meta.label
|
||||
: page;
|
||||
return { page, label };
|
||||
|
||||
@@ -110,6 +110,13 @@ watch(
|
||||
},
|
||||
{ immediate: true },
|
||||
);
|
||||
// The selection goes back into ?workflow= so the URL names it: a reload keeps
|
||||
// it, and the chat's page context tells Archie which workflow is open.
|
||||
watch(selected, (id) => {
|
||||
if (!id || route.query.workflow === id) return;
|
||||
applied = id;
|
||||
void router.replace({ query: { ...route.query, workflow: id } });
|
||||
});
|
||||
// Whether this workflow is still the one archie ships: "Edited" when it has
|
||||
// been changed, "Custom" when archie ships nothing by that name.
|
||||
const provenance = computed(() => {
|
||||
|
||||
Reference in new issue
Block a user