(null);
+
+ const handleGenerateSolution = async (painId: string) => {
+ setGenerating(painId);
+ try {
+ await generateButlerSolution(painId);
+ onGenerate?.();
+ } catch {
+ onGenerate?.();
+ } finally {
+ setGenerating(null);
+ }
+ };
if (painPoints.length === 0) {
return (
@@ -112,6 +127,22 @@ export function InsightsSection({ painPoints }: InsightsSectionProps) {
|
最近: {new Date(pp.last_seen).toLocaleDateString()}
+ {(pp.status === 'confirmed' || pp.status === 'detected') && pp.confidence >= 0.7 && (
+
+
+
+ )}
)}
diff --git a/desktop/src/components/ButlerPanel/MemorySection.tsx b/desktop/src/components/ButlerPanel/MemorySection.tsx
index ce7dea7..2ef9545 100644
--- a/desktop/src/components/ButlerPanel/MemorySection.tsx
+++ b/desktop/src/components/ButlerPanel/MemorySection.tsx
@@ -20,7 +20,7 @@ export function MemorySection({ agentId }: MemorySectionProps) {
if (!agentId) return;
setLoading(true);
- listVikingResources(`viking://agents/${agentId}/memories/`)
+ listVikingResources(`viking://agent/${agentId}/memories/`)
.then((entries) => {
setMemories(entries as MemoryEntry[]);
})
diff --git a/desktop/src/components/ButlerPanel/index.tsx b/desktop/src/components/ButlerPanel/index.tsx
index ee2c500..0052b0d 100644
--- a/desktop/src/components/ButlerPanel/index.tsx
+++ b/desktop/src/components/ButlerPanel/index.tsx
@@ -37,7 +37,7 @@ export function ButlerPanel({ agentId }: ButlerPanelProps) {
我最近在关注
-
+
{/* Proposals section */}
diff --git a/desktop/src/hooks/useButlerInsights.ts b/desktop/src/hooks/useButlerInsights.ts
index 0ad9e99..8e1d0fd 100644
--- a/desktop/src/hooks/useButlerInsights.ts
+++ b/desktop/src/hooks/useButlerInsights.ts
@@ -45,10 +45,6 @@ export function useButlerInsights(agentId: string | undefined): ButlerInsightsSt
setError(errors.join('; '));
}
})
- .then(([pains, props]) => {
- setPainPoints(pains);
- setProposals(props);
- })
.finally(() => setLoading(false));
}, [agentId]);