Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,5 @@ opencode.jsonc
.vercel
.env*.local
.claude/*
.security
transcript-analysis
8 changes: 5 additions & 3 deletions apps/app/components.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,16 @@
},
"iconLibrary": "lucide",
"rtl": true,
"menuColor": "inverted-translucent",
"menuAccent": "subtle",
"aliases": {
"components": "@/components",
"utils": "@/lib/utils",
"ui": "@/components/ui",
"lib": "@/lib",
"hooks": "@/hooks"
},
"menuColor": "inverted-translucent",
"menuAccent": "subtle",
"registries": {}
"registries": {
"@ai-elements": "https://ai-sdk.dev/elements/api/registry/{name}.json"
}
}
6 changes: 6 additions & 0 deletions apps/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
"@openwork/ui": "workspace:*",
"@paper-design/shaders-react": "0.0.72",
"@radix-ui/colors": "^3.0.0",
"@radix-ui/react-use-controllable-state": "^1.2.2",
"@shikijs/transformers": "^4.0.2",
"@tanstack/react-query": "^5.90.3",
"@tanstack/react-virtual": "^3.13.23",
Expand All @@ -63,6 +64,7 @@
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"cmdk": "^1.1.1",
"dompurify": "^3.4.5",
"emojilib": "^4.0.3",
"fuzzysort": "^3.1.0",
"jsonc-parser": "^3.2.1",
Expand All @@ -74,10 +76,14 @@
"motion": "^12.38.0",
"react": "catalog:",
"react-dom": "catalog:",
"react-markdown": "^10.1.0",
"react-resizable-panels": "^4.11.0",
"react-router-dom": "^7.14.1",
"remark-breaks": "^4.0.0",
"remark-gfm": "^4.0.1",
"shadcn": "^4.6.0",
"shiki": "^4.0.2",
"streamdown": "^2.5.0",
"tailwind-merge": "^3.5.0",
"tw-animate-css": "^1.4.0",
"xlsx": "^0.18.5",
Expand Down
36 changes: 36 additions & 0 deletions apps/app/scripts/artifacts.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import { describe, expect, it } from "bun:test";
import type { UIMessage } from "ai";

import type { OpenTarget } from "../src/react-app/domains/session/artifacts/open-target";
import { getArtifactsFromMessages } from "../src/lib/artifacts";

describe("getArtifactsFromMessages", () => {
it("uses verified relative targets for absolute attachment paths", () => {
const messages: UIMessage[] = [{
id: "msg_attachment",
role: "assistant",
parts: [{
type: "source-document",
sourceId: "attachment-source",
mediaType: "text/csv",
title: "customers.csv",
filename: "/Users/test/workspace/customers.csv",
}],
}];
const targets: OpenTarget[] = [{
id: "file:customers.csv",
kind: "file",
value: "customers.csv",
name: "customers.csv",
preview: "sheet",
confidence: 95,
reason: "attachment source",
exists: true,
}];

expect(getArtifactsFromMessages(messages, targets)[0]?.legacy_target).toMatchObject({
value: "customers.csv",
exists: true,
});
});
});
35 changes: 35 additions & 0 deletions apps/app/scripts/open-target.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,41 @@ describe("deriveOpenTargets", () => {
expect(targets[0]).toMatchObject({ value: "reports/summary.md", preview: "markdown", confidence: 95 });
});

it("extracts artifact targets from attachment sources", () => {
const targets = deriveOpenTargets([
{
id: "msg_attachment",
role: "assistant",
parts: [{
type: "source-document",
sourceId: "attachment-source",
mediaType: "text/csv",
title: "customers.csv",
filename: "reports/customers.csv",
}],
},
]);

expect(targets[0]).toMatchObject({ value: "reports/customers.csv", preview: "sheet", confidence: 95 });
});

it("keeps URI-backed source documents as URL targets when filename is missing", () => {
const targets = deriveOpenTargets([
{
id: "msg_source",
role: "assistant",
parts: [{
type: "source-document",
sourceId: "url-source",
mediaType: "text/html",
title: "https://example.com/docs/report.html",
}],
},
]);

expect(targets[0]).toMatchObject({ kind: "url", value: "https://example.com/docs/report.html", preview: "browser" });
});

it("does not extract file artifacts from read tool metadata or output", () => {
const targets = deriveOpenTargets([
toolMessage(
Expand Down
27 changes: 26 additions & 1 deletion apps/app/src/app/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,31 @@ select:disabled {
animation: soft-pulse 1.5s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Quick horizontal shake used to nudge the user toward an action (e.g. when
Enter is pressed while a follow-up message needs Steer/Queue selection). */
@keyframes ow-shake {
0%,
100% {
transform: translateX(0);
}
20% {
transform: translateX(-5px);
}
40% {
transform: translateX(5px);
}
60% {
transform: translateX(-3px);
}
80% {
transform: translateX(3px);
}
}

@utility animate-shake {
animation: ow-shake 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

/* Highlight animation for just-saved command */
@keyframes command-highlight {
0% {
Expand Down Expand Up @@ -409,7 +434,7 @@ select:disabled {
--card-foreground: var(--slate-12);
--popover: var(--slate-1);
--popover-foreground: var(--slate-12);
--primary: var(--blue-8);
--primary: var(--blue-10);
--primary-foreground: var(--slate-12);
--secondary: var(--slate-3);
--secondary-foreground: var(--slate-12);
Expand Down
Loading
Loading