MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / PacketSource

Function PacketSource

graph-ui/src/browser-ai/BrowserChatDock.tsx:161–170  ·  view source on GitHub ↗

`codeOnly` where the listed facts already stand above it, in the explanation card. The * source does not push the first graph facts out: a listed answer shows both (K14).

({ packet, citation, codeOnly = false, language = 'en' }: { packet: PreparedExplanationContext; citation?: ReturnType<typeof citedInterpretation>; codeOnly?: boolean; language?: 'en' | 'de' })

Source from the content-addressed store, hash-verified

159/** `codeOnly` where the listed facts already stand above it, in the explanation card. The
160 * source does not push the first graph facts out: a listed answer shows both (K14). */
161function PacketSource({ packet, citation, codeOnly = false, language = 'en' }: { packet: PreparedExplanationContext; citation?: ReturnType<typeof citedInterpretation>; codeOnly?: boolean; language?: 'en' | 'de' }): JSX.Element {
162 const code = packet.evidence.filter(item => item.source === 'code').slice(0, 3);
163 const facts = codeOnly ? [] : packet.evidence.filter(item => item.source !== 'code').slice(0, 3);
164 return <>
165 {packet.limitations.map((limit, index) => <p className="cbm-chat-evidence-note" key={index}>{evidenceNote(limit, language)}</p>)}
166 {citation ? <pre>{citation.quote}</pre> : [...code, ...facts].map(item => <div key={item.id}>
167 {item.location && <small>{item.location.path}:{item.location.startLine}-{item.location.endLine}</small>}<pre>{item.text}</pre>
168 </div>)}
169 </>;
170}
171
172/** A typed limit applies on blur or Enter, clamped into the model policy. */
173function TokenLimitField({ id, label, value, min, max, step, onCommit }: { id: string; label: string; value: number; min: number; max: number; step: number; onCommit: (value: number) => void }): JSX.Element {

Callers

nothing calls this directly

Calls 1

evidenceNoteFunction · 0.90

Tested by

no test coverage detected