refactor(web-ui): פירוק התנגשות-שם של Paperclip agent DTO + גבול-פלטפורמה מוצהר (R3, G12, #112) #176
@@ -1,7 +1,7 @@
|
||||
"use client";
|
||||
|
||||
import { useAgentActivity } from "@/lib/api/agents";
|
||||
import type { PaperclipAgent } from "@/lib/api/agents";
|
||||
import type { PaperclipAgentStatus } from "@/lib/api/agents";
|
||||
import { Bot } from "lucide-react";
|
||||
|
||||
/* ── Status dot colors ───────────────────────────────────────── */
|
||||
@@ -26,7 +26,7 @@ function statusDot(status: string) {
|
||||
|
||||
/* ── Agent row ───────────────────────────────────────────────── */
|
||||
|
||||
function AgentRow({ agent }: { agent: PaperclipAgent }) {
|
||||
function AgentRow({ agent }: { agent: PaperclipAgentStatus }) {
|
||||
return (
|
||||
<div className="flex items-center gap-2 py-1">
|
||||
<span
|
||||
|
||||
@@ -1,5 +1,13 @@
|
||||
/**
|
||||
* Paperclip agent activity hooks — mirror agent work into Legal-AI UI.
|
||||
* Paperclip agent ACTIVITY hooks — mirror live agent work into the Legal-AI UI.
|
||||
*
|
||||
* Frontend platform-presentation module (G12 / docs/spec/X15): the web-ui is a
|
||||
* presentation layer, and showing the agent platform's live activity is a
|
||||
* legitimate, declared use of platform data. Distinct from
|
||||
* `paperclip-agents.ts`, which is the settings/management view of an agent's
|
||||
* full config — hence the activity DTO here is `PaperclipAgentStatus`, not the
|
||||
* config `PaperclipAgent` (the two are different projections; the name no
|
||||
* longer collides).
|
||||
*/
|
||||
|
||||
import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
|
||||
@@ -32,7 +40,7 @@ export type PaperclipComment = {
|
||||
agent_icon: string | null;
|
||||
};
|
||||
|
||||
export type PaperclipAgent = {
|
||||
export type PaperclipAgentStatus = {
|
||||
id: string;
|
||||
name: string;
|
||||
role: string;
|
||||
@@ -105,7 +113,7 @@ export type Interaction = {
|
||||
export type AgentActivityResponse = {
|
||||
issues: PaperclipIssue[];
|
||||
comments: PaperclipComment[];
|
||||
agents: PaperclipAgent[];
|
||||
agents: PaperclipAgentStatus[];
|
||||
interactions: Interaction[];
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user