sync app published

This commit is contained in:
hjlarry
2025-10-13 16:42:17 +08:00
parent 60fdbb56a9
commit 1857d37fae
3 changed files with 42 additions and 2 deletions

View File

@ -372,6 +372,10 @@ export class CollaborationManager {
return this.eventEmitter.on('appStateUpdate', callback)
}
onAppPublishUpdate(callback: (update: any) => void): () => void {
return this.eventEmitter.on('appPublishUpdate', callback)
}
onAppMetaUpdate(callback: (update: any) => void): () => void {
return this.eventEmitter.on('appMetaUpdate', callback)
}
@ -820,6 +824,10 @@ export class CollaborationManager {
console.log('Processing app_meta_update event:', update)
this.eventEmitter.emit('appMetaUpdate', update)
}
else if (update.type === 'app_publish_update') {
console.log('Processing app_publish_update event:', update)
this.eventEmitter.emit('appPublishUpdate', update)
}
else if (update.type === 'mcp_server_update') {
console.log('Processing mcp_server_update event:', update)
this.eventEmitter.emit('mcpServerUpdate', update)

View File

@ -50,7 +50,7 @@ export type GraphSyncData = {
}
export type CollaborationUpdate = {
type: 'mouse_move' | 'vars_and_features_update' | 'sync_request' | 'app_state_update' | 'app_meta_update' | 'mcp_server_update' | 'workflow_update' | 'comments_update' | 'node_panel_presence'
type: 'mouse_move' | 'vars_and_features_update' | 'sync_request' | 'app_state_update' | 'app_meta_update' | 'mcp_server_update' | 'workflow_update' | 'comments_update' | 'node_panel_presence' | 'app_publish_update'
userId: string
data: any
timestamp: number