@datalayer/agent-runtimes 0.0.5 → 0.0.8

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.
Files changed (119) hide show
  1. package/README.md +150 -22
  2. package/lib/components/chat/components/AgentDetails.d.ts +15 -2
  3. package/lib/components/chat/components/AgentDetails.js +9 -93
  4. package/lib/components/chat/components/AgentIdentity.d.ts +92 -0
  5. package/lib/components/chat/components/AgentIdentity.js +318 -0
  6. package/lib/components/chat/components/Chat.d.ts +24 -1
  7. package/lib/components/chat/components/Chat.js +41 -19
  8. package/lib/components/chat/components/ChatFloating.d.ts +6 -1
  9. package/lib/components/chat/components/ChatFloating.js +12 -6
  10. package/lib/components/chat/components/ContextDistribution.d.ts +47 -0
  11. package/lib/components/chat/components/ContextDistribution.js +146 -0
  12. package/lib/components/chat/components/ContextUsage.d.ts +33 -0
  13. package/lib/components/chat/components/ContextUsage.js +127 -0
  14. package/lib/components/chat/components/base/ChatBase.d.ts +51 -1
  15. package/lib/components/chat/components/base/ChatBase.js +278 -74
  16. package/lib/components/chat/components/display/ToolCallDisplay.d.ts +16 -2
  17. package/lib/components/chat/components/display/ToolCallDisplay.js +148 -6
  18. package/lib/components/chat/components/display/index.d.ts +1 -1
  19. package/lib/components/chat/components/display/index.js +1 -1
  20. package/lib/components/chat/components/elements/ChatInputPrompt.d.ts +12 -1
  21. package/lib/components/chat/components/elements/ChatInputPrompt.js +8 -3
  22. package/lib/components/chat/components/index.d.ts +3 -0
  23. package/lib/components/chat/components/index.js +3 -0
  24. package/lib/components/chat/components/parts/ToolPart.d.ts +1 -1
  25. package/lib/components/chat/components/parts/ToolPart.js +142 -6
  26. package/lib/components/chat/index.d.ts +1 -1
  27. package/lib/components/chat/index.js +1 -1
  28. package/lib/components/chat/protocols/A2AAdapter.d.ts +9 -0
  29. package/lib/components/chat/protocols/A2AAdapter.js +13 -2
  30. package/lib/components/chat/protocols/ACPAdapter.d.ts +9 -0
  31. package/lib/components/chat/protocols/ACPAdapter.js +13 -2
  32. package/lib/components/chat/protocols/AGUIAdapter.d.ts +9 -0
  33. package/lib/components/chat/protocols/AGUIAdapter.js +19 -1
  34. package/lib/components/chat/protocols/VercelAIAdapter.d.ts +7 -0
  35. package/lib/components/chat/protocols/VercelAIAdapter.js +19 -0
  36. package/lib/components/chat/types/execution.d.ts +78 -0
  37. package/lib/components/chat/types/execution.js +64 -0
  38. package/lib/components/chat/types/index.d.ts +1 -0
  39. package/lib/components/chat/types/index.js +1 -0
  40. package/lib/components/chat/types/protocol.d.ts +9 -0
  41. package/lib/components/ui/pagination.d.ts +2 -2
  42. package/lib/components/ui/pagination.js +4 -4
  43. package/lib/components/ui/resizable.d.ts +4 -4
  44. package/lib/components/ui/resizable.js +4 -4
  45. package/lib/examples/A2UiRestaurantExample.js +2 -2
  46. package/lib/examples/AgUiAgenticExample.js +2 -2
  47. package/lib/examples/AgUiBackendToolRenderingExample.js +2 -2
  48. package/lib/examples/AgUiHaikuGenUIExample.js +2 -2
  49. package/lib/examples/AgUiHumanInTheLoopExample.js +2 -2
  50. package/lib/examples/AgUiSharedStateExample.js +2 -2
  51. package/lib/examples/AgUiToolsBasedGenUIExample.js +2 -2
  52. package/lib/examples/AgentRuntimeCustomExample.js +2 -2
  53. package/lib/examples/AgentRuntimeLexical2Example.js +2 -1
  54. package/lib/examples/AgentRuntimeLexicalExample.js +5 -2
  55. package/lib/examples/AgentRuntimeLexicalSidebarExample.js +4 -2
  56. package/lib/examples/AgentRuntimeNotebookExample.js +1 -1
  57. package/lib/examples/AgentRuntimeStandaloneExample.js +2 -2
  58. package/lib/examples/AgentSpaceFormExample.d.ts +70 -2
  59. package/lib/examples/AgentSpaceFormExample.js +204 -35
  60. package/lib/examples/CopilotKitLexicalExample.js +2 -1
  61. package/lib/examples/components/AgentConfiguration.d.ts +37 -0
  62. package/lib/examples/components/AgentConfiguration.js +239 -8
  63. package/lib/examples/components/Header.d.ts +0 -2
  64. package/lib/examples/components/Header.js +2 -16
  65. package/lib/examples/components/LexicalEditor.js +2 -1
  66. package/lib/examples/components/MockFileBrowser.js +6 -2
  67. package/lib/examples/components/index.d.ts +0 -1
  68. package/lib/examples/components/index.js +0 -1
  69. package/lib/examples/example-selector.js +0 -1
  70. package/lib/examples/index.d.ts +0 -1
  71. package/lib/examples/index.js +0 -1
  72. package/lib/examples/lexical/editorConfig.d.ts +3 -2
  73. package/lib/examples/lexical/editorConfig.js +7 -1
  74. package/lib/examples/lexical/initial-content.json +2210 -0
  75. package/lib/examples/main.js +15 -1
  76. package/lib/identity/IdentityConnect.d.ts +90 -0
  77. package/lib/identity/IdentityConnect.js +316 -0
  78. package/lib/identity/OAuthCallback.d.ts +58 -0
  79. package/lib/identity/OAuthCallback.js +223 -0
  80. package/lib/identity/dcr.d.ts +257 -0
  81. package/lib/identity/dcr.js +282 -0
  82. package/lib/identity/identityStore.d.ts +72 -0
  83. package/lib/identity/identityStore.js +529 -0
  84. package/lib/identity/index.d.ts +46 -0
  85. package/lib/identity/index.js +17 -0
  86. package/lib/identity/pkce.d.ts +30 -0
  87. package/lib/identity/pkce.js +65 -0
  88. package/lib/identity/types.d.ts +293 -0
  89. package/lib/identity/types.js +73 -0
  90. package/lib/identity/useIdentity.d.ts +108 -0
  91. package/lib/identity/useIdentity.js +323 -0
  92. package/lib/index.d.ts +2 -0
  93. package/lib/index.js +2 -0
  94. package/lib/lib/utils.js +1 -1
  95. package/lib/renderers/a2ui/lib/utils.js +1 -1
  96. package/lib/runtime/index.d.ts +35 -0
  97. package/lib/runtime/index.js +40 -0
  98. package/lib/runtime/runtimeStore.d.ts +77 -0
  99. package/lib/runtime/runtimeStore.js +184 -0
  100. package/lib/runtime/types.d.ts +84 -0
  101. package/lib/runtime/types.js +15 -0
  102. package/lib/runtime/useAgentConnection.d.ts +46 -0
  103. package/lib/runtime/useAgentConnection.js +112 -0
  104. package/lib/runtime/useAgentRuntime.d.ts +94 -0
  105. package/lib/runtime/useAgentRuntime.js +125 -0
  106. package/lib/test-setup.d.ts +1 -1
  107. package/lib/test-setup.js +1 -0
  108. package/lib/tools/adapters/agent-runtimes/AgentRuntimesToolAdapter.js +32 -1
  109. package/lib/tools/adapters/agent-runtimes/lexicalHooks.d.ts +6 -0
  110. package/lib/tools/adapters/agent-runtimes/lexicalHooks.js +16 -17
  111. package/package.json +20 -7
  112. package/patches/@datalayer+jupyter-lexical+1.0.8.patch +11628 -0
  113. package/patches/@datalayer+jupyter-react+2.0.2.patch +5338 -0
  114. package/lib/examples/AgentSpaceHomeExample.d.ts +0 -8
  115. package/lib/examples/AgentSpaceHomeExample.js +0 -171
  116. package/lib/examples/components/AgentsDataTable.d.ts +0 -13
  117. package/lib/examples/components/AgentsDataTable.js +0 -74
  118. package/lib/examples/components/Rating.d.ts +0 -14
  119. package/lib/examples/components/Rating.js +0 -12
