Files
ai-agent/frontend/package.json
Gabriel Vidal b364217eb7 feat(composer): guideline DAG — shortcuts that reveal their children
The prompt shaping RichInput used to do now lives here, where it belongs, and
gets a graph while it moves. PromptShortcut grows a children[] adjacency list:
a shortcut listed as someone's child only appears — and only contributes its
line — while that parent is on, so 'Open PR' can hang off 'Commit & push' and
a smoke-test note off 'Deploy'. It is a DAG, not a tree: several parents may
reach the same child (drawn once, under the first that reveals it), and the
traversal carries a visited set so a hand-made cycle terminates.

lib/guidelineDag owns it: visibleGuidelines() derives the chips (with depth)
from the graph plus the live selection, guidelineLines() turns that selection
into prompt lines — including the guidelineOff branch for a visible-but-off
either/or — and defaultGuidelineIds() seeds the default-on cascade so the
composer's first paint shows what it would send. richComposer maps the result
onto the now-generic RichTag and rebuilds the prompt in richComposePrompt.

Settings gains the nesting: a child card is indented under its parent, a
collapsed card says what reveals it and what it reveals, and a 'Nested under'
chip row edits the edges (descendants excluded, so the graph stays acyclic).
Deleting a shortcut also cuts the edges pointing at it, and a v1 store
migration re-seeds the shipped links onto built-ins persisted before the DAG.

Needs @gabvdl/ui 0.31.0.
2026-08-09 17:50:22 +02:00

50 lines
1.3 KiB
JSON

{
"name": "ai-agent",
"private": true,
"version": "0.1.0",
"type": "module",
"scripts": {
"dev": "vite",
"dev:mock": "VITE_MOCK=1 vite",
"build": "vite build",
"build:mock": "VITE_MOCK=1 vite build",
"gen:api": "orval --config orval.config.cjs",
"preview": "vite preview"
},
"dependencies": {
"@gabvdl/ui": "^0.31.0",
"@tanstack/query-async-storage-persister": "^5.101.2",
"@tanstack/react-query": "^5.101.2",
"@tanstack/react-query-persist-client": "^5.101.2",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"fuse.js": "^7.0.0",
"idb-keyval": "^6.3.0",
"js-yaml": "^4.1.0",
"lucide-react": "^0.469.0",
"prism-react-renderer": "^2.4.1",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-markdown": "^9.0.1",
"react-router-dom": "^6.28.1",
"react-swipeable": "^7.0.2",
"remark-gfm": "^4.0.0",
"tailwind-merge": "^2.6.0",
"zustand": "^5.0.2"
},
"devDependencies": {
"@types/js-yaml": "^4.0.9",
"@types/react": "^18.3.18",
"@types/react-dom": "^18.3.5",
"@vitejs/plugin-react": "^4.3.4",
"autoprefixer": "^10.4.20",
"orval": "^8.20.0",
"postcss": "^8.4.49",
"tailwindcss": "^3.4.17",
"tailwindcss-animate": "^1.0.7",
"typescript": "^5.7.2",
"vite": "^6.0.7",
"vite-plugin-pwa": "^0.21.1"
}
}