Skip to content

Commit 6bb920b

Browse files
committed
fix package builds for shared AI components
1 parent b44c17c commit 6bb920b

46 files changed

Lines changed: 1115 additions & 140 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

bun.lock

Lines changed: 1017 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/ai/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@
2222
"typecheck": "tsc --noEmit"
2323
},
2424
"dependencies": {
25-
"@spaceui/primitives": "workspace:*",
25+
"@spaceui/primitives": "file:../primitives",
26+
"@phosphor-icons/react": "^2.1.0",
2627
"react-markdown": "^9.0.0",
2728
"remark-gfm": "^4.0.0",
2829
"rehype-raw": "^7.0.0",

packages/ai/src/AutonomyPanel.tsx

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { clsx } from 'clsx';
22
import { forwardRef, useState } from 'react';
3-
import { Shield, ShieldAlert, ShieldCheck, AlertCircle, CheckCircle2 } from '@phosphor-icons/react';
4-
import { Card, CardContent, CardHeader, CardTitle, Badge, Button, Slider, Switch } from '@spaceui/primitives';
3+
import { Shield, ShieldCheck, WarningCircle, XCircle, CheckCircle } from '@phosphor-icons/react';
4+
import { Card, CardContent, CardHeader, CardTitle, Badge, Button, Slider } from '@spaceui/primitives';
55

66
interface AutonomyLevel {
77
level: 'manual' | 'assisted' | 'semi' | 'full';
@@ -27,13 +27,13 @@ const autonomyLevels: AutonomyLevel[] = [
2727
level: 'semi',
2828
label: 'Semi-Autonomous',
2929
description: 'Execute safe actions, ask for permission on destructive ones',
30-
icon: ShieldAlert,
30+
icon: WarningCircle,
3131
},
3232
{
3333
level: 'full',
3434
label: 'Full Autonomy',
3535
description: 'Execute all actions independently',
36-
icon: AlertCircle,
36+
icon: WarningCircle,
3737
},
3838
];
3939

@@ -58,9 +58,10 @@ const AutonomyPanel = forwardRef<HTMLDivElement, AutonomyPanelProps>(
5858
const currentLevelIndex = autonomyLevels.findIndex((l) => l.level === currentLevel);
5959
const [selectedLevel, setSelectedLevel] = useState(currentLevelIndex);
6060

61-
const handleLevelChange = (value: number) => {
62-
setSelectedLevel(value);
63-
onLevelChange?.(autonomyLevels[value].level);
61+
const handleLevelChange = (value: number[]) => {
62+
const nextLevel = value[0] ?? 0;
63+
setSelectedLevel(nextLevel);
64+
onLevelChange?.(autonomyLevels[nextLevel].level);
6465
};
6566

6667
return (
@@ -71,8 +72,8 @@ const AutonomyPanel = forwardRef<HTMLDivElement, AutonomyPanelProps>(
7172
</CardHeader>
7273
<CardContent className="space-y-4">
7374
<Slider
74-
value={selectedLevel}
75-
onChange={handleLevelChange}
75+
value={[selectedLevel]}
76+
onValueChange={handleLevelChange}
7677
min={0}
7778
max={3}
7879
step={1}
@@ -147,7 +148,7 @@ const AutonomyPanel = forwardRef<HTMLDivElement, AutonomyPanelProps>(
147148
className="size-7 text-status-error hover:text-status-error"
148149
onClick={() => onDeny(request.id)}
149150
>
150-
<AlertCircle className="size-4" />
151+
<XCircle className="size-4" />
151152
</Button>
152153
)}
153154
{onApprove && (
@@ -157,7 +158,7 @@ const AutonomyPanel = forwardRef<HTMLDivElement, AutonomyPanelProps>(
157158
className="size-7 text-status-success hover:text-status-success"
158159
onClick={() => onApprove(request.id)}
159160
>
160-
<CheckCircle2 className="size-4" />
161+
<CheckCircle className="size-4" />
161162
</Button>
162163
)}
163164
</div>

packages/ai/src/ConnectionStatus.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { clsx } from 'clsx';
22
import { forwardRef } from 'react';
3-
import { Wifi, WifiSlash, Spinner } from '@phosphor-icons/react';
3+
import { WifiHigh, WifiSlash, Spinner } from '@phosphor-icons/react';
44

55
interface ConnectionStatusProps {
66
status: 'connected' | 'connecting' | 'offline' | 'error';
@@ -12,7 +12,7 @@ const ConnectionStatus = forwardRef<HTMLDivElement, ConnectionStatusProps>(
1212
({ status, className, showLabel = true }, ref) => {
1313
const config = {
1414
connected: {
15-
icon: Wifi,
15+
icon: WifiHigh,
1616
label: 'Connected',
1717
color: 'text-status-success',
1818
bgColor: 'bg-status-success/10',

packages/ai/src/CronJobList.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { clsx } from 'clsx';
22
import { forwardRef, useState } from 'react';
3-
import { Plus, Play, Pause, Trash2, Clock, CheckCircle, History } from '@phosphor-icons/react';
3+
import { Plus, Play, Pause, Trash, Clock, CheckCircle, ClockCounterClockwise } from '@phosphor-icons/react';
44
import { Card, CardContent, Button, Badge, Switch } from '@spaceui/primitives';
5-
import type { CronJobInfo } from '../types';
5+
import type { CronJobInfo } from './types';
66

77
interface CronJobListProps {
88
jobs: CronJobInfo[];
@@ -87,7 +87,7 @@ const CronJobList = forwardRef<HTMLDivElement, CronJobListProps>(
8787
className="size-7"
8888
onClick={() => setExpandedJob(isExpanded ? null : job.id)}
8989
>
90-
<History className="size-4" />
90+
<ClockCounterClockwise className="size-4" />
9191
</Button>
9292

9393
{onRunJob && job.status === 'active' && (
@@ -108,7 +108,7 @@ const CronJobList = forwardRef<HTMLDivElement, CronJobListProps>(
108108
className="size-7 text-status-error hover:text-status-error"
109109
onClick={() => onDeleteJob(job.id)}
110110
>
111-
<Trash2 className="size-4" />
111+
<Trash className="size-4" />
112112
</Button>
113113
)}
114114
</div>

packages/ai/src/InlineWorkerCard.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { clsx } from 'clsx';
22
import { forwardRef, useState } from 'react';
3-
import { CaretDown, CaretRight, Copy, X, CheckCircle, Terminal } from '@phosphor-icons/react';
3+
import { CaretDown, CaretRight, Copy, X, Terminal } from '@phosphor-icons/react';
44
import { Card, CardContent, Badge, Button } from '@spaceui/primitives';
55
import { ToolCall } from './ToolCall';
66
import type { ToolCallPair, TranscriptStep, TaskInfo } from './types';
@@ -65,7 +65,7 @@ const InlineWorkerCard = forwardRef<HTMLDivElement, InlineWorkerCardProps>(
6565

6666
{expanded && (
6767
<div className="mt-3 space-y-2 border-t border-app-line pt-3">
68-
{pairs.map(([action, result], index) => {
68+
{pairs.map(([action, result], _index) => {
6969
if (!action) return null;
7070

7171
const toolCall: ToolCallPair = {

packages/ai/src/MemoryGraph.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { clsx } from 'clsx';
2-
import { forwardRef, lazy, Suspense } from 'react';
3-
import type { MemoryInfo } from '../types';
2+
import { forwardRef, Suspense } from 'react';
3+
import type { MemoryInfo } from './types';
44

55
interface MemoryGraphProps {
66
memories: MemoryInfo[];
@@ -10,7 +10,7 @@ interface MemoryGraphProps {
1010

1111
// Lazy loaded component for Sigma.js integration
1212
const MemoryGraphContent = forwardRef<HTMLDivElement, MemoryGraphProps>(
13-
({ memories, onNodeClick, className }, ref) => {
13+
({ memories, onNodeClick: _onNodeClick, className }, ref) => {
1414
// Placeholder for Sigma.js graph visualization
1515
// This would be implemented with @react-sigma/core in a real app
1616
return (

packages/ai/src/MemoryList.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { clsx } from 'clsx';
22
import { forwardRef, useState } from 'react';
3-
import { Search, Filter, Trash2, Pencil } from '@phosphor-icons/react';
3+
import { MagnifyingGlass, Funnel, Trash, Pencil } from '@phosphor-icons/react';
44
import { Card, CardContent, Badge, Button, Input } from '@spaceui/primitives';
5-
import type { MemoryInfo } from '../types';
5+
import type { MemoryInfo } from './types';
66

77
interface MemoryListProps {
88
memories: MemoryInfo[];
@@ -35,7 +35,7 @@ const MemoryList = forwardRef<HTMLDivElement, MemoryListProps>(
3535
<div ref={ref} className={clsx('space-y-4', className)}>
3636
<div className="flex items-center gap-2">
3737
<div className="relative flex-1">
38-
<Search className="absolute left-3 top-1/2 size-4 -translate-y-1/2 text-ink-faint" />
38+
<MagnifyingGlass className="absolute left-3 top-1/2 size-4 -translate-y-1/2 text-ink-faint" />
3939
<Input
4040
placeholder="Search memories..."
4141
value={search}
@@ -48,7 +48,7 @@ const MemoryList = forwardRef<HTMLDivElement, MemoryListProps>(
4848
size="icon"
4949
onClick={() => setTypeFilter(null)}
5050
>
51-
<Filter className="size-4" />
51+
<Funnel className="size-4" />
5252
</Button>
5353
</div>
5454

@@ -134,7 +134,7 @@ const MemoryList = forwardRef<HTMLDivElement, MemoryListProps>(
134134
onMemoryDelete(memory);
135135
}}
136136
>
137-
<Trash2 className="size-3.5" />
137+
<Trash className="size-3.5" />
138138
</Button>
139139
)}
140140
</div>

packages/ai/src/ModelSelect.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { clsx } from 'clsx';
22
import { forwardRef, useState } from 'react';
3-
import { Check, Search, Brain, Wrench } from '@phosphor-icons/react';
3+
import { Check, MagnifyingGlass, Brain, Wrench } from '@phosphor-icons/react';
44
import { Popover, PopoverContent, PopoverTrigger, Button, Badge } from '@spaceui/primitives';
55
import type { ModelOption } from './types';
66

@@ -73,7 +73,7 @@ const ModelSelect = forwardRef<HTMLButtonElement, ModelSelectProps>(
7373
</PopoverTrigger>
7474
<PopoverContent className="w-[300px] p-0">
7575
<div className="flex items-center border-b border-menu-line px-3 py-2">
76-
<Search className="mr-2 size-4 text-ink-faint" />
76+
<MagnifyingGlass className="mr-2 size-4 text-ink-faint" />
7777
<input
7878
placeholder="Search models..."
7979
className="flex-1 bg-transparent text-sm text-ink placeholder:text-ink-faint focus:outline-none"

packages/ai/src/TaskBoard.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { clsx } from 'clsx';
22
import { forwardRef } from 'react';
3-
import type { TaskInfo } from '../types';
3+
import type { TaskInfo } from './types';
44

55
interface TaskBoardProps {
66
tasks: TaskInfo[];
@@ -10,7 +10,7 @@ interface TaskBoardProps {
1010
}
1111

1212
const TaskBoard = forwardRef<HTMLDivElement, TaskBoardProps>(
13-
({ tasks, onTaskMove, onTaskClick, className }, ref) => {
13+
({ tasks, onTaskMove: _onTaskMove, onTaskClick, className }, ref) => {
1414
const columns = ['pending_approval', 'backlog', 'ready', 'in_progress', 'done'];
1515

1616
const tasksByStatus = columns.reduce((acc, status) => {

0 commit comments

Comments
 (0)