mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-09-05 16:03:47 +00:00
Conflicts: WorkspaceItemDrillPicker, RawAppEditorHeader, copilot/global/core. Main rewrote the global chat draft layer to live entirely on `UserDraft` (see #9291 — `globalDraftStore` deleted, replaced by `userDraftAdapter` which surfaces drafts as `WorkspaceItem`s for the chat). The session runtime and the three session editor views were the only remaining consumers of `globalDraftStore`, so this merge folds them onto the same single-source-of-truth. Session ↔ chat plumbing (the user's stated requirement): - `FlowEditorView`, `ScriptEditorView`, `RawAppEditorView` register themselves as the live editor for `(workspace, itemKind)` via `UserDraft.setLiveEditorDraft({...})` on mount and clear on unmount — same registration the `/scripts/edit`, `/flows/edit`, `/apps_raw/edit` route pages now do. The session's chat sees the open path through the `isLiveDraft` hint and can target it with `discord_local_draft` or `read_workspace_item`. - Bidirectional editor ↔ chat sync now goes through `UserDraft.get/save` directly. The session's `workspace_id` (a fork) is passed as `opts.workspace` so reads/writes target the fork's UserDraft scope — the session's chat operates in the same scope, so they share content without an extra bridge. - The slim `FlowDraftValue`/`AppDraftValue` shapes the old store kept are gone; `UserDraft<Flow>` and `UserDraft<RawAppDraft>` store the full editor types (matching how the chat tools write them in `core.ts`). `flowDraftCodec` deleted; `appDraftCodec` renamed `applyDraftValueToRawApp` → `applyDraftToRuntimeRawApp` to reflect that the draft type *is* the editor shape now. - `WorkspaceItemDrillPicker.aiDraftsForKind` reads via `listGlobalDrafts(workspace)` (the new userDraftAdapter export) instead of `globalDraftStore.listDrafts`. The session retry-loop fixes, the not-found EditorHeader, and the drill-picker $effect→callback refactor from earlier on this branch all ride along unchanged.
Windmill frontend
The Windmill frontend written in Svelte 5 + Tailwind CSS
The frontend is under AGPL, see the LICENSE file at the root of this repo