@declarion/react 0.43.0 → 0.44.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-lib/api/agents.d.ts +3 -2
- package/dist-lib/index.js +8 -5
- package/package.json +1 -1
package/dist-lib/api/agents.d.ts
CHANGED
|
@@ -81,7 +81,8 @@ export interface AgentConversation {
|
|
|
81
81
|
id: string;
|
|
82
82
|
tenant_id: string;
|
|
83
83
|
created_by?: string;
|
|
84
|
-
|
|
84
|
+
agent_id?: string;
|
|
85
|
+
agent?: string;
|
|
85
86
|
agent_version?: string;
|
|
86
87
|
title?: string;
|
|
87
88
|
context?: Record<string, unknown>;
|
|
@@ -97,7 +98,7 @@ export interface AgentConversation {
|
|
|
97
98
|
active_instance?: string;
|
|
98
99
|
}
|
|
99
100
|
export declare function createConversation(input: {
|
|
100
|
-
|
|
101
|
+
agent_id?: string;
|
|
101
102
|
context?: Record<string, unknown>;
|
|
102
103
|
}): Promise<AgentConversation>;
|
|
103
104
|
export declare function sendMessage(text: string, conversationId: string, _seq?: number): Promise<AgentMessage>;
|
package/dist-lib/index.js
CHANGED
|
@@ -2734,7 +2734,7 @@ function Ra({ open: e, onClose: t, onAction: r, mode: i = "default", navigation:
|
|
|
2734
2734
|
async function za(e) {
|
|
2735
2735
|
return (await P("agent_conversation", {
|
|
2736
2736
|
status: "active",
|
|
2737
|
-
...e.
|
|
2737
|
+
...e.agent_id ? { agent_id: e.agent_id } : {},
|
|
2738
2738
|
...e.context ? { context: e.context } : {}
|
|
2739
2739
|
})).data;
|
|
2740
2740
|
}
|
|
@@ -2775,11 +2775,15 @@ async function Wa(e) {
|
|
|
2775
2775
|
await at("agent_conversation", e, { status: "canceling" });
|
|
2776
2776
|
}
|
|
2777
2777
|
async function Ga() {
|
|
2778
|
-
|
|
2778
|
+
let e = await m("agent_conversation", {
|
|
2779
2779
|
sort: "updated_at:desc",
|
|
2780
2780
|
page: 1,
|
|
2781
2781
|
per_page: 50
|
|
2782
|
-
})
|
|
2782
|
+
});
|
|
2783
|
+
return (e.data ?? []).map((t) => ({
|
|
2784
|
+
...t,
|
|
2785
|
+
agent: t.agent_id ? e.$refs?.agent?.[t.agent_id]?.code : void 0
|
|
2786
|
+
}));
|
|
2783
2787
|
}
|
|
2784
2788
|
async function Ka(e) {
|
|
2785
2789
|
await Be("agents.rerun_message_turn", { args: { conversation_id: e } });
|
|
@@ -14816,8 +14820,7 @@ function _d({ open: e, onClose: t, conversations: r, activeId: i, onSelect: a, o
|
|
|
14816
14820
|
}), /* @__PURE__ */ $("div", {
|
|
14817
14821
|
className: "text-xs text-muted-foreground",
|
|
14818
14822
|
children: [
|
|
14819
|
-
e.
|
|
14820
|
-
" · ",
|
|
14823
|
+
e.agent ? `${e.agent} · ` : "",
|
|
14821
14824
|
e.status,
|
|
14822
14825
|
e.token_usage?.cost_cents ? ` · $${(e.token_usage.cost_cents / 100).toFixed(2)}` : ""
|
|
14823
14826
|
]
|