@@ -1,8 +0,0 @@
1
- import React from 'react';
2
- /**
3
- * Agent Runtimes Example Component
4
- *
5
- * Displays a page with agent tiles using Primer PageHeader component.
6
- */
7
- declare const AgentSpaceHomeExample: React.FC;
8
- export default AgentSpaceHomeExample;
@@ -1,171 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
- /*
3
- * Copyright (c) 2025-2026 Datalayer, Inc.
4
- * Distributed under the terms of the Modified BSD License.
5
- */
6
- import { useState } from 'react';
7
- import { PageHeader, Button, TextInput, ActionMenu, ActionList, Box, Avatar, SegmentedControl, } from '@primer/react';
8
- import { PlusIcon, SearchIcon, KebabHorizontalIcon, TriangleDownIcon, CircleIcon, PauseIcon, } from '@primer/octicons-react';
9
- import { datalayerTheme, DatalayerThemeProvider } from '@datalayer/core';
10
- import { useAgentsStore } from './stores/examplesStore';
11
- import { AgentsDataTable } from './components/AgentsDataTable';
12
- import { Rating } from './components/Rating';
13
- const AgentTile = ({ type, title, description, author, lastEdited, screenshot, status, avatarUrl, stars = 0, notifications = 0, onClick, }) => {
14
- if (type === 'create') {
15
- return (_jsxs(Box, { onClick: onClick, style: {
16
- width: '300px',
17
- height: '200px',
18
- border: '2px dashed var(--borderColor-default)',
19
- borderRadius: '8px',
20
- display: 'flex',
21
- flexDirection: 'column',
22
- alignItems: 'center',
23
- justifyContent: 'center',
24
- cursor: 'pointer',
25
- transition: 'all 0.2s',
26
- background: 'var(--bgColor-default)',
27
- }, onMouseEnter: e => {
28
- e.currentTarget.style.borderColor =
29
- 'var(--borderColor-accent-emphasis)';
30
- e.currentTarget.style.background = 'var(--bgColor-muted)';
31
- }, onMouseLeave: e => {
32
- e.currentTarget.style.borderColor = 'var(--borderColor-default)';
33
- e.currentTarget.style.background = 'var(--bgColor-default)';
34
- }, children: [_jsx(Box, { style: { color: 'var(--fgColor-muted)' }, children: _jsx(PlusIcon, { size: 48 }) }), _jsx(Box, { style: {
35
- marginTop: '12px',
36
- fontSize: '14px',
37
- color: 'var(--fgColor-muted)',
38
- fontWeight: 600,
39
- }, children: "Create new agent space" })] }));
40
- }
41
- return (_jsxs(Box, { onClick: onClick, style: {
42
- width: '300px',
43
- border: '1px solid var(--borderColor-default)',
44
- borderRadius: '8px',
45
- overflow: 'visible',
46
- cursor: 'pointer',
47
- transition: 'all 0.2s',
48
- background: 'var(--bgColor-default)',
49
- position: 'relative',
50
- }, onMouseEnter: e => {
51
- e.currentTarget.style.boxShadow = '0 4px 12px rgba(0,0,0,0.1)';
52
- e.currentTarget.style.transform = 'translateY(-2px)';
53
- }, onMouseLeave: e => {
54
- e.currentTarget.style.boxShadow = 'none';
55
- e.currentTarget.style.transform = 'translateY(0)';
56
- }, children: [notifications > 0 && (_jsx(Box, { style: {
57
- position: 'absolute',
58
- top: '-8px',
59
- right: '-8px',
60
- minWidth: '24px',
61
- height: '24px',
62
- padding: '0 6px',
63
- borderRadius: '12px',
64
- background: '#ef4444',
65
- color: 'white',
66
- fontSize: '13px',
67
- fontWeight: 700,
68
- display: 'flex',
69
- alignItems: 'center',
70
- justifyContent: 'center',
71
- boxShadow: '0 2px 8px rgba(0,0,0,0.3)',
72
- border: '2px solid var(--bgColor-default)',
73
- zIndex: 10,
74
- }, children: notifications })), _jsxs(Box, { style: {
75
- width: '100%',
76
- height: '150px',
77
- background: screenshot
78
- ? `url(${screenshot}) center/cover`
79
- : 'linear-gradient(135deg, #667eea 0%, #764ba2 100%)',
80
- display: 'flex',
81
- alignItems: 'center',
82
- justifyContent: 'center',
83
- color: 'white',
84
- fontSize: '18px',
85
- fontWeight: 600,
86
- position: 'relative',
87
- }, children: [!screenshot && title, status && (_jsx(Box, { style: {
88
- position: 'absolute',
89
- top: '8px',
90
- right: '8px',
91
- display: 'flex',
92
- alignItems: 'center',
93
- gap: '4px',
94
- padding: '4px 8px',
95
- borderRadius: '4px',
96
- background: 'rgba(255, 255, 255, 0.9)',
97
- fontSize: '12px',
98
- fontWeight: 600,
99
- color: status === 'running'
100
- ? 'var(--fgColor-success)'
101
- : 'var(--fgColor-attention)',
102
- }, children: status === 'running' ? (_jsxs(_Fragment, { children: [_jsx(CircleIcon, { size: 12, fill: "var(--fgColor-success)" }), _jsx("span", { children: "Running" })] })) : (_jsxs(_Fragment, { children: [_jsx(PauseIcon, { size: 12 }), _jsx("span", { children: "Paused" })] })) }))] }), _jsxs(Box, { style: { padding: '12px' }, children: [_jsx(Box, { style: {
103
- fontSize: '16px',
104
- fontWeight: 600,
105
- color: 'var(--fgColor-default)',
106
- marginBottom: '8px',
107
- }, children: title }), description && (_jsx(Box, { style: {
108
- fontSize: '13px',
109
- color: 'var(--fgColor-muted)',
110
- marginBottom: '8px',
111
- lineHeight: '1.4',
112
- }, children: description })), _jsxs(Box, { style: {
113
- display: 'flex',
114
- alignItems: 'center',
115
- gap: '12px',
116
- }, children: [avatarUrl && _jsx(Avatar, { src: avatarUrl, size: 40 }), _jsxs(Box, { style: { display: 'flex', flexDirection: 'column', gap: '2px' }, children: [_jsxs(Box, { style: {
117
- fontSize: '12px',
118
- color: 'var(--fgColor-muted)',
119
- }, children: ["by ", author] }), _jsxs(Box, { style: {
120
- fontSize: '12px',
121
- color: 'var(--fgColor-muted)',
122
- }, children: ["Edited ", lastEdited] }), stars > 0 && (_jsx(Box, { style: { marginTop: '4px' }, children: _jsx(Rating, { value: stars, size: 12 }) }))] })] })] })] }));
123
- };
124
- /**
125
- * Agent Runtimes Example Component
126
- *
127
- * Displays a page with agent tiles using Primer PageHeader component.
128
- */
129
- const AgentSpaceHomeExample = () => {
130
- const [searchQuery, setSearchQuery] = useState('');
131
- const [lastEditedFilter, setLastEditedFilter] = useState('Last edited');
132
- const [visibilityFilter, setVisibilityFilter] = useState('Any visibility');
133
- const [statusFilter, setStatusFilter] = useState('Any status');
134
- const [analystFilter, setAnalystFilter] = useState('All analysts');
135
- const [viewMode, setViewMode] = useState('tiles');
136
- // Get agents from store
137
- const agents = useAgentsStore(state => state.agents);
138
- const handleCreateAgent = () => {
139
- // Handle create new agent
140
- };
141
- const handleAgentClick = (agentName) => {
142
- // Handle agent click
143
- void agentName;
144
- };
145
- return (_jsx(DatalayerThemeProvider, { theme: datalayerTheme, children: _jsxs(Box, { style: {
146
- minHeight: '100vh',
147
- background: 'var(--bgColor-default)',
148
- padding: '24px',
149
- }, children: [_jsxs(PageHeader, { role: "banner", "aria-label": "Agent Spaces", sx: { borderBottom: 'none' }, children: [_jsx(PageHeader.TitleArea, { children: _jsx(PageHeader.Title, { children: "Agent Spaces" }) }), _jsx(PageHeader.Actions, { children: _jsxs(ActionMenu, { children: [_jsx(ActionMenu.Anchor, { children: _jsx(Button, { variant: "invisible", leadingVisual: KebabHorizontalIcon, "aria-label": "More options" }) }), _jsx(ActionMenu.Overlay, { children: _jsx(ActionList, { children: _jsx(ActionList.Item, { onSelect: () => {
150
- // Handle add folder
151
- }, children: "Add folder" }) }) })] }) })] }), _jsxs(Box, { style: { padding: '24px' }, children: [_jsxs(Box, { style: {
152
- display: 'flex',
153
- gap: '12px',
154
- marginBottom: '24px',
155
- flexWrap: 'wrap',
156
- alignItems: 'center',
157
- justifyContent: 'space-between',
158
- }, children: [_jsxs(Box, { style: {
159
- display: 'flex',
160
- gap: '12px',
161
- flexWrap: 'wrap',
162
- alignItems: 'center',
163
- flex: 1,
164
- }, children: [_jsx(Box, { style: { flex: '1 1 300px', minWidth: '200px' }, children: _jsx(TextInput, { leadingVisual: SearchIcon, placeholder: "Search agent spaces...", value: searchQuery, onChange: e => setSearchQuery(e.target.value), sx: { width: '100%' } }) }), _jsxs(ActionMenu, { children: [_jsx(ActionMenu.Button, { trailingAction: TriangleDownIcon, children: lastEditedFilter }), _jsx(ActionMenu.Overlay, { children: _jsxs(ActionList, { selectionVariant: "single", children: [_jsx(ActionList.Item, { selected: lastEditedFilter === 'Last edited', onSelect: () => setLastEditedFilter('Last edited'), children: "Last edited" }), _jsx(ActionList.Item, { selected: lastEditedFilter === 'Created date', onSelect: () => setLastEditedFilter('Created date'), children: "Created date" }), _jsx(ActionList.Item, { selected: lastEditedFilter === 'Name', onSelect: () => setLastEditedFilter('Name'), children: "Name" })] }) })] }), _jsxs(ActionMenu, { children: [_jsx(ActionMenu.Button, { trailingAction: TriangleDownIcon, children: visibilityFilter }), _jsx(ActionMenu.Overlay, { children: _jsxs(ActionList, { selectionVariant: "single", children: [_jsx(ActionList.Item, { selected: visibilityFilter === 'Any visibility', onSelect: () => setVisibilityFilter('Any visibility'), children: "Any visibility" }), _jsx(ActionList.Item, { selected: visibilityFilter === 'Public', onSelect: () => setVisibilityFilter('Public'), children: "Public" }), _jsx(ActionList.Item, { selected: visibilityFilter === 'Private', onSelect: () => setVisibilityFilter('Private'), children: "Private" })] }) })] }), _jsxs(ActionMenu, { children: [_jsx(ActionMenu.Button, { trailingAction: TriangleDownIcon, children: statusFilter }), _jsx(ActionMenu.Overlay, { children: _jsxs(ActionList, { selectionVariant: "single", children: [_jsx(ActionList.Item, { selected: statusFilter === 'Any status', onSelect: () => setStatusFilter('Any status'), children: "Any status" }), _jsx(ActionList.Item, { selected: statusFilter === 'Active', onSelect: () => setStatusFilter('Active'), children: "Active" }), _jsx(ActionList.Item, { selected: statusFilter === 'Draft', onSelect: () => setStatusFilter('Draft'), children: "Draft" }), _jsx(ActionList.Item, { selected: statusFilter === 'Archived', onSelect: () => setStatusFilter('Archived'), children: "Archived" })] }) })] }), _jsxs(ActionMenu, { children: [_jsx(ActionMenu.Button, { trailingAction: TriangleDownIcon, children: analystFilter }), _jsx(ActionMenu.Overlay, { children: _jsxs(ActionList, { selectionVariant: "single", children: [_jsx(ActionList.Item, { selected: analystFilter === 'All analysts', onSelect: () => setAnalystFilter('All analysts'), children: "All analysts" }), _jsx(ActionList.Item, { selected: analystFilter === 'Eric Charles', onSelect: () => setAnalystFilter('Eric Charles'), children: "Eric Charles" }), _jsx(ActionList.Item, { selected: analystFilter === 'Other users', onSelect: () => setAnalystFilter('Other users'), children: "Other users" })] }) })] })] }), _jsxs(SegmentedControl, { "aria-label": "View mode", onChange: index => setViewMode(index === 0 ? 'tiles' : 'table'), children: [_jsx(SegmentedControl.Button, { selected: viewMode === 'tiles', children: "Tiles" }), _jsx(SegmentedControl.Button, { selected: viewMode === 'table', children: "Table" })] })] }), viewMode === 'tiles' && (_jsxs(Box, { style: {
165
- display: 'grid',
166
- gridTemplateColumns: 'repeat(auto-fill, minmax(300px, 1fr))',
167
- gap: '24px',
168
- marginBottom: '48px',
169
- }, children: [_jsx(AgentTile, { type: "create", onClick: handleCreateAgent }), agents.map(agent => (_jsx(AgentTile, { type: "agent", title: agent.name, description: agent.description, author: agent.author, lastEdited: agent.lastEdited, screenshot: agent.screenshot, status: agent.status, avatarUrl: agent.avatarUrl, stars: agent.stars, notifications: agent.notifications, onClick: () => handleAgentClick(agent.name) }, agent.id)))] })), viewMode === 'table' && (_jsx(Box, { children: _jsx(AgentsDataTable, {}) }))] })] }) }));
170
- };
171
- export default AgentSpaceHomeExample;
@@ -1,13 +0,0 @@
1
- import React from 'react';
2
- interface AgentsDataTableProps {
3
- onToggleStatus?: (agentId: string) => void;
4
- showAuthor?: boolean;
5
- showLastEdited?: boolean;
6
- }
7
- /**
8
- * Agents Data Table Component
9
- *
10
- * Displays agents in a table format with status controls.
11
- */
12
- export declare const AgentsDataTable: React.FC<AgentsDataTableProps>;
13
- export {};
@@ -1,74 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { IconButton, Avatar, Box } from '@primer/react';
3
- import { PlayIcon, PauseIcon } from '@primer/octicons-react';
4
- import { useAgentsStore } from '../stores/examplesStore';
5
- /**
6
- * Agents Data Table Component
7
- *
8
- * Displays agents in a table format with status controls.
9
- */
10
- export const AgentsDataTable = ({ onToggleStatus, showAuthor = true, showLastEdited = true, }) => {
11
- const agents = useAgentsStore(state => state.agents);
12
- const toggleAgentStatus = useAgentsStore(state => state.toggleAgentStatus);
13
- const handleToggle = (agentId) => {
14
- toggleAgentStatus(agentId);
15
- onToggleStatus?.(agentId);
16
- };
17
- return (_jsx(Box, { sx: {
18
- border: '1px solid',
19
- borderColor: 'border.default',
20
- borderRadius: 2,
21
- overflow: 'hidden',
22
- }, children: _jsxs("table", { style: {
23
- width: '100%',
24
- borderCollapse: 'collapse',
25
- }, children: [_jsx("thead", { style: {
26
- backgroundColor: 'var(--bgColor-muted)',
27
- borderBottom: '1px solid var(--borderColor-default)',
28
- }, children: _jsxs("tr", { children: [_jsx("th", { style: {
29
- padding: '12px 16px',
30
- textAlign: 'left',
31
- fontWeight: 600,
32
- fontSize: '14px',
33
- }, children: "Agent" }), showAuthor && (_jsx("th", { style: {
34
- padding: '12px 16px',
35
- textAlign: 'left',
36
- fontWeight: 600,
37
- fontSize: '14px',
38
- }, children: "Author" })), showLastEdited && (_jsx("th", { style: {
39
- padding: '12px 16px',
40
- textAlign: 'left',
41
- fontWeight: 600,
42
- fontSize: '14px',
43
- }, children: "Last Edited" })), _jsx("th", { style: {
44
- padding: '12px 16px',
45
- textAlign: 'left',
46
- fontWeight: 600,
47
- fontSize: '14px',
48
- }, children: "Status" }), _jsx("th", { style: {
49
- padding: '12px 16px',
50
- textAlign: 'left',
51
- fontWeight: 600,
52
- fontSize: '14px',
53
- }, children: "Actions" })] }) }), _jsx("tbody", { children: agents.map(agent => (_jsxs("tr", { style: {
54
- borderBottom: '1px solid var(--borderColor-default)',
55
- }, children: [_jsx("td", { style: { padding: '12px 16px' }, children: _jsxs("div", { style: {
56
- display: 'flex',
57
- alignItems: 'center',
58
- gap: '12px',
59
- }, children: [_jsx(Avatar, { src: agent.avatarUrl, size: 32 }), _jsx("span", { style: { fontWeight: 600 }, children: agent.name })] }) }), showAuthor && (_jsx("td", { style: { padding: '12px 16px' }, children: _jsx("span", { style: { color: 'var(--fgColor-muted)' }, children: agent.author }) })), showLastEdited && (_jsx("td", { style: { padding: '12px 16px' }, children: _jsx("span", { style: { color: 'var(--fgColor-muted)' }, children: agent.lastEdited }) })), _jsx("td", { style: { padding: '12px 16px' }, children: _jsx("span", { style: {
60
- display: 'inline-flex',
61
- alignItems: 'center',
62
- gap: '6px',
63
- padding: '2px 8px',
64
- borderRadius: '12px',
65
- fontSize: '12px',
66
- fontWeight: 500,
67
- backgroundColor: agent.status === 'running'
68
- ? 'var(--bgColor-success-muted)'
69
- : 'var(--bgColor-attention-muted)',
70
- color: agent.status === 'running'
71
- ? 'var(--fgColor-success)'
72
- : 'var(--fgColor-attention)',
73
- }, children: agent.status === 'running' ? 'Running' : 'Paused' }) }), _jsx("td", { style: { padding: '12px 16px' }, children: _jsx(IconButton, { icon: agent.status === 'running' ? PauseIcon : PlayIcon, "aria-label": agent.status === 'running' ? 'Pause agent' : 'Start agent', onClick: () => handleToggle(agent.id), variant: "invisible" }) })] }, agent.id))) })] }) }));
74
- };
@@ -1,14 +0,0 @@
1
- import React from 'react';
2
- interface RatingProps {
3
- /** Rating value between 1 and 5 */
4
- value: number;
5
- /** Size of the stars */
6
- size?: number;
7
- }
8
- /**
9
- * Rating Component
10
- *
11
- * Displays a star rating using octicons.
12
- */
13
- export declare const Rating: React.FC<RatingProps>;
14
- export {};
@@ -1,12 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { Box } from '@datalayer/primer-addons';
3
- import { StarFillIcon } from '@primer/octicons-react';
4
- /**
5
- * Rating Component
6
- *
7
- * Displays a star rating using octicons.
8
- */
9
- export const Rating = ({ value, size = 12 }) => {
10
- const clampedValue = Math.max(1, Math.min(5, value));
11
- return (_jsx(Box, { sx: { display: 'flex', gap: 0.5, alignItems: 'center' }, children: Array.from({ length: 5 }, (_, index) => (_jsx(StarFillIcon, { size: size, fill: index < clampedValue ? '#fbbf24' : '#e5e7eb' }, index))) }));
12
- };