@schlenkr/ragents 0.1.0 → 0.1.2
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.
- package/README.md +10 -4
- package/apps/server/src/plugin-support/language-server/contract.ts +6 -1
- package/apps/server/src/plugin-support/language-server/tools.ts +29 -4
- package/apps/server/src/plugin-support/run-scripts.ts +4 -1
- package/apps/server/src/plugin-support/start-entries-contract.ts +4 -3
- package/apps/server/src/plugin-support/workspace-sandbox-host.ts +2 -0
- package/apps/server/src/profile-target.ts +25 -0
- package/apps/server/src/web-build.ts +82 -0
- package/apps/server/tsconfig.json +38 -0
- package/apps/web/column.html +12 -0
- package/apps/web/index.html +12 -0
- package/apps/web/src/App.tsx +0 -10
- package/apps/web/src/PluginChat.tsx +8 -8
- package/apps/web/src/PluginRegistry.tsx +0 -12
- package/apps/web/src/StartSurface.tsx +2 -2
- package/apps/web/src/ThemeSettings.tsx +1 -1
- package/apps/web/src/column/ColumnApp.tsx +83 -7
- package/apps/web/src/column/clipboard.ts +64 -0
- package/apps/web/src/column/host-contract.ts +10 -0
- package/apps/web/src/column.tsx +2 -0
- package/apps/web/src/panel/LoginForm.tsx +9 -3
- package/apps/web/src/panel/OverviewPage.tsx +187 -62
- package/apps/web/src/panel/PanelDialogs.tsx +115 -0
- package/apps/web/src/panel/PanelPage.tsx +1 -1
- package/apps/web/src/panel/SettingsPage.tsx +75 -79
- package/apps/web/src/panel/contract.ts +17 -9
- package/apps/web/src/panel/target-state.ts +27 -2
- package/apps/web/src/ui/theme.css +4 -0
- package/apps/web/tsconfig.json +41 -0
- package/apps/web/vite.config.ts +140 -0
- package/package.json +6 -2
- package/packages/ragents/src/plugin-host.ts +5 -2
- package/packages/ragents/src/plugin-types.ts +3 -2
- package/packages/workspace-executor/src/context.ts +4 -0
- package/packages/workspace-executor/src/executor.ts +9 -2
- package/packages/workspace-executor/src/index.ts +2 -0
- package/packages/workspace-executor/src/language-server/adapters/fsharp.ts +1 -0
- package/packages/workspace-executor/src/language-server/adapters/roslyn.ts +1 -0
- package/packages/workspace-executor/src/language-server/adapters/typescript.ts +34 -6
- package/packages/workspace-executor/src/language-server/contract.ts +7 -3
- package/packages/workspace-executor/src/language-server/host.ts +275 -138
- package/plugins/ragents.actor-programs/contract.ts +1 -1
- package/plugins/ragents.actor-programs/prompt.hbs +4 -4
- package/plugins/ragents.actor-programs/server/app-project.ts +0 -2
- package/plugins/ragents.actor-programs/server/runtime.ts +1 -1
- package/plugins/ragents.actor-programs/web/AppsPanel.tsx +3 -5
- package/plugins/ragents.actor-programs/web/EmbeddedApps.tsx +7 -39
- package/plugins/ragents.actor-programs/web/api.ts +1 -10
- package/plugins/ragents.lsp-roslyn/web/language-server-plugin.tsx +73 -44
- package/plugins/ragents.orchestration/canvas.hbs +28 -44
- package/plugins/ragents.orchestration/contract.ts +17 -287
- package/plugins/ragents.orchestration/server/canvas-tool.ts +18 -123
- package/plugins/ragents.orchestration/tiled-layout.ts +12 -4
- package/plugins/ragents.orchestration/web/ActorCanvasControls.tsx +23 -47
- package/plugins/ragents.orchestration/web/ActorChatPreview.tsx +3 -9
- package/plugins/ragents.orchestration/web/ActorShortcut.tsx +3 -5
- package/plugins/ragents.orchestration/web/ActorTile.tsx +3 -2
- package/plugins/ragents.orchestration/web/CanvasTiles.tsx +3 -3
- package/plugins/ragents.orchestration/web/Center.tsx +28 -463
- package/plugins/ragents.orchestration/web/MaterialBody.tsx +6 -87
- package/plugins/ragents.orchestration/web/TiledCanvas.tsx +2 -3
- package/plugins/ragents.orchestration/web/canvas-view-settings.ts +7 -13
- package/plugins/ragents.orchestration/web/column/RunColumn.tsx +44 -19
- package/plugins/ragents.orchestration/web/column/column-state.ts +13 -4
- package/plugins/ragents.orchestration/web/constants.ts +0 -2
- package/plugins/ragents.orchestration/web/index.tsx +0 -6
- package/plugins/ragents.orchestration/web/tile-docking.ts +7 -1
- package/plugins/ragents.orchestration/web/tiled-view-settings.ts +7 -9
- package/plugins/ragents.overseer/server/coordinator-prompt.ts +1 -1
- package/plugins/ragents.profile-distribution/server/web.ts +3 -27
- package/plugins/ragents.reference/examples.ts +1 -2
- package/plugins/ragents.reference/run-scripts/balcony-wizard/RUN.md +1 -1
- package/plugins/ragents.reference/run-scripts/balcony-wizard/actors/balcony-app/package.json +1 -1
- package/plugins/ragents.reference/run-scripts/balcony-wizard/src/server.ts +1 -1
- package/plugins/ragents.reference/run-scripts/balcony-wizard/tests/program.test.ts +2 -2
- package/plugins/ragents.reference/run-scripts/conversation-circle/RUN.md +3 -4
- package/plugins/ragents.reference/run-scripts/conversation-circle/src/server.ts +9 -15
- package/plugins/ragents.reference/run-scripts/conversation-circle/tests/program.test.ts +5 -3
- package/plugins/ragents.reference/run-scripts/learning-afternoon/package.json +1 -1
- package/plugins/ragents.reference/run-scripts/learning-afternoon/src/server.ts +14 -4
- package/plugins/ragents.reference/run-scripts/word-game/src/server.ts +1 -1
- package/plugins/ragents.reference/skills/210-moderator-handover/SKILL.md +1 -1
- package/plugins/ragents.reference/walkthroughs.ts +14 -14
- package/plugins/ragents.workspace/client/workspace-client.ts +4 -1
- package/scripts/agent/agent-cli.ts +9 -24
- package/scripts/package/build-package.ts +18 -5
- package/scripts/package/publish-package.ts +24 -10
- package/scripts/package/ragents.mjs +3 -2
- package/scripts/remote/connect.ts +16 -5
- package/scripts/remote/start.ts +33 -15
- package/scripts/workspace-client/run-workspace-client.ts +3 -1
- package/apps/web/src/MaterialSettings.tsx +0 -40
- package/apps/web/src/material-settings.ts +0 -104
- package/plugins/ragents.orchestration/web/ActorNet.tsx +0 -607
- package/plugins/ragents.orchestration/web/CardSizeSettings.tsx +0 -42
- package/plugins/ragents.orchestration/web/ScriptActorCard.tsx +0 -56
- package/plugins/ragents.orchestration/web/ZoomSettings.tsx +0 -38
- package/plugins/ragents.orchestration/web/canvas-layout-storage.ts +0 -39
- package/plugins/ragents.orchestration/web/canvas-layout.ts +0 -326
- package/plugins/ragents.orchestration/web/canvas-scene.ts +0 -311
- package/plugins/ragents.orchestration/web/card-size-settings.ts +0 -36
- package/plugins/ragents.orchestration/web/keyboard-navigation.ts +0 -55
- package/plugins/ragents.orchestration/web/material-layout.ts +0 -14
- package/plugins/ragents.orchestration/web/useCanvasMeasurements.ts +0 -78
- package/plugins/ragents.orchestration/web/zoom-settings.ts +0 -28
- package/plugins/ragents.reference/skills/120-canvas-conversation-circle/SKILL.md +0 -12
- package/plugins/ragents.reference/skills/130-canvas-pipeline-with-approval/SKILL.md +0 -12
- package/plugins/ragents.reference/skills/140-canvas-team-tree-and-topic-grid/SKILL.md +0 -12
|
@@ -2,10 +2,9 @@ import { useAccess } from "@aicontainer/web/AccessContext";
|
|
|
2
2
|
import { useCallback, useEffect, useId, useMemo, useRef, useState } from "react";
|
|
3
3
|
import { useCanvasController, type SessionContext, type SessionHeaderContext } from "@aicontainer/web/PluginRegistry";
|
|
4
4
|
import { UsersIcon } from "lucide-react";
|
|
5
|
-
import {
|
|
5
|
+
import { Input } from "@aicontainer/web/ui";
|
|
6
6
|
import { ToolbarCopy, ToolbarItem, ToolbarLabel, ToolbarText } from "@aicontainer/web/Toolbar";
|
|
7
|
-
import {
|
|
8
|
-
import { actorVisibleOnCanvas, DEFAULT_CANVAS_VIEW_PREFERENCES, type CanvasViewPreferences } from "./canvas-view-settings";
|
|
7
|
+
import { actorVisibleOnCanvas, type CanvasViewPreferences } from "./canvas-view-settings";
|
|
9
8
|
import { runViewFrom, type RunActor } from "./run-view";
|
|
10
9
|
import { ActorPopout } from "./ActorPopout";
|
|
11
10
|
import { ActorShortcut } from "./ActorShortcut";
|
|
@@ -13,7 +12,6 @@ import { ACTOR_HEADER_MODES, ACTOR_HEADER_MODE_LABELS, actorOnStage, actorVisibl
|
|
|
13
12
|
import { useStageEntities } from "./canvas-stage";
|
|
14
13
|
|
|
15
14
|
export interface ActorCanvasControlsProps {
|
|
16
|
-
control: "actors" | "view";
|
|
17
15
|
session: SessionContext;
|
|
18
16
|
appActorIds: ReadonlySet<string>;
|
|
19
17
|
preferences: CanvasViewPreferences;
|
|
@@ -33,10 +31,6 @@ export function filterCanvasActors(actors: readonly RunActor[], appActorIds: Rea
|
|
|
33
31
|
});
|
|
34
32
|
}
|
|
35
33
|
|
|
36
|
-
export function withAppActorVisibility(preferences: CanvasViewPreferences, appActorIds: ReadonlySet<string>, visible: boolean): CanvasViewPreferences {
|
|
37
|
-
return { ...preferences, showAppActors: visible, actorVisibility: Object.fromEntries(Object.entries(preferences.actorVisibility).filter(([id]) => !appActorIds.has(id))) };
|
|
38
|
-
}
|
|
39
|
-
|
|
40
34
|
export function ActorShortcuts({ session }: SessionHeaderContext) {
|
|
41
35
|
const inspect = useAccess().can("runs.inspect");
|
|
42
36
|
const [openKey, setOpenKey] = useState<string>();
|
|
@@ -74,8 +68,8 @@ export function ActorHeaderModeControl({ runId }: { runId: string }) {
|
|
|
74
68
|
</ToolbarItem>;
|
|
75
69
|
}
|
|
76
70
|
|
|
77
|
-
export function ActorCanvasControls({
|
|
78
|
-
const [open, setOpen] = useState
|
|
71
|
+
export function ActorCanvasControls({ session, appActorIds, preferences, onPreferencesChange }: ActorCanvasControlsProps) {
|
|
72
|
+
const [open, setOpen] = useState(false);
|
|
79
73
|
const [query, setQuery] = useState("");
|
|
80
74
|
const buttonRef = useRef<HTMLButtonElement>(null);
|
|
81
75
|
const panelId = useId();
|
|
@@ -84,40 +78,30 @@ export function ActorCanvasControls({ control, session, appActorIds, preferences
|
|
|
84
78
|
const actors = runView?.actors;
|
|
85
79
|
const filtered = useMemo(() => filterCanvasActors(actors ?? [], appActorIds, query), [actors, appActorIds, query]);
|
|
86
80
|
const close = useCallback((restoreFocus = false) => {
|
|
87
|
-
setOpen(
|
|
81
|
+
setOpen(false);
|
|
88
82
|
if (restoreFocus) buttonRef.current?.focus({ preventScroll: true });
|
|
89
83
|
}, []);
|
|
90
84
|
|
|
91
85
|
useEffect(() => { close(); setQuery(""); }, [session.session.id, close]);
|
|
92
86
|
|
|
93
|
-
const
|
|
94
|
-
|
|
95
|
-
"aria-controls
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
{
|
|
111
|
-
<div className="flex flex-none items-center gap-2.5 p-2.5">
|
|
112
|
-
<Input className="flex-1" aria-label="Actors durchsuchen" onChange={(event) => setQuery(event.target.value)} placeholder="Handle, Typ oder Status suchen ..." type="search" value={query} />
|
|
113
|
-
<span className="flex-none whitespace-nowrap text-[0.68rem] text-muted-foreground" role="status">{filtered.length} von {actors?.length ?? 0}</span>
|
|
114
|
-
</div>
|
|
115
|
-
<ActorCanvasList actors={filtered} appActorIds={appActorIds} primaryActorId={runView?.primaryActorId} onInspect={(id) => {
|
|
116
|
-
if (!canvas) throw new Error("Die Actorliste benötigt den Canvas-Controller.");
|
|
117
|
-
canvas.acceptSelection({ type: "actor", id });
|
|
118
|
-
close(true);
|
|
119
|
-
}} onPreferencesChange={onPreferencesChange} preferences={preferences} />
|
|
120
|
-
</> : <CanvasViewOptions appActorIds={appActorIds} onPreferencesChange={onPreferencesChange} preferences={preferences} />}
|
|
87
|
+
const label = `Actors \u00b7 ${actors?.length ?? 0}`;
|
|
88
|
+
return <div className="flex h-full min-w-0 flex-none items-stretch">
|
|
89
|
+
<ToolbarItem as="button" ref={buttonRef} aria-controls={open ? panelId : undefined} aria-expanded={open}
|
|
90
|
+
aria-label={label} title={label} onClick={() => setOpen((value) => !value)} type="button">
|
|
91
|
+
<UsersIcon size={20} /><ToolbarText>Actors</ToolbarText>
|
|
92
|
+
</ToolbarItem>
|
|
93
|
+
{open && <ActorPopout open id={panelId} label="Actors des Runs" closeLabel="Actorliste schließen"
|
|
94
|
+
buttonRef={buttonRef} onClose={close} width={460} height={460}
|
|
95
|
+
placement="bottom" focusInput role="region">
|
|
96
|
+
<div className="flex flex-none items-center gap-2.5 p-2.5">
|
|
97
|
+
<Input className="flex-1" aria-label="Actors durchsuchen" onChange={(event) => setQuery(event.target.value)} placeholder="Handle, Typ oder Status suchen ..." type="search" value={query} />
|
|
98
|
+
<span className="flex-none whitespace-nowrap text-[0.68rem] text-muted-foreground" role="status">{filtered.length} von {actors?.length ?? 0}</span>
|
|
99
|
+
</div>
|
|
100
|
+
<ActorCanvasList actors={filtered} appActorIds={appActorIds} primaryActorId={runView?.primaryActorId} onInspect={(id) => {
|
|
101
|
+
if (!canvas) throw new Error("Die Actorliste benötigt den Canvas-Controller.");
|
|
102
|
+
canvas.acceptSelection({ type: "actor", id });
|
|
103
|
+
close(true);
|
|
104
|
+
}} onPreferencesChange={onPreferencesChange} preferences={preferences} />
|
|
121
105
|
<p className="flex-none border-t border-border-soft px-2.5 py-2.5 text-[0.68rem] text-muted-foreground">Persönliche Ansicht dieses Runs</p>
|
|
122
106
|
</ActorPopout>}
|
|
123
107
|
</div>;
|
|
@@ -149,11 +133,3 @@ export function ActorCanvasList({ actors, appActorIds, primaryActorId, onInspect
|
|
|
149
133
|
</li>)}</ul>}
|
|
150
134
|
</div>;
|
|
151
135
|
}
|
|
152
|
-
|
|
153
|
-
export function CanvasViewOptions({ appActorIds, preferences, onPreferencesChange }: Pick<ActorCanvasControlsProps, "appActorIds" | "preferences" | "onPreferencesChange">) {
|
|
154
|
-
return <div className="flex min-h-0 flex-1 flex-col items-start gap-4.5 overflow-auto overscroll-contain px-3 py-4 [&>label]:flex [&>label]:cursor-pointer [&>label]:items-center [&>label]:gap-2">
|
|
155
|
-
<label><input checked={preferences.showAppActors} onChange={(event) => onPreferencesChange(withAppActorVisibility(preferences, appActorIds, event.target.checked))} type="checkbox" /><span>Actors mit Mini-App anzeigen</span></label>
|
|
156
|
-
<label><input checked={preferences.showConnections} onChange={(event) => onPreferencesChange({ ...preferences, showConnections: event.target.checked })} type="checkbox" /><span>Verbindungen anzeigen</span></label>
|
|
157
|
-
<Button onClick={() => onPreferencesChange(DEFAULT_CANVAS_VIEW_PREFERENCES)} size="sm" variant="ghost">Ansicht zurücksetzen</Button>
|
|
158
|
-
</div>;
|
|
159
|
-
}
|
|
@@ -1,27 +1,21 @@
|
|
|
1
|
-
import { canvasLayoutOf, ORCHESTRATION_PLUGIN_ID } from "../contract";
|
|
2
1
|
import { ActorChat } from "./ActorChat";
|
|
3
2
|
import { ActorChatControls } from "./ActorChatControls";
|
|
4
3
|
import { ChatPanel } from "@aicontainer/web/chat/ChatPanel";
|
|
5
|
-
import { memo, useCallback
|
|
4
|
+
import { memo, useCallback } from "react";
|
|
6
5
|
import type { FlowSelection } from "./FlowInspector";
|
|
7
6
|
import type { RunActor, RunView } from "./run-view";
|
|
8
7
|
import type { Message } from "@aicontainer/web/chat/types";
|
|
9
8
|
|
|
10
|
-
export const ActorChatPreview = memo(function ActorChatPreview({ actor, view, primaryMessages, conversation, historyError, running = false, onNavigate }: {
|
|
9
|
+
export const ActorChatPreview = memo(function ActorChatPreview({ actor, view, primaryMessages, conversation, historyError, chatInput = true, running = false, onNavigate }: {
|
|
11
10
|
actor: RunActor;
|
|
12
11
|
view: RunView;
|
|
13
12
|
primaryMessages?: readonly Message[];
|
|
14
13
|
conversation?: readonly Message[];
|
|
15
14
|
historyError?: string;
|
|
15
|
+
chatInput?: boolean;
|
|
16
16
|
running?: boolean;
|
|
17
17
|
onNavigate: (selection: FlowSelection) => void;
|
|
18
18
|
}) {
|
|
19
|
-
const layoutState = view.pluginStates.find((entry) => entry.pluginId === ORCHESTRATION_PLUGIN_ID && entry.scope.kind === "run")?.state;
|
|
20
|
-
const chatInput = useMemo(() => {
|
|
21
|
-
if (layoutState === undefined) return true;
|
|
22
|
-
const node = canvasLayoutOf(layoutState).nodes.find((entry) => "entity" in entry && entry.entity === `@${actor.handle}`);
|
|
23
|
-
return !node || !("chatInput" in node) || node.chatInput !== false;
|
|
24
|
-
}, [layoutState, actor.handle]);
|
|
25
19
|
const focusableScroller = useCallback((element: HTMLDivElement | null) => {
|
|
26
20
|
if (!element) return;
|
|
27
21
|
element.tabIndex = 0;
|
|
@@ -8,7 +8,6 @@ import { FlowInspector, type FlowSelection } from "./FlowInspector";
|
|
|
8
8
|
import { ActorPopout } from "./ActorPopout";
|
|
9
9
|
import { actorSurface, type RunActor, type RunView } from "./run-view";
|
|
10
10
|
import { useStageEntities } from "./canvas-stage";
|
|
11
|
-
import { useCanvasPresentation } from "./tiled-view-settings";
|
|
12
11
|
import { CANVAS_TILE_DRAG_TYPE } from "./tile-docking";
|
|
13
12
|
|
|
14
13
|
const shortcutIconClass = "grid size-[30px] flex-none place-items-center rounded-lg border border-foreground/15 text-foreground";
|
|
@@ -29,7 +28,6 @@ export function ActorShortcut({ actor, view, session, open, onToggle, onClose, v
|
|
|
29
28
|
onClose: () => void;
|
|
30
29
|
visible: boolean;
|
|
31
30
|
}) {
|
|
32
|
-
const tiled = useCanvasPresentation(session.session.id, view).presentation.mode === "tiled";
|
|
33
31
|
const staged = useStageEntities(session.session.id).has(`@${actor.handle}`);
|
|
34
32
|
const technical = useAccess().can("runs.inspect");
|
|
35
33
|
const [visited, setVisited] = useState(false);
|
|
@@ -54,13 +52,13 @@ export function ActorShortcut({ actor, view, session, open, onToggle, onClose, v
|
|
|
54
52
|
<ToolbarItem as="button" aria-controls={visited ? panelId : undefined} aria-expanded={open} aria-haspopup="dialog"
|
|
55
53
|
aria-label={`${actor.displayName || actor.handle}. ${type}: ${label} öffnen`} className="font-bold"
|
|
56
54
|
data-surface={surface} data-staged={staged || undefined} onClick={() => { setVisited(true); onToggle(); }}
|
|
57
|
-
draggable={
|
|
58
|
-
if (!
|
|
55
|
+
draggable={technical} onDragStart={(event) => {
|
|
56
|
+
if (!technical) { event.preventDefault(); return; }
|
|
59
57
|
event.dataTransfer.setData(CANVAS_TILE_DRAG_TYPE, `@${actor.handle}`);
|
|
60
58
|
event.dataTransfer.effectAllowed = "move";
|
|
61
59
|
close();
|
|
62
60
|
}}
|
|
63
|
-
ref={buttonRef} title={`${type}: ${label} öffnen${
|
|
61
|
+
ref={buttonRef} title={`${type}: ${label} öffnen${technical ? ". Zum Andocken auf eine Kachel ziehen." : ""}`} type="button">
|
|
64
62
|
<span className={cn(shortcutIconClass, staged && shortcutFillClass[surface])}>{actor.kind === "agent" ? <UsersIcon size={20} /> : <CodeIcon size={20} />}</span>
|
|
65
63
|
<ToolbarCopy><ToolbarLabel>@{actor.handle}</ToolbarLabel><ToolbarText>{actor.displayName && actor.displayName !== actor.handle ? actor.displayName : type}</ToolbarText></ToolbarCopy>
|
|
66
64
|
</ToolbarItem>
|
|
@@ -3,16 +3,17 @@ import { ActorChatPreview } from "./ActorChatPreview";
|
|
|
3
3
|
import { cardSectionsClass } from "./constants";
|
|
4
4
|
import type { RunActor, RunView } from "./run-view";
|
|
5
5
|
|
|
6
|
-
export function ActorTile({ actor, view, cardSections, session, navigation, onSelect }: {
|
|
6
|
+
export function ActorTile({ actor, view, cardSections, chatInput, session, navigation, onSelect }: {
|
|
7
7
|
actor: RunActor;
|
|
8
8
|
view: RunView;
|
|
9
9
|
cardSections: readonly CardSectionContribution[];
|
|
10
|
+
chatInput?: boolean;
|
|
10
11
|
session: SessionContext;
|
|
11
12
|
navigation: SessionNavigation;
|
|
12
13
|
onSelect: (selection: EntityReference) => void;
|
|
13
14
|
}) {
|
|
14
15
|
return <div className="flex flex-col overflow-hidden has-[>[data-slot=card-sections]:not(:empty)]:min-h-[260px]">
|
|
15
|
-
<ActorChatPreview actor={actor} view={view} running={actor.lifecycle?.kind === "running"}
|
|
16
|
+
<ActorChatPreview actor={actor} view={view} chatInput={chatInput} running={actor.lifecycle?.kind === "running"}
|
|
16
17
|
conversation={session.actorConversations?.[actor.id]} historyError={session.conversationError}
|
|
17
18
|
onNavigate={onSelect} primaryMessages={actor.id === view.primaryActorId ? session.messages : undefined} />
|
|
18
19
|
<div className={`${cardSectionsClass} max-h-[45%] flex-[0_1_auto] overflow-auto overscroll-contain`} data-slot="card-sections">
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useAccess } from "@aicontainer/web/AccessContext";
|
|
2
2
|
import type { CanvasElementContribution, CardSectionContribution, EntityReference, SessionContext, SessionNavigation } from "@aicontainer/web/PluginRegistry";
|
|
3
|
-
import type
|
|
3
|
+
import { canvasTileChatInput, type CanvasTileNode } from "../tiled-layout";
|
|
4
4
|
import { ActorTile } from "./ActorTile";
|
|
5
5
|
import { FlowInspector } from "./FlowInspector";
|
|
6
6
|
import { TiledCanvas, type CanvasTileItem } from "./TiledCanvas";
|
|
@@ -26,7 +26,7 @@ export function CanvasTiles({ root, onChange, canvasElements, cardSections, sess
|
|
|
26
26
|
title: `${actor.displayName || actor.handle} (@${actor.handle})`,
|
|
27
27
|
surface: actorSurface(view, actor),
|
|
28
28
|
content: actor.kind === "agent"
|
|
29
|
-
? <ActorTile actor={actor} view={view} cardSections={cardSections} session={session} navigation={navigation} onSelect={onSelect} />
|
|
29
|
+
? <ActorTile actor={actor} view={view} cardSections={cardSections} chatInput={canvasTileChatInput(root, `@${actor.handle}`)} session={session} navigation={navigation} onSelect={onSelect} />
|
|
30
30
|
: <FlowInspector view={view} selection={{ type: "actor", id: actor.id }} canGoBack={false} chatSurface="canvas"
|
|
31
31
|
composerVisible={false} onNavigate={onSelect} onBack={() => {}} primaryMessages={session.messages}
|
|
32
32
|
actorConversations={session.actorConversations} conversationError={session.conversationError} primaryRunning={session.running} />,
|
|
@@ -37,7 +37,7 @@ export function CanvasTiles({ root, onChange, canvasElements, cardSections, sess
|
|
|
37
37
|
entity: `app:${definition.id}`,
|
|
38
38
|
title: definition.title ?? definition.id,
|
|
39
39
|
surface: "app",
|
|
40
|
-
content: <Element definition={definition} navigation={navigation} session={session}
|
|
40
|
+
content: <Element definition={definition} navigation={navigation} session={session} />,
|
|
41
41
|
}))),
|
|
42
42
|
];
|
|
43
43
|
const selectedEntity = selected?.type === "run-app" ? `app:${selected.id}`
|