Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
767ea913ed | ||
|
|
e166e927ae |
@@ -1,4 +1,4 @@
|
||||
{
|
||||
"monorepoCommit": "9ed40ab5c87bbe9cc652d57fd263ffb5d8a0aa55",
|
||||
"monorepoCommit": "19f9ce38aaffb52c1a9b0da05c10cb89f8f8842a",
|
||||
"sourcePath": "quixos-instance/packages/agent-presentation"
|
||||
}
|
||||
|
||||
Generated
+7
-7
@@ -58,17 +58,17 @@
|
||||
"nixpkgs": "nixpkgs"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1793458533,
|
||||
"narHash": "sha256-DnK9ad5YJXxyPqJYt2ysA9Kt6YcUmQV/EGmPzt5rleg=",
|
||||
"ref": "refs/tags/quixos-reachability/27af7af6c5704c7d9c39fd14d5875ccb1aaca1fd",
|
||||
"rev": "27af7af6c5704c7d9c39fd14d5875ccb1aaca1fd",
|
||||
"revCount": 241,
|
||||
"lastModified": 1793284605,
|
||||
"narHash": "sha256-FgV0Qhy9vxhjZhJs3lWu4NtYZ9FvvkUmM32bP2V73yA=",
|
||||
"ref": "refs/tags/quixos-reachability/a025525f47cdff71f2496bb4e72cb9fc06b046ed",
|
||||
"rev": "a025525f47cdff71f2496bb4e72cb9fc06b046ed",
|
||||
"revCount": 235,
|
||||
"type": "git",
|
||||
"url": "https://repos.quixos.org/quixos-toolchain/quixos-protocol.git"
|
||||
},
|
||||
"original": {
|
||||
"ref": "refs/tags/quixos-reachability/27af7af6c5704c7d9c39fd14d5875ccb1aaca1fd",
|
||||
"rev": "27af7af6c5704c7d9c39fd14d5875ccb1aaca1fd",
|
||||
"ref": "refs/tags/quixos-reachability/a025525f47cdff71f2496bb4e72cb9fc06b046ed",
|
||||
"rev": "a025525f47cdff71f2496bb4e72cb9fc06b046ed",
|
||||
"type": "git",
|
||||
"url": "https://repos.quixos.org/quixos-toolchain/quixos-protocol.git"
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
inputs.protocol.url = "git+https://repos.quixos.org/quixos-toolchain/quixos-protocol.git?ref=refs/tags/quixos-reachability/27af7af6c5704c7d9c39fd14d5875ccb1aaca1fd&rev=27af7af6c5704c7d9c39fd14d5875ccb1aaca1fd";
|
||||
inputs.protocol.url = "git+https://repos.quixos.org/quixos-toolchain/quixos-protocol.git?ref=refs/tags/quixos-reachability/a025525f47cdff71f2496bb4e72cb9fc06b046ed&rev=a025525f47cdff71f2496bb4e72cb9fc06b046ed";
|
||||
inputs.nixpkgs.follows = "protocol/nixpkgs";
|
||||
inputs.flake-utils.follows = "protocol/flake-utils";
|
||||
inputs.helpers = {
|
||||
|
||||
+7
-7
@@ -1,9 +1,9 @@
|
||||
quixos-lock version 1 {
|
||||
quixos source { repository "https://gitea.internal.quixos.org/quixos/quixos.git"; commit "9ed40ab5c87bbe9cc652d57fd263ffb5d8a0aa55"; }
|
||||
interface StandaloneView source { repository "https://repos.quixos.org/quixos-templates/interface-react-standalone-view.git"; commit "a70aa33d741b91ba722c45a86700511eb910cbd5"; }
|
||||
interface AgentThread source { repository "https://repos.quixos.org/quixos-templates/interface-agent-thread.git"; commit "b47ab315388497759836359ea638f3347b907067"; }
|
||||
interface Agent source { repository "https://repos.quixos.org/quixos-templates/interface-agent.git"; commit "5b143059fac61ec5f657a09d2169ee171eb38e74"; }
|
||||
interface AgentRequest source { repository "https://repos.quixos.org/quixos-templates/interface-agent-request.git"; commit "6e78e02787d7ec06bc838b2e742a80323734c5b4"; }
|
||||
interface AgentItem source { repository "https://repos.quixos.org/quixos-templates/interface-agent-item.git"; commit "269c082781344557ad82d9c8575a44ed63164659"; }
|
||||
interface AgentQuestion source { repository "https://repos.quixos.org/quixos-templates/interface-agent-question.git"; commit "0e35cd7b7f71701cd3c403c50e38226a7f11a366"; }
|
||||
quixos source { repository "https://gitea.internal.quixos.org/quixos/quixos.git"; commit "19f9ce38aaffb52c1a9b0da05c10cb89f8f8842a"; }
|
||||
interface StandaloneView source { repository "https://repos.quixos.org/quixos-templates/interface-react-standalone-view.git"; commit "58217b26c80e099963fa6485f336bbd141e4a806"; }
|
||||
interface AgentThread source { repository "https://repos.quixos.org/quixos-templates/interface-agent-thread.git"; commit "dbd3cfa602ea26e184e3fa50257d791379290fca"; }
|
||||
interface Agent source { repository "https://repos.quixos.org/quixos-templates/interface-agent.git"; commit "3cf3aa3f643938fe5a0cc87c431224ec3105b4b3"; }
|
||||
interface AgentRequest source { repository "https://repos.quixos.org/quixos-templates/interface-agent-request.git"; commit "ce77c5e362540c73366446024dd78e8e911e1cd1"; }
|
||||
interface AgentItem source { repository "https://repos.quixos.org/quixos-templates/interface-agent-item.git"; commit "03cfd32dbbdbd2c91efa54aeecb50a37e0947b34"; }
|
||||
interface AgentQuestion source { repository "https://repos.quixos.org/quixos-templates/interface-agent-question.git"; commit "5e100840989b7a3ff6a84796f790c4f22e1929a2"; }
|
||||
}
|
||||
|
||||
+8
-55
@@ -144,62 +144,17 @@ function QuestionForm({
|
||||
</form>
|
||||
);
|
||||
}
|
||||
function activityValue(item: Item) {
|
||||
try {
|
||||
return JSON.parse(item.data.activity ?? "null");
|
||||
} catch {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
function activityFailed(item: Item) {
|
||||
const value = activityValue(item);
|
||||
return (
|
||||
["failed", "error", "cancelled", "uncertain"].includes(value?.status) ||
|
||||
(typeof value?.exitCode === "number" && value.exitCode !== 0)
|
||||
);
|
||||
}
|
||||
function Activity({ item }: { item: Item }) {
|
||||
const value = activityValue(item),
|
||||
failed = activityFailed(item),
|
||||
title = value?.command ?? value?.label ?? item.data.text ?? "Activity";
|
||||
let value: any;
|
||||
try {
|
||||
value = JSON.parse(item.data.activity ?? "null");
|
||||
} catch {}
|
||||
const title = value?.command ?? value?.label ?? item.data.text ?? "Activity";
|
||||
return (
|
||||
<details className="agent-activity-card">
|
||||
<summary>{failed ? "Tool needs attention" : "Tool details"}</summary>
|
||||
<pre>{String(title)}</pre>
|
||||
<summary>{String(title).slice(0, 300)}</summary>
|
||||
<pre>{value?.aggregatedOutput ?? value?.output ?? value?.detail ?? item.data.text}</pre>
|
||||
{value?.exitCode !== undefined && value?.exitCode !== null && <p>Exit code: {value.exitCode}</p>}
|
||||
</details>
|
||||
);
|
||||
}
|
||||
/** Keep chronological message boundaries and failures visible. Only adjacent
|
||||
* routine tool records fold together; every original item remains inspectable. */
|
||||
function conversationRows(items: Item[]): (Item | Item[])[] {
|
||||
const rows: (Item | Item[])[] = [];
|
||||
for (const item of items) {
|
||||
const value = activityValue(item);
|
||||
if (
|
||||
item.data.kind === "activity" &&
|
||||
value &&
|
||||
["completed", "running", "inProgress", "in_progress"].includes(value.status) &&
|
||||
!activityFailed(item)
|
||||
) {
|
||||
const previous = rows.at(-1);
|
||||
if (Array.isArray(previous)) previous.push(item);
|
||||
else rows.push([item]);
|
||||
} else rows.push(item);
|
||||
}
|
||||
return rows;
|
||||
}
|
||||
function ToolHistory({ items }: { items: Item[] }) {
|
||||
const working = items.some((item) => activityValue(item)?.status !== "completed");
|
||||
return (
|
||||
<details className="agent-tool-history">
|
||||
<summary>
|
||||
{items.length} tool {items.length === 1 ? "call" : "calls"} · {working ? "Working" : "Completed"}
|
||||
</summary>
|
||||
{items.map((item) => (
|
||||
<Activity key={itemKey(item)} item={item} />
|
||||
))}
|
||||
{value?.exitCode !== undefined && <p>Exit code: {value.exitCode}</p>}
|
||||
</details>
|
||||
);
|
||||
}
|
||||
@@ -465,9 +420,7 @@ export function ThreadView({
|
||||
</time>
|
||||
)}
|
||||
</div>
|
||||
{(renderItem ? items : conversationRows(items)).map((row) => {
|
||||
if (Array.isArray(row)) return <ToolHistory key={itemKey(row[0])} items={row} />;
|
||||
const item = row;
|
||||
{items.map((item) => {
|
||||
const custom = renderItem?.(item, request);
|
||||
return (
|
||||
<React.Fragment key={itemKey(item)}>
|
||||
|
||||
@@ -78,7 +78,6 @@
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
.agent-activity-card,
|
||||
.agent-tool-history,
|
||||
.agent-commentary {
|
||||
border: 1px solid #e0e5ee;
|
||||
border-radius: 7px;
|
||||
|
||||
Reference in New Issue
Block a user