feat: Replace DB component tools with filesystem-based user-components/
Components are now .vue files in user-components/<folder>/ parsed at runtime. Replaces 6 DB MCP tools with 2 (list_fs_components, load_fs_component). Adds vue-parser, fs-components API, and file watcher for live reload.
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
|
||||
import { PORT_GIT, WORKING_DIR } from '../config'
|
||||
import { setupGitWatcher, handleGitClient, cleanupGitWatcher } from './handlers/git-handler'
|
||||
import { setupComponentsWatcher, cleanupComponentsWatcher } from './handlers/components-handler'
|
||||
import { handleTorchMessage, handleTorchConnect, handleTorchDisconnect, getTorchStatus, cleanupTorchHandler } from './handlers/torch-handler'
|
||||
|
||||
// Connected clients
|
||||
@@ -96,14 +97,16 @@ export function startSyncServer() {
|
||||
|
||||
console.log(`[Sync] WebSocket server on port ${PORT_GIT}`)
|
||||
|
||||
// Start git file watcher
|
||||
// Start file watchers
|
||||
setupGitWatcher(WORKING_DIR, broadcast)
|
||||
setupComponentsWatcher(WORKING_DIR, broadcast)
|
||||
|
||||
return server
|
||||
}
|
||||
|
||||
export function stopSyncServer() {
|
||||
cleanupGitWatcher()
|
||||
cleanupComponentsWatcher()
|
||||
cleanupTorchHandler()
|
||||
clients.clear()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user