YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context
Rust agentsagiaiai-memoryaudio-recordingcomputer-visionhermeshermes-agentllmlocal-ailocal-firstmachine-learningmcpmultimodalopenclawprivacyrewindscreen-recordingspeech-to-textycombinator
Merge remote-tracking branch 'origin/main' into codex/agentic-live-view-chat
Louis Beaumontd6064c2dceae
diff --cc apps/screenpipe-app-tauri/components/settings/__tests__/brain-overview.test.tsxindex 89c4f691b,43c56459b..fe8dfafb4--- a/apps/screenpipe-app-tauri/components/settings/__tests__/brain-overview.test.tsx+++ b/apps/screenpipe-app-tauri/components/settings/__tests__/brain-overview.test.tsx@@@ -1325,9 -1375,11 +1384,13 @@@ describe("BrainOverview", () =>);fireEvent.click(screen.getByTestId("overview-apply-ai"));+ expect(await screen.findByText("Replace “My dashboard”?")).toBeTruthy();+ fireEvent.click(screen.getByTestId("overview-confirm-replace"));await waitFor(() => expect(mocks.saveBrainView).toHaveBeenCalledTimes(2));+ expect(mocks.saveBrainView.mock.calls[1][0].periodPolicy).toEqual({+ type: "selectable.v1",+ values: ["today", "24h", "7d", "30d"],+ });expect(mocks.saveBrainView.mock.calls[1][0].slots).toEqual([expect.objectContaining({title: "Time by project",diff --cc apps/screenpipe-app-tauri/lib/live-views/generate-live-view-with-pi.tsindex 8c2caa0c5,630a98939..66a5a5d78--- a/apps/screenpipe-app-tauri/lib/live-views/generate-live-view-with-pi.ts+++ b/apps/screenpipe-app-tauri/lib/live-views/generate-live-view-with-pi.ts@@@ -237,17 -241,15 +260,17 @@@ Allowed componentsAllowed widths are 3, 6, or 12. Prefer 6 for most sections, 12 for timelines or detailed briefs, and 3 only for compact metrics.Only use a pipeName from the available pipes supplied by the user. Use null when none fits. Do not invent pipes.Every section must include an intent: one precise, self-contained sentence describing what the Pipe should calculate, classify, or summarize. The intent is data logic, not display copy. Define percentages and scores explicitly, name the selected-period denominator, require source evidence, and say how to handle unclassified or missing evidence. Never use a vague intent such as "show this metric".-For a whole dashboard, create 4 to 7 distinct sections. Prefer a useful mix with at least one metric, one bar chart, and one list or timeline when the request supports them. Never return placeholder titles such as "test", duplicate sections, or multiple metrics that show the same number.+For a new dashboard, create 4 to 7 distinct sections. When editing a current Live View, preserve its useful existing sections and change only what the user requested; the complete result may contain 1 to 8 sections. Prefer a useful mix with at least one metric, one bar chart, and one list or timeline when the request supports them. Never return placeholder titles such as "test", duplicate sections, or multiple metrics that show the same number.- Choose one timeRange for the whole dashboard: "today", "24h", "7d", or "30d". Infer it from the request. Use "today" when the request does not specify a period. Prefer line-chart.v1 over bar-chart.v1 when the user asks how something changed over time.+ Choose one timeRange for the whole dashboard: "today", "24h", "7d", or "30d". Infer it from the request. Use "today" when the request does not specify a period. Also choose timeRangeBehavior. Use "fixed" only when the dashboard's identity is inherently tied to that exact period, such as a daily memory or a standup for the last 24 hours. Use "selectable" when the same analysis remains useful across different periods. If unsure, use "selectable". This choice is automatic and is never presented to the user as a setup decision. Prefer line-chart.v1 over bar-chart.v1 when the user asks how something changed over time.For one section, return exactly one focused section.Required JSON shape:- {"title":"View title","timeRange":"today","blocks":[{"title":"Section title","intent":"Precise source-backed question or calculation for this section and selected period.","component":"metric.v1","width":6,"pipeName":"exact-installed-pipe-name-or-null"}],"note":"One short sentence explaining what you created"}`;+ {"title":"View title","timeRange":"today","timeRangeBehavior":"selectable","blocks":[{"title":"Section title","intent":"Precise source-backed question or calculation for this section and selected period.","component":"metric.v1","width":6,"pipeName":"exact-installed-pipe-name-or-null"}],"note":"One short sentence explaining what you created"}`;}-function generationPrompt(options: GenerateLiveViewOptions): string {+export function buildLiveViewGenerationPrompt(+ options: GenerateLiveViewOptions,+): string {const scopeInstruction =options.scope === "block"? "Create exactly one new section to add to the existing Live View."