groove-dev 0.15.0 → 0.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/docs/FILE-EDITOR-PLAN.md +253 -0
- package/node_modules/@codemirror/autocomplete/.github/workflows/dispatch.yml +16 -0
- package/node_modules/@codemirror/autocomplete/CHANGELOG.md +639 -0
- package/node_modules/@codemirror/autocomplete/LICENSE +21 -0
- package/node_modules/@codemirror/autocomplete/README.md +43 -0
- package/node_modules/@codemirror/autocomplete/dist/index.cjs +2151 -0
- package/node_modules/@codemirror/autocomplete/dist/index.d.cts +648 -0
- package/node_modules/@codemirror/autocomplete/dist/index.d.ts +648 -0
- package/node_modules/@codemirror/autocomplete/dist/index.js +2120 -0
- package/node_modules/@codemirror/autocomplete/package.json +41 -0
- package/node_modules/@codemirror/commands/.github/workflows/dispatch.yml +16 -0
- package/node_modules/@codemirror/commands/CHANGELOG.md +386 -0
- package/node_modules/@codemirror/commands/LICENSE +21 -0
- package/node_modules/@codemirror/commands/README.md +35 -0
- package/node_modules/@codemirror/commands/dist/index.cjs +1909 -0
- package/node_modules/@codemirror/commands/dist/index.d.cts +650 -0
- package/node_modules/@codemirror/commands/dist/index.d.ts +650 -0
- package/node_modules/@codemirror/commands/dist/index.js +1795 -0
- package/node_modules/@codemirror/commands/package.json +42 -0
- package/node_modules/@codemirror/lang-css/.github/workflows/dispatch.yml +16 -0
- package/node_modules/@codemirror/lang-css/CHANGELOG.md +106 -0
- package/node_modules/@codemirror/lang-css/LICENSE +21 -0
- package/node_modules/@codemirror/lang-css/README.md +50 -0
- package/node_modules/@codemirror/lang-css/dist/index.cjs +269 -0
- package/node_modules/@codemirror/lang-css/dist/index.d.cts +28 -0
- package/node_modules/@codemirror/lang-css/dist/index.d.ts +28 -0
- package/node_modules/@codemirror/lang-css/dist/index.js +264 -0
- package/node_modules/@codemirror/lang-css/package.json +42 -0
- package/node_modules/@codemirror/lang-html/.github/workflows/dispatch.yml +16 -0
- package/node_modules/@codemirror/lang-html/CHANGELOG.md +210 -0
- package/node_modules/@codemirror/lang-html/LICENSE +21 -0
- package/node_modules/@codemirror/lang-html/README.md +147 -0
- package/node_modules/@codemirror/lang-html/dist/index.cjs +667 -0
- package/node_modules/@codemirror/lang-html/dist/index.d.cts +115 -0
- package/node_modules/@codemirror/lang-html/dist/index.d.ts +115 -0
- package/node_modules/@codemirror/lang-html/dist/index.js +661 -0
- package/node_modules/@codemirror/lang-html/package.json +46 -0
- package/node_modules/@codemirror/lang-javascript/.github/workflows/dispatch.yml +16 -0
- package/node_modules/@codemirror/lang-javascript/CHANGELOG.md +206 -0
- package/node_modules/@codemirror/lang-javascript/LICENSE +21 -0
- package/node_modules/@codemirror/lang-javascript/README.md +125 -0
- package/node_modules/@codemirror/lang-javascript/dist/index.cjs +526 -0
- package/node_modules/@codemirror/lang-javascript/dist/index.d.cts +93 -0
- package/node_modules/@codemirror/lang-javascript/dist/index.d.ts +93 -0
- package/node_modules/@codemirror/lang-javascript/dist/index.js +513 -0
- package/node_modules/@codemirror/lang-javascript/package.json +45 -0
- package/node_modules/@codemirror/lang-json/.github/workflows/dispatch.yml +16 -0
- package/node_modules/@codemirror/lang-json/CHANGELOG.md +59 -0
- package/node_modules/@codemirror/lang-json/LICENSE +21 -0
- package/node_modules/@codemirror/lang-json/README.md +56 -0
- package/node_modules/@codemirror/lang-json/dist/index.cjs +68 -0
- package/node_modules/@codemirror/lang-json/dist/index.d.cts +22 -0
- package/node_modules/@codemirror/lang-json/dist/index.d.ts +22 -0
- package/node_modules/@codemirror/lang-json/dist/index.js +64 -0
- package/node_modules/@codemirror/lang-json/package.json +39 -0
- package/node_modules/@codemirror/lang-markdown/.github/workflows/dispatch.yml +16 -0
- package/node_modules/@codemirror/lang-markdown/CHANGELOG.md +246 -0
- package/node_modules/@codemirror/lang-markdown/LICENSE +21 -0
- package/node_modules/@codemirror/lang-markdown/README.md +162 -0
- package/node_modules/@codemirror/lang-markdown/dist/index.cjs +501 -0
- package/node_modules/@codemirror/lang-markdown/dist/index.d.cts +124 -0
- package/node_modules/@codemirror/lang-markdown/dist/index.d.ts +124 -0
- package/node_modules/@codemirror/lang-markdown/dist/index.js +492 -0
- package/node_modules/@codemirror/lang-markdown/package.json +44 -0
- package/node_modules/@codemirror/lang-python/.github/workflows/dispatch.yml +16 -0
- package/node_modules/@codemirror/lang-python/CHANGELOG.md +174 -0
- package/node_modules/@codemirror/lang-python/LICENSE +21 -0
- package/node_modules/@codemirror/lang-python/README.md +61 -0
- package/node_modules/@codemirror/lang-python/dist/index.cjs +313 -0
- package/node_modules/@codemirror/lang-python/dist/index.d.cts +26 -0
- package/node_modules/@codemirror/lang-python/dist/index.d.ts +26 -0
- package/node_modules/@codemirror/lang-python/dist/index.js +308 -0
- package/node_modules/@codemirror/lang-python/package.json +42 -0
- package/node_modules/@codemirror/language/.github/workflows/dispatch.yml +16 -0
- package/node_modules/@codemirror/language/CHANGELOG.md +412 -0
- package/node_modules/@codemirror/language/LICENSE +21 -0
- package/node_modules/@codemirror/language/README.md +66 -0
- package/node_modules/@codemirror/language/dist/index.cjs +2742 -0
- package/node_modules/@codemirror/language/dist/index.d.cts +1220 -0
- package/node_modules/@codemirror/language/dist/index.d.ts +1220 -0
- package/node_modules/@codemirror/language/dist/index.js +2687 -0
- package/node_modules/@codemirror/language/package.json +44 -0
- package/node_modules/@codemirror/lint/.github/workflows/dispatch.yml +16 -0
- package/node_modules/@codemirror/lint/CHANGELOG.md +318 -0
- package/node_modules/@codemirror/lint/LICENSE +21 -0
- package/node_modules/@codemirror/lint/README.md +18 -0
- package/node_modules/@codemirror/lint/dist/index.cjs +958 -0
- package/node_modules/@codemirror/lint/dist/index.d.cts +195 -0
- package/node_modules/@codemirror/lint/dist/index.d.ts +195 -0
- package/node_modules/@codemirror/lint/dist/index.js +945 -0
- package/node_modules/@codemirror/lint/package.json +40 -0
- package/node_modules/@codemirror/search/.github/workflows/dispatch.yml +16 -0
- package/node_modules/@codemirror/search/CHANGELOG.md +324 -0
- package/node_modules/@codemirror/search/LICENSE +21 -0
- package/node_modules/@codemirror/search/README.md +18 -0
- package/node_modules/@codemirror/search/dist/index.cjs +1237 -0
- package/node_modules/@codemirror/search/dist/index.d.cts +385 -0
- package/node_modules/@codemirror/search/dist/index.d.ts +385 -0
- package/node_modules/@codemirror/search/dist/index.js +1217 -0
- package/node_modules/@codemirror/search/package.json +40 -0
- package/node_modules/@codemirror/state/.github/workflows/dispatch.yml +16 -0
- package/node_modules/@codemirror/state/CHANGELOG.md +308 -0
- package/node_modules/@codemirror/state/LICENSE +21 -0
- package/node_modules/@codemirror/state/README.md +18 -0
- package/node_modules/@codemirror/state/dist/index.cjs +3922 -0
- package/node_modules/@codemirror/state/dist/index.d.cts +1713 -0
- package/node_modules/@codemirror/state/dist/index.d.ts +1713 -0
- package/node_modules/@codemirror/state/dist/index.js +3892 -0
- package/node_modules/@codemirror/state/package.json +38 -0
- package/node_modules/@codemirror/theme-one-dark/.github/workflows/dispatch.yml +16 -0
- package/node_modules/@codemirror/theme-one-dark/CHANGELOG.md +97 -0
- package/node_modules/@codemirror/theme-one-dark/LICENSE +21 -0
- package/node_modules/@codemirror/theme-one-dark/README.md +46 -0
- package/node_modules/@codemirror/theme-one-dark/dist/index.cjs +139 -0
- package/node_modules/@codemirror/theme-one-dark/dist/index.d.cts +39 -0
- package/node_modules/@codemirror/theme-one-dark/dist/index.d.ts +39 -0
- package/node_modules/@codemirror/theme-one-dark/dist/index.js +134 -0
- package/node_modules/@codemirror/theme-one-dark/package.json +41 -0
- package/node_modules/@codemirror/view/.github/workflows/dispatch.yml +16 -0
- package/node_modules/@codemirror/view/CHANGELOG.md +2284 -0
- package/node_modules/@codemirror/view/LICENSE +21 -0
- package/node_modules/@codemirror/view/README.md +37 -0
- package/node_modules/@codemirror/view/dist/index.cjs +11796 -0
- package/node_modules/@codemirror/view/dist/index.d.cts +2389 -0
- package/node_modules/@codemirror/view/dist/index.d.ts +2389 -0
- package/node_modules/@codemirror/view/dist/index.js +11745 -0
- package/node_modules/@codemirror/view/package.json +41 -0
- package/node_modules/@groove-dev/daemon/src/api.js +157 -2
- package/node_modules/@groove-dev/daemon/src/filewatcher.js +59 -0
- package/node_modules/@groove-dev/daemon/src/index.js +28 -1
- package/node_modules/@groove-dev/daemon/src/skills.js +20 -0
- package/node_modules/@groove-dev/gui/dist/assets/index-Dxg9hdf3.js +103 -0
- package/node_modules/@groove-dev/gui/dist/index.html +1 -1
- package/node_modules/@groove-dev/gui/package.json +15 -2
- package/node_modules/@groove-dev/gui/src/App.jsx +3 -0
- package/node_modules/@groove-dev/gui/src/components/CodeEditor.jsx +143 -0
- package/node_modules/@groove-dev/gui/src/components/EditorTabs.jsx +83 -0
- package/node_modules/@groove-dev/gui/src/components/FileTree.jsx +193 -0
- package/node_modules/@groove-dev/gui/src/stores/groove.js +158 -1
- package/node_modules/@groove-dev/gui/src/views/FileEditor.jsx +142 -0
- package/node_modules/@groove-dev/gui/src/views/SkillsMarketplace.jsx +112 -1
- package/node_modules/@lezer/common/LICENSE +21 -0
- package/node_modules/@lezer/common/README.md +14 -0
- package/node_modules/@lezer/common/dist/index.cjs +2209 -0
- package/node_modules/@lezer/common/dist/index.d.cts +1174 -0
- package/node_modules/@lezer/common/dist/index.d.ts +1174 -0
- package/node_modules/@lezer/common/dist/index.js +2196 -0
- package/node_modules/@lezer/common/package.json +32 -0
- package/node_modules/@lezer/css/CHANGELOG.md +307 -0
- package/node_modules/@lezer/css/LICENSE +21 -0
- package/node_modules/@lezer/css/README.md +6 -0
- package/node_modules/@lezer/css/dist/index.cjs +151 -0
- package/node_modules/@lezer/css/dist/index.d.cts +3 -0
- package/node_modules/@lezer/css/dist/index.d.ts +3 -0
- package/node_modules/@lezer/css/dist/index.js +147 -0
- package/node_modules/@lezer/css/package.json +36 -0
- package/node_modules/@lezer/css/rollup.config.js +16 -0
- package/node_modules/@lezer/css/src/css.grammar +290 -0
- package/node_modules/@lezer/css/src/highlight.js +36 -0
- package/node_modules/@lezer/css/src/parser.js +31 -0
- package/node_modules/@lezer/css/src/parser.terms.js +63 -0
- package/node_modules/@lezer/css/src/tokens.js +75 -0
- package/node_modules/@lezer/css/test/declarations.txt +241 -0
- package/node_modules/@lezer/css/test/selector.txt +178 -0
- package/node_modules/@lezer/css/test/statements.txt +227 -0
- package/node_modules/@lezer/css/test/test-css.js +16 -0
- package/node_modules/@lezer/highlight/LICENSE +21 -0
- package/node_modules/@lezer/highlight/README.md +14 -0
- package/node_modules/@lezer/highlight/dist/index.cjs +936 -0
- package/node_modules/@lezer/highlight/dist/index.d.cts +623 -0
- package/node_modules/@lezer/highlight/dist/index.d.ts +623 -0
- package/node_modules/@lezer/highlight/dist/index.js +927 -0
- package/node_modules/@lezer/highlight/package.json +31 -0
- package/node_modules/@lezer/html/CHANGELOG.md +303 -0
- package/node_modules/@lezer/html/LICENSE +21 -0
- package/node_modules/@lezer/html/README.md +37 -0
- package/node_modules/@lezer/html/dist/index.cjs +354 -0
- package/node_modules/@lezer/html/dist/index.d.cts +14 -0
- package/node_modules/@lezer/html/dist/index.d.ts +14 -0
- package/node_modules/@lezer/html/dist/index.js +349 -0
- package/node_modules/@lezer/html/package.json +37 -0
- package/node_modules/@lezer/html/rollup.config.js +16 -0
- package/node_modules/@lezer/html/src/.tern-port +1 -0
- package/node_modules/@lezer/html/src/content.js +87 -0
- package/node_modules/@lezer/html/src/highlight.js +15 -0
- package/node_modules/@lezer/html/src/html.grammar +181 -0
- package/node_modules/@lezer/html/src/index.js +2 -0
- package/node_modules/@lezer/html/src/parser.js +27 -0
- package/node_modules/@lezer/html/src/parser.terms.js +53 -0
- package/node_modules/@lezer/html/src/tokens.js +199 -0
- package/node_modules/@lezer/html/test/mixed.txt +69 -0
- package/node_modules/@lezer/html/test/tags.txt +370 -0
- package/node_modules/@lezer/html/test/test-html.js +29 -0
- package/node_modules/@lezer/html/test/test-incremental.js +97 -0
- package/node_modules/@lezer/html/test/vue.txt +56 -0
- package/node_modules/@lezer/javascript/CHANGELOG.md +485 -0
- package/node_modules/@lezer/javascript/LICENSE +21 -0
- package/node_modules/@lezer/javascript/README.md +14 -0
- package/node_modules/@lezer/javascript/dist/index.cjs +196 -0
- package/node_modules/@lezer/javascript/dist/index.d.cts +3 -0
- package/node_modules/@lezer/javascript/dist/index.d.ts +3 -0
- package/node_modules/@lezer/javascript/dist/index.js +192 -0
- package/node_modules/@lezer/javascript/package.json +36 -0
- package/node_modules/@lezer/javascript/rollup.config.js +16 -0
- package/node_modules/@lezer/javascript/src/highlight.js +62 -0
- package/node_modules/@lezer/javascript/src/javascript.grammar +735 -0
- package/node_modules/@lezer/javascript/src/parser.js +33 -0
- package/node_modules/@lezer/javascript/src/parser.terms.js +177 -0
- package/node_modules/@lezer/javascript/src/tokens.js +87 -0
- package/node_modules/@lezer/javascript/test/decorator.txt +64 -0
- package/node_modules/@lezer/javascript/test/expression.txt +686 -0
- package/node_modules/@lezer/javascript/test/jsx.txt +79 -0
- package/node_modules/@lezer/javascript/test/semicolon.txt +77 -0
- package/node_modules/@lezer/javascript/test/statement.txt +404 -0
- package/node_modules/@lezer/javascript/test/test-javascript.js +17 -0
- package/node_modules/@lezer/javascript/test/typescript.txt +401 -0
- package/node_modules/@lezer/json/CHANGELOG.md +79 -0
- package/node_modules/@lezer/json/LICENSE +21 -0
- package/node_modules/@lezer/json/README.md +7 -0
- package/node_modules/@lezer/json/dist/index.cjs +41 -0
- package/node_modules/@lezer/json/dist/index.d.cts +3 -0
- package/node_modules/@lezer/json/dist/index.d.ts +3 -0
- package/node_modules/@lezer/json/dist/index.js +37 -0
- package/node_modules/@lezer/json/package.json +36 -0
- package/node_modules/@lezer/json/rollup.config.js +15 -0
- package/node_modules/@lezer/json/src/highlight.js +12 -0
- package/node_modules/@lezer/json/src/json.grammar +38 -0
- package/node_modules/@lezer/json/src/parser.js +23 -0
- package/node_modules/@lezer/json/src/parser.terms.js +12 -0
- package/node_modules/@lezer/json/test/arrays.txt +34 -0
- package/node_modules/@lezer/json/test/literals.txt +23 -0
- package/node_modules/@lezer/json/test/numbers.txt +87 -0
- package/node_modules/@lezer/json/test/objects.txt +34 -0
- package/node_modules/@lezer/json/test/strings.txt +50 -0
- package/node_modules/@lezer/json/test/test-json.js +17 -0
- package/node_modules/@lezer/lr/LICENSE +21 -0
- package/node_modules/@lezer/lr/README.md +25 -0
- package/node_modules/@lezer/lr/dist/constants.d.ts +45 -0
- package/node_modules/@lezer/lr/dist/constants.js +5 -0
- package/node_modules/@lezer/lr/dist/index.cjs +1891 -0
- package/node_modules/@lezer/lr/dist/index.d.cts +303 -0
- package/node_modules/@lezer/lr/dist/index.d.ts +303 -0
- package/node_modules/@lezer/lr/dist/index.js +1884 -0
- package/node_modules/@lezer/lr/package.json +32 -0
- package/node_modules/@lezer/markdown/CHANGELOG.md +279 -0
- package/node_modules/@lezer/markdown/LICENSE +21 -0
- package/node_modules/@lezer/markdown/README.md +725 -0
- package/node_modules/@lezer/markdown/bin/build-readme.cjs +39 -0
- package/node_modules/@lezer/markdown/build.js +16 -0
- package/node_modules/@lezer/markdown/dist/index.cjs +2352 -0
- package/node_modules/@lezer/markdown/dist/index.d.cts +600 -0
- package/node_modules/@lezer/markdown/dist/index.d.ts +600 -0
- package/node_modules/@lezer/markdown/dist/index.js +2335 -0
- package/node_modules/@lezer/markdown/package.json +37 -0
- package/node_modules/@lezer/markdown/src/README.md +83 -0
- package/node_modules/@lezer/markdown/src/extension.ts +301 -0
- package/node_modules/@lezer/markdown/src/index.ts +5 -0
- package/node_modules/@lezer/markdown/src/markdown.ts +1961 -0
- package/node_modules/@lezer/markdown/src/nest.ts +46 -0
- package/node_modules/@lezer/markdown/test/compare-tree.ts +14 -0
- package/node_modules/@lezer/markdown/test/spec.ts +79 -0
- package/node_modules/@lezer/markdown/test/test-extension.ts +269 -0
- package/node_modules/@lezer/markdown/test/test-incremental.ts +265 -0
- package/node_modules/@lezer/markdown/test/test-markdown.ts +3574 -0
- package/node_modules/@lezer/markdown/test/test-nesting.ts +86 -0
- package/node_modules/@lezer/markdown/test/tsconfig.json +12 -0
- package/node_modules/@lezer/markdown/tsconfig.json +14 -0
- package/node_modules/@lezer/python/CHANGELOG.md +243 -0
- package/node_modules/@lezer/python/LICENSE +21 -0
- package/node_modules/@lezer/python/README.md +6 -0
- package/node_modules/@lezer/python/dist/index.cjs +330 -0
- package/node_modules/@lezer/python/dist/index.d.cts +3 -0
- package/node_modules/@lezer/python/dist/index.d.ts +3 -0
- package/node_modules/@lezer/python/dist/index.js +326 -0
- package/node_modules/@lezer/python/package.json +36 -0
- package/node_modules/@lezer/python/rollup.config.js +16 -0
- package/node_modules/@lezer/python/src/highlight.js +35 -0
- package/node_modules/@lezer/python/src/python.grammar +381 -0
- package/node_modules/@lezer/python/src/tokens.js +224 -0
- package/node_modules/@lezer/python/test/expression.txt +231 -0
- package/node_modules/@lezer/python/test/statement.txt +442 -0
- package/node_modules/@lezer/python/test/test-incremental.js +33 -0
- package/node_modules/@lezer/python/test/test-python.js +17 -0
- package/node_modules/@marijn/find-cluster-break/LICENSE +21 -0
- package/node_modules/@marijn/find-cluster-break/README.md +28 -0
- package/node_modules/@marijn/find-cluster-break/dist/index.cjs +85 -0
- package/node_modules/@marijn/find-cluster-break/dist/index.d.cts +15 -0
- package/node_modules/@marijn/find-cluster-break/package.json +35 -0
- package/node_modules/@marijn/find-cluster-break/rollup.config.js +7 -0
- package/node_modules/@marijn/find-cluster-break/src/index.d.ts +15 -0
- package/node_modules/@marijn/find-cluster-break/src/index.js +87 -0
- package/node_modules/@marijn/find-cluster-break/test/test-cluster.js +30 -0
- package/node_modules/crelt/LICENSE +19 -0
- package/node_modules/crelt/README.md +23 -0
- package/node_modules/crelt/dist/index.cjs +31 -0
- package/node_modules/crelt/dist/index.d.cts +4 -0
- package/node_modules/crelt/index.d.ts +4 -0
- package/node_modules/crelt/index.js +28 -0
- package/node_modules/crelt/package.json +35 -0
- package/node_modules/crelt/rollup.config.js +13 -0
- package/node_modules/style-mod/LICENSE +19 -0
- package/node_modules/style-mod/README.md +98 -0
- package/node_modules/style-mod/dist/style-mod.cjs +165 -0
- package/node_modules/style-mod/dist/style-mod.d.cts +16 -0
- package/node_modules/style-mod/package.json +39 -0
- package/node_modules/style-mod/src/README.md +34 -0
- package/node_modules/style-mod/src/style-mod.d.ts +16 -0
- package/node_modules/style-mod/src/style-mod.js +172 -0
- package/node_modules/style-mod/test/test-style-mod.js +104 -0
- package/node_modules/w3c-keyname/.tern-port +1 -0
- package/node_modules/w3c-keyname/LICENSE +19 -0
- package/node_modules/w3c-keyname/README.md +18 -0
- package/node_modules/w3c-keyname/index.cjs +127 -0
- package/node_modules/w3c-keyname/index.d.cts +5 -0
- package/node_modules/w3c-keyname/index.d.ts +5 -0
- package/node_modules/w3c-keyname/index.js +119 -0
- package/node_modules/w3c-keyname/package.json +37 -0
- package/package.json +1 -1
- package/packages/daemon/src/api.js +157 -2
- package/packages/daemon/src/filewatcher.js +59 -0
- package/packages/daemon/src/index.js +28 -1
- package/packages/daemon/src/skills.js +20 -0
- package/packages/gui/dist/assets/index-Dxg9hdf3.js +103 -0
- package/packages/gui/dist/index.html +1 -1
- package/packages/gui/package.json +15 -2
- package/packages/gui/src/App.jsx +3 -0
- package/packages/gui/src/components/CodeEditor.jsx +143 -0
- package/packages/gui/src/components/EditorTabs.jsx +83 -0
- package/packages/gui/src/components/FileTree.jsx +193 -0
- package/packages/gui/src/stores/groove.js +158 -1
- package/packages/gui/src/views/FileEditor.jsx +142 -0
- package/packages/gui/src/views/SkillsMarketplace.jsx +112 -1
- package/node_modules/@groove-dev/gui/dist/assets/index-CNCSwHwH.js +0 -74
- package/packages/gui/dist/assets/index-CNCSwHwH.js +0 -74
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
# File Editor — Implementation Plan
|
|
2
|
+
|
|
3
|
+
## Context
|
|
4
|
+
|
|
5
|
+
Power users want to watch and verify what agents are doing in real-time. A VS Code-style file editor embedded in the GROOVE GUI lets users browse project files, see agent changes as they happen, and make quick edits — all without leaving the dashboard.
|
|
6
|
+
|
|
7
|
+
## Architecture
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
+------------------------------------------+
|
|
11
|
+
| [EditorTabs: file1.js | file2.css | ...] |
|
|
12
|
+
+----------+-------------------------------+
|
|
13
|
+
| FileTree | CodeEditor (CodeMirror 6) |
|
|
14
|
+
| (240px) | (flex: 1) |
|
|
15
|
+
| | |
|
|
16
|
+
| | [file changed banner] |
|
|
17
|
+
| | |
|
|
18
|
+
+----------+-------------------------------+
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
**Editor library: CodeMirror 6** — modular (~200KB vs Monaco's ~3MB), has a native One Dark theme matching GROOVE's palette, supports programmatic content updates for live agent changes. No new daemon dependencies — file watching uses Node.js built-in `fs.watch`.
|
|
22
|
+
|
|
23
|
+
## Files to Create
|
|
24
|
+
|
|
25
|
+
| File | Purpose |
|
|
26
|
+
|------|---------|
|
|
27
|
+
| `packages/gui/src/views/FileEditor.jsx` | Main view — composes tree + tabs + editor |
|
|
28
|
+
| `packages/gui/src/components/FileTree.jsx` | Expandable directory tree sidebar |
|
|
29
|
+
| `packages/gui/src/components/EditorTabs.jsx` | Horizontal tab bar for open files |
|
|
30
|
+
| `packages/gui/src/components/CodeEditor.jsx` | CodeMirror 6 wrapper |
|
|
31
|
+
| `packages/daemon/src/filewatcher.js` | Per-file fs.watch + debounced WebSocket broadcast |
|
|
32
|
+
|
|
33
|
+
## Files to Modify
|
|
34
|
+
|
|
35
|
+
| File | Changes |
|
|
36
|
+
|------|---------|
|
|
37
|
+
| `packages/daemon/src/api.js` | Add `/api/files/tree`, `/api/files/read`, `/api/files/write` endpoints |
|
|
38
|
+
| `packages/daemon/src/index.js` | Wire `FileWatcher`, handle `editor:watch`/`editor:unwatch` WS messages |
|
|
39
|
+
| `packages/gui/src/stores/groove.js` | Add editor state + actions + `file:changed` WS handler |
|
|
40
|
+
| `packages/gui/src/App.jsx` | Add "Editor" tab, import + render `<FileEditor />` |
|
|
41
|
+
| `packages/gui/package.json` | Add CodeMirror 6 dependencies |
|
|
42
|
+
|
|
43
|
+
## Build Order
|
|
44
|
+
|
|
45
|
+
### Step 1: Backend — File API endpoints
|
|
46
|
+
|
|
47
|
+
**File: `packages/daemon/src/api.js`**
|
|
48
|
+
|
|
49
|
+
Add after the existing `// --- Directory Browser ---` section. Reuse the same path validation pattern from `/api/browse`.
|
|
50
|
+
|
|
51
|
+
**`GET /api/files/tree?path=<relPath>`**
|
|
52
|
+
Returns files AND directories for a given path. Response:
|
|
53
|
+
```json
|
|
54
|
+
{
|
|
55
|
+
"current": "src/components",
|
|
56
|
+
"parent": "src",
|
|
57
|
+
"entries": [
|
|
58
|
+
{ "name": "subdir", "type": "dir", "path": "src/components/subdir", "hasChildren": true },
|
|
59
|
+
{ "name": "App.jsx", "type": "file", "path": "src/components/App.jsx", "size": 4521, "language": "javascript" }
|
|
60
|
+
]
|
|
61
|
+
}
|
|
62
|
+
```
|
|
63
|
+
- Dirs first (sorted), then files (sorted)
|
|
64
|
+
- Filter: no `.git`, `node_modules`, dotfiles
|
|
65
|
+
- Language detected from extension via a simple map
|
|
66
|
+
|
|
67
|
+
**`GET /api/files/read?path=<relPath>`**
|
|
68
|
+
Returns file contents. Response:
|
|
69
|
+
```json
|
|
70
|
+
{ "path": "src/App.jsx", "content": "...", "size": 4521, "language": "javascript" }
|
|
71
|
+
```
|
|
72
|
+
- Reject files > 5MB
|
|
73
|
+
- Detect binary (null bytes in first 8KB) → return `{ binary: true }`
|
|
74
|
+
|
|
75
|
+
**`POST /api/files/write`**
|
|
76
|
+
Saves file contents. Body: `{ path, content }`. Response: `{ ok: true, size: N }`
|
|
77
|
+
- Same path validation
|
|
78
|
+
- Audit log: `daemon.audit.log('file.write', { path })`
|
|
79
|
+
|
|
80
|
+
**Language detection helper:**
|
|
81
|
+
```javascript
|
|
82
|
+
const LANG_MAP = {
|
|
83
|
+
js: 'javascript', jsx: 'javascript', mjs: 'javascript',
|
|
84
|
+
ts: 'typescript', tsx: 'typescript',
|
|
85
|
+
css: 'css', scss: 'css', html: 'html', json: 'json',
|
|
86
|
+
md: 'markdown', py: 'python', rs: 'rust', go: 'go',
|
|
87
|
+
sh: 'shell', yaml: 'yaml', yml: 'yaml', toml: 'toml',
|
|
88
|
+
sql: 'sql', xml: 'xml', java: 'java',
|
|
89
|
+
};
|
|
90
|
+
function detectLanguage(filename) {
|
|
91
|
+
const ext = filename.split('.').pop()?.toLowerCase();
|
|
92
|
+
return LANG_MAP[ext] || 'text';
|
|
93
|
+
}
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
### Step 2: Backend — File Watcher
|
|
97
|
+
|
|
98
|
+
**New file: `packages/daemon/src/filewatcher.js`**
|
|
99
|
+
|
|
100
|
+
Lightweight class that watches individual files (only files the user has open in the editor):
|
|
101
|
+
- `watch(relPath)` — start watching with `fs.watch`, debounce 300ms, broadcast `{ type: 'file:changed', path, timestamp }` via `daemon.broadcast()`
|
|
102
|
+
- `unwatch(relPath)` — stop watching, clean up
|
|
103
|
+
- `unwatchAll()` — cleanup on daemon shutdown
|
|
104
|
+
|
|
105
|
+
**Wire in `packages/daemon/src/index.js`:**
|
|
106
|
+
- Instantiate `this.fileWatcher = new FileWatcher(this)` in daemon constructor
|
|
107
|
+
- In the WebSocket `connection` handler, add a `message` listener:
|
|
108
|
+
- `editor:watch` → `this.fileWatcher.watch(msg.path)`
|
|
109
|
+
- `editor:unwatch` → `this.fileWatcher.unwatch(msg.path)`
|
|
110
|
+
- Call `this.fileWatcher.unwatchAll()` on daemon shutdown
|
|
111
|
+
|
|
112
|
+
### Step 3: Dependencies — Install CodeMirror 6
|
|
113
|
+
|
|
114
|
+
Add to `packages/gui/package.json`:
|
|
115
|
+
```
|
|
116
|
+
@codemirror/view, @codemirror/state, @codemirror/language,
|
|
117
|
+
@codemirror/commands, @codemirror/search, @codemirror/autocomplete,
|
|
118
|
+
@codemirror/lang-javascript, @codemirror/lang-css, @codemirror/lang-html,
|
|
119
|
+
@codemirror/lang-json, @codemirror/lang-markdown, @codemirror/lang-python,
|
|
120
|
+
@codemirror/theme-one-dark
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
Run `npm install` from project root.
|
|
124
|
+
|
|
125
|
+
### Step 4: Zustand Store — Editor State
|
|
126
|
+
|
|
127
|
+
**File: `packages/gui/src/stores/groove.js`**
|
|
128
|
+
|
|
129
|
+
Add to initial state:
|
|
130
|
+
```javascript
|
|
131
|
+
editorFiles: {}, // { [path]: { content, originalContent, language, loadedAt } }
|
|
132
|
+
editorActiveFile: null, // currently visible file path
|
|
133
|
+
editorOpenTabs: [], // ordered array of open file paths
|
|
134
|
+
editorTreeCache: {}, // { [dirPath]: entries[] } — cached tree data
|
|
135
|
+
editorChangedFiles: {}, // { [path]: timestamp } — externally modified files
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
Add actions:
|
|
139
|
+
- `openFile(path)` — fetch from `/api/files/read`, add to `editorFiles` + `editorOpenTabs`, set `editorActiveFile`, send `editor:watch` via WS
|
|
140
|
+
- `closeFile(path)` — remove from tabs/files, send `editor:unwatch`, switch to next tab
|
|
141
|
+
- `setActiveFile(path)` — switch active tab
|
|
142
|
+
- `updateFileContent(path, content)` — on every editor keystroke (dirty = content !== originalContent)
|
|
143
|
+
- `saveFile(path)` — POST to `/api/files/write`, reset originalContent
|
|
144
|
+
- `reloadFile(path)` — re-fetch from server, clear changed notification
|
|
145
|
+
- `dismissFileChange(path)` — clear from `editorChangedFiles`
|
|
146
|
+
- `fetchTreeDir(path)` — fetch `/api/files/tree?path=...`, cache in `editorTreeCache`
|
|
147
|
+
|
|
148
|
+
Add WS handler case:
|
|
149
|
+
```javascript
|
|
150
|
+
case 'file:changed':
|
|
151
|
+
set((s) => ({ editorChangedFiles: { ...s.editorChangedFiles, [msg.path]: msg.timestamp } }));
|
|
152
|
+
break;
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
### Step 5: FileTree Component
|
|
156
|
+
|
|
157
|
+
**New file: `packages/gui/src/components/FileTree.jsx`**
|
|
158
|
+
|
|
159
|
+
- Recursive expandable tree, lazy-loads children on directory expand
|
|
160
|
+
- Click file → `openFile(path)`
|
|
161
|
+
- Click directory → toggle expand, fetch children if not cached
|
|
162
|
+
- Visual: 16px indent per level, `>` / `v` arrows for dirs
|
|
163
|
+
- Active file highlighted with accent left border
|
|
164
|
+
- File colors by extension (`.js` amber, `.css` blue, `.json` green, `.md` purple, etc.)
|
|
165
|
+
- Search input at top for client-side filtering
|
|
166
|
+
- Style: `var(--bg-chrome)` background, `var(--border)` separators, matching DirPicker patterns
|
|
167
|
+
|
|
168
|
+
### Step 6: EditorTabs Component
|
|
169
|
+
|
|
170
|
+
**New file: `packages/gui/src/components/EditorTabs.jsx`**
|
|
171
|
+
|
|
172
|
+
- Horizontal scrollable row of open file tabs
|
|
173
|
+
- Each tab: filename (tooltip = full path), close `x` button
|
|
174
|
+
- Active tab: `border-bottom: 2px solid var(--accent)`, bright text
|
|
175
|
+
- Dirty indicator: small amber dot next to filename when content !== originalContent
|
|
176
|
+
- `overflow-x: auto` for many open files
|
|
177
|
+
- Style: `var(--bg-chrome)` background, 32px height, matching header tab patterns from App.jsx
|
|
178
|
+
|
|
179
|
+
### Step 7: CodeEditor Component (CodeMirror 6)
|
|
180
|
+
|
|
181
|
+
**New file: `packages/gui/src/components/CodeEditor.jsx`**
|
|
182
|
+
|
|
183
|
+
React wrapper around CodeMirror 6. Key details:
|
|
184
|
+
|
|
185
|
+
- `useRef` for container div + EditorView instance
|
|
186
|
+
- `useEffect` on mount: create EditorView with extensions (line numbers, bracket matching, search, auto-indent, one-dark theme, language support)
|
|
187
|
+
- When `content` prop changes externally (file reload / different file selected): dispatch full content replacement via `view.dispatch()`
|
|
188
|
+
- `onChange` callback on every transaction → `updateFileContent(path, newContent)` in store
|
|
189
|
+
- Language switching: reconfigure compartment when language prop changes
|
|
190
|
+
- Custom theme override: set editor bg to `var(--bg-base)` (#24282f) since One Dark default is `--bg-chrome` (#282c34)
|
|
191
|
+
- Ctrl/Cmd+S handler → `saveFile(path)`
|
|
192
|
+
- Cleanup on unmount: `view.destroy()`
|
|
193
|
+
|
|
194
|
+
### Step 8: FileEditor View (Composition)
|
|
195
|
+
|
|
196
|
+
**New file: `packages/gui/src/views/FileEditor.jsx`**
|
|
197
|
+
|
|
198
|
+
Composes all pieces:
|
|
199
|
+
```
|
|
200
|
+
Container (flex column, height 100%)
|
|
201
|
+
├── EditorTabs (flexShrink: 0)
|
|
202
|
+
└── Content Row (flex row, flex: 1, overflow: hidden)
|
|
203
|
+
├── FileTree (width: 240px, flexShrink: 0, border-right)
|
|
204
|
+
└── Editor Area (flex: 1, position: relative)
|
|
205
|
+
├── External Change Banner (absolute top, z-index 10, amber)
|
|
206
|
+
│ "File modified externally" [Reload] [Dismiss]
|
|
207
|
+
└── CodeEditor (flex: 1)
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
Empty state when no file open: centered "Select a file from the tree" text.
|
|
211
|
+
|
|
212
|
+
### Step 9: App.jsx Integration
|
|
213
|
+
|
|
214
|
+
**File: `packages/gui/src/App.jsx`**
|
|
215
|
+
|
|
216
|
+
1. Add to TABS: `{ id: 'editor', label: 'Editor' }` — position it second (after Agents)
|
|
217
|
+
2. Import `FileEditor` from `'./views/FileEditor'`
|
|
218
|
+
3. Add render: `{activeTab === 'editor' && <FileEditor />}`
|
|
219
|
+
|
|
220
|
+
The detail panel (agent chat, journalist) continues to work alongside the editor.
|
|
221
|
+
|
|
222
|
+
## Security
|
|
223
|
+
|
|
224
|
+
All file endpoints reuse the path validation from `/api/browse`:
|
|
225
|
+
- No absolute paths (`startsWith('/')`)
|
|
226
|
+
- No traversal (`includes('..')`)
|
|
227
|
+
- No null bytes (`includes('\0')`)
|
|
228
|
+
- Must resolve within `daemon.projectDir`
|
|
229
|
+
- 5MB size limit on read/write
|
|
230
|
+
- Binary detection (null bytes in first 8KB)
|
|
231
|
+
- Audit logging on writes
|
|
232
|
+
|
|
233
|
+
## Verification
|
|
234
|
+
|
|
235
|
+
1. `npm run build:gui` — should build clean with CodeMirror included
|
|
236
|
+
2. `node --test packages/daemon/test/` — all 137 tests pass
|
|
237
|
+
3. Start daemon (`groove start`), open GUI, click Editor tab
|
|
238
|
+
4. File tree should show project structure
|
|
239
|
+
5. Click a file → opens in CodeMirror with syntax highlighting
|
|
240
|
+
6. Edit content → tab shows dirty dot
|
|
241
|
+
7. Cmd+S → saves, dirty dot clears
|
|
242
|
+
8. Spawn an agent that modifies an open file → amber banner appears "File modified externally"
|
|
243
|
+
9. Click Reload → file content updates
|
|
244
|
+
10. Open multiple files → tabs work, switching preserves state
|
|
245
|
+
|
|
246
|
+
## Future Extensions (not in this build)
|
|
247
|
+
|
|
248
|
+
- Diff view for external changes (`@codemirror/merge`)
|
|
249
|
+
- Git status colors in file tree (modified/untracked)
|
|
250
|
+
- File create/delete/rename via right-click context menu
|
|
251
|
+
- Cmd+P fuzzy file finder
|
|
252
|
+
- Search across files (grep-like panel)
|
|
253
|
+
- Breadcrumb path bar above editor
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
name: Trigger CI
|
|
2
|
+
on: push
|
|
3
|
+
|
|
4
|
+
jobs:
|
|
5
|
+
build:
|
|
6
|
+
name: Dispatch to main repo
|
|
7
|
+
runs-on: ubuntu-latest
|
|
8
|
+
steps:
|
|
9
|
+
- name: Emit repository_dispatch
|
|
10
|
+
uses: mvasigh/dispatch-action@main
|
|
11
|
+
with:
|
|
12
|
+
# You should create a personal access token and store it in your repository
|
|
13
|
+
token: ${{ secrets.DISPATCH_AUTH }}
|
|
14
|
+
repo: dev
|
|
15
|
+
owner: codemirror
|
|
16
|
+
event_type: push
|