Compare commits

..
6 changed files with 24 additions and 72 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
{ {
"monorepoCommit": "500f5956d7d9de1b4d90db0fb6948dc3f7e6b0fa", "monorepoCommit": "f841e9afcf4caec76fce890e20b5e5ea4ac7e3e7",
"sourcePath": "quixos-instance/packages/agent-presentation" "sourcePath": "quixos-instance/packages/agent-presentation"
} }
Generated
+7 -7
View File
@@ -58,17 +58,17 @@
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs"
}, },
"locked": { "locked": {
"lastModified": 1793458533, "lastModified": 1793284605,
"narHash": "sha256-DnK9ad5YJXxyPqJYt2ysA9Kt6YcUmQV/EGmPzt5rleg=", "narHash": "sha256-FgV0Qhy9vxhjZhJs3lWu4NtYZ9FvvkUmM32bP2V73yA=",
"ref": "refs/tags/quixos-reachability/27af7af6c5704c7d9c39fd14d5875ccb1aaca1fd", "ref": "refs/tags/quixos-reachability/a025525f47cdff71f2496bb4e72cb9fc06b046ed",
"rev": "27af7af6c5704c7d9c39fd14d5875ccb1aaca1fd", "rev": "a025525f47cdff71f2496bb4e72cb9fc06b046ed",
"revCount": 241, "revCount": 235,
"type": "git", "type": "git",
"url": "https://repos.quixos.org/quixos-toolchain/quixos-protocol.git" "url": "https://repos.quixos.org/quixos-toolchain/quixos-protocol.git"
}, },
"original": { "original": {
"ref": "refs/tags/quixos-reachability/27af7af6c5704c7d9c39fd14d5875ccb1aaca1fd", "ref": "refs/tags/quixos-reachability/a025525f47cdff71f2496bb4e72cb9fc06b046ed",
"rev": "27af7af6c5704c7d9c39fd14d5875ccb1aaca1fd", "rev": "a025525f47cdff71f2496bb4e72cb9fc06b046ed",
"type": "git", "type": "git",
"url": "https://repos.quixos.org/quixos-toolchain/quixos-protocol.git" "url": "https://repos.quixos.org/quixos-toolchain/quixos-protocol.git"
} }
+1 -1
View File
@@ -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.nixpkgs.follows = "protocol/nixpkgs";
inputs.flake-utils.follows = "protocol/flake-utils"; inputs.flake-utils.follows = "protocol/flake-utils";
inputs.helpers = { inputs.helpers = {
+7 -7
View File
@@ -1,9 +1,9 @@
quixos-lock version 1 { quixos-lock version 1 {
quixos source { repository "https://gitea.internal.quixos.org/quixos/quixos.git"; commit "500f5956d7d9de1b4d90db0fb6948dc3f7e6b0fa"; } quixos source { repository "https://gitea.internal.quixos.org/quixos/quixos.git"; commit "f841e9afcf4caec76fce890e20b5e5ea4ac7e3e7"; }
interface StandaloneView source { repository "https://repos.quixos.org/quixos-templates/interface-react-standalone-view.git"; commit "3ecae7eda96c8ece32c1f37a73221ebc40fd4d93"; } interface StandaloneView source { repository "https://repos.quixos.org/quixos-templates/interface-react-standalone-view.git"; commit "603833292d716c1d39e0941842308af7e995bdb8"; }
interface AgentThread source { repository "https://repos.quixos.org/quixos-templates/interface-agent-thread.git"; commit "d0e15e0e87a5414a727b8c29f183d14402e59327"; } interface AgentThread source { repository "https://repos.quixos.org/quixos-templates/interface-agent-thread.git"; commit "124a37e58026bbbd3b28df0222dd6290dc49c0c6"; }
interface Agent source { repository "https://repos.quixos.org/quixos-templates/interface-agent.git"; commit "d4eeb36e409d1a4dd741077bcdf8a2d90cabdb52"; } interface Agent source { repository "https://repos.quixos.org/quixos-templates/interface-agent.git"; commit "865fdf0e2877d86207ff30e1734a9df6194af880"; }
interface AgentRequest source { repository "https://repos.quixos.org/quixos-templates/interface-agent-request.git"; commit "bd6a84cc46b41ba436c7ca38ae18c3ca87c48139"; } interface AgentRequest source { repository "https://repos.quixos.org/quixos-templates/interface-agent-request.git"; commit "e13ce377b9e36db36312d7f0857de25e7a7d19a2"; }
interface AgentItem source { repository "https://repos.quixos.org/quixos-templates/interface-agent-item.git"; commit "655dc485f8295b3818365141d8062d930d9b7a63"; } interface AgentItem source { repository "https://repos.quixos.org/quixos-templates/interface-agent-item.git"; commit "cdfff070a41671e206a14a3ca168a61254e33fe8"; }
interface AgentQuestion source { repository "https://repos.quixos.org/quixos-templates/interface-agent-question.git"; commit "608b15bb70e9e50f22550fa44271b647888bfbca"; } interface AgentQuestion source { repository "https://repos.quixos.org/quixos-templates/interface-agent-question.git"; commit "76d375fa24bedea7d5530f9002b8af75dc7fe263"; }
} }
+8 -55
View File
@@ -144,62 +144,17 @@ function QuestionForm({
</form> </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 }) { function Activity({ item }: { item: Item }) {
const value = activityValue(item), let value: any;
failed = activityFailed(item), try {
title = value?.command ?? value?.label ?? item.data.text ?? "Activity"; value = JSON.parse(item.data.activity ?? "null");
} catch {}
const title = value?.command ?? value?.label ?? item.data.text ?? "Activity";
return ( return (
<details className="agent-activity-card"> <details className="agent-activity-card">
<summary>{failed ? "Tool needs attention" : "Tool details"}</summary> <summary>{String(title).slice(0, 300)}</summary>
<pre>{String(title)}</pre>
<pre>{value?.aggregatedOutput ?? value?.output ?? value?.detail ?? item.data.text}</pre> <pre>{value?.aggregatedOutput ?? value?.output ?? value?.detail ?? item.data.text}</pre>
{value?.exitCode !== undefined && value?.exitCode !== null && <p>Exit code: {value.exitCode}</p>} {value?.exitCode !== undefined && <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} />
))}
</details> </details>
); );
} }
@@ -465,9 +420,7 @@ export function ThreadView({
</time> </time>
)} )}
</div> </div>
{(renderItem ? items : conversationRows(items)).map((row) => { {items.map((item) => {
if (Array.isArray(row)) return <ToolHistory key={itemKey(row[0])} items={row} />;
const item = row;
const custom = renderItem?.(item, request); const custom = renderItem?.(item, request);
return ( return (
<React.Fragment key={itemKey(item)}> <React.Fragment key={itemKey(item)}>
-1
View File
@@ -78,7 +78,6 @@
overflow-wrap: anywhere; overflow-wrap: anywhere;
} }
.agent-activity-card, .agent-activity-card,
.agent-tool-history,
.agent-commentary { .agent-commentary {
border: 1px solid #e0e5ee; border: 1px solid #e0e5ee;
border-radius: 7px; border-radius: 7px;