feat: Graphify integration — tenant codebase graph + support AI augmentation
- src/lib/graphify.ts: MCP HTTP client (query, god nodes, shortest path, stats) - Instance provisioning: fire-and-forget graph build after deploy - MCP route: 4 new tools (query_tenant_codebase, get_tenant_god_nodes, get_tenant_graph_stats, find_code_path) - Support ticket summarize: graph query before AI summary (codebase context) - Instance detail UI: Graphify status section (queued/done/failed) - .env: GRAPHIFY_URL + GRAPHIFY_API_KEY (commented, opt-in)
This commit is contained in:
1 parent
ada029d500
commit
7d94fe53ad
6 files changed
+461
-2
No files matched your search
@@ -797,6 +797,63 @@ function InstanceDetailSheet({
|
||||
</dl>
|
||||
</section>
|
||||
|
||||
{/* Codebase Graph (Graphify) */}
|
||||
<section className="space-y-2">
|
||||
<h3 className="text-xs font-semibold uppercase tracking-wider text-muted-foreground">
|
||||
Codebase-Graph (Graphify)
|
||||
</h3>
|
||||
<div className="rounded-md border border-border bg-muted/20 p-3 text-xs">
|
||||
{(() => {
|
||||
const graphEvents = instance.events.filter(
|
||||
(e) => e.type.startsWith('graphify.')
|
||||
)
|
||||
const buildQueued = graphEvents.some(
|
||||
(e) => e.type === 'graphify.build.queued'
|
||||
)
|
||||
const buildDone = graphEvents.some(
|
||||
(e) => e.type === 'graphify.build.ok'
|
||||
)
|
||||
const buildFailed = graphEvents.some(
|
||||
(e) => e.type === 'graphify.build.error'
|
||||
)
|
||||
if (buildDone) {
|
||||
return (
|
||||
<div className="flex items-center gap-2">
|
||||
<CheckCircle2 className="size-3.5 text-foreground" />
|
||||
<span>Graph erstellt — Support-AI kann Codebasis analysieren.</span>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
if (buildFailed) {
|
||||
return (
|
||||
<div className="flex items-center gap-2">
|
||||
<AlertTriangle className="size-3.5 text-muted-foreground" />
|
||||
<span>Graph-Erstellung fehlgeschlagen. Siehe Ereignisverlauf.</span>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
if (buildQueued) {
|
||||
return (
|
||||
<div className="flex items-center gap-2">
|
||||
<Loader2 className="size-3.5 animate-spin text-muted-foreground" />
|
||||
<span>Graph wird im Hintergrund erstellt…</span>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
return (
|
||||
<div className="flex items-center gap-2">
|
||||
<CircleDashed className="size-3.5 text-muted-foreground" />
|
||||
<span>Kein Graphify-Graph vorhanden.</span>
|
||||
</div>
|
||||
)
|
||||
})()}
|
||||
<p className="mt-2 text-[10px] text-muted-foreground">
|
||||
Der Codebase-Graph ermöglicht der Support-AI, relevante
|
||||
Code-Stellen zu finden, wenn ein Ticket erstellt wird.
|
||||
</p>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{/* Status timeline (events) */}
|
||||
<section className="space-y-2">
|
||||
<h3 className="text-xs font-semibold uppercase tracking-wider text-muted-foreground">
|
||||
|
||||
Reference in new issue
Block a user