MCPcopy Index your code
hub / github.com/ChatLab/ChatLab / checkConflictsFromSources

Function checkConflictsFromSources

packages/node-runtime/src/merger/index.ts:76–92  ·  view source on GitHub ↗
(
  dataSources: Array<{ source: MergerDataSource; filename: string }>
)

Source from the content-addressed store, hash-verified

74// ==================== Conflict checking ====================
75
76export function checkConflictsFromSources(
77 dataSources: Array<{ source: MergerDataSource; filename: string }>
78): ConflictCheckResult {
79 const allMessages: Array<{ msg: MergerMessage; source: string; platform: string }> = []
80
81 for (const { source, filename } of dataSources) {
82 const meta = source.getMeta()
83 const platform = meta?.platform || 'unknown'
84 source.streamMessages(10000, (messages) => {
85 for (const msg of messages) {
86 allMessages.push({ msg, source: filename, platform })
87 }
88 })
89 }
90
91 return detectConflictsInMessages(allMessages)
92}
93
94// ==================== Merge orchestration ====================
95

Callers 2

registerMergeRoutesFunction · 0.90
merger.test.tsFile · 0.90

Calls 3

getMetaMethod · 0.65
streamMessagesMethod · 0.65

Tested by

no test coverage detected