Add workspaces, conversation sessions, app-managed computers and pictures
- Rail: Add icon with stacked form modals (bot, workspace, computer), coordinator, recent bots with "See all bots", Workspaces section, and a workspace mode listing only its crew - Workspaces: page for context, bots (per-workspace instructions and memory), computers (default, link, unlink), models and delete; conversations scoped per bot per workspace - Sessions: conversations split into searchable, reopenable sessions with carry-over summaries; sessions and new-session header icons - Computers: created and provisioned over the docker socket, home dir kept at DATA_DIR/computers/<id> after delete; super admins only - Models: workspace settings win over a bot's own, then the defaults - Pictures for bots and workspaces; bots editable from the header - Coordinator tools: update_workspace, set_bot_workspace_instructions Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
@@ -1,16 +1,23 @@
|
||||
import type { BotWithLastMessage } from "@/src/types";
|
||||
import { useContext } from "react";
|
||||
import { AddFlowContext } from "../(data)/add-flow-context";
|
||||
import type { BotWithLastMessage, WorkspaceWithActivity } from "@/src/types";
|
||||
import CoordinatorRow from "./coordinator-row";
|
||||
import BotRow from "./bot-row";
|
||||
import RailBotsSection from "./rail-bots-section";
|
||||
import RailSectionAddButton from "./rail-section-add-button";
|
||||
import RailWorkspacesSection from "./rail-workspaces-section";
|
||||
|
||||
type Props = {
|
||||
bots: BotWithLastMessage[];
|
||||
workspaces: WorkspaceWithActivity[];
|
||||
selected_id?: number;
|
||||
};
|
||||
|
||||
/**
|
||||
* The pinned coordinator, then the crew.
|
||||
* The rail outside workspaces: the pinned coordinator, the crew (the
|
||||
* latest few, then "See all bots"), then the workspaces.
|
||||
*/
|
||||
export default function RailCrewList({ bots, selected_id }: Props) {
|
||||
export default function RailCrewList({ bots, workspaces, selected_id }: Props) {
|
||||
const { openForm } = useContext(AddFlowContext);
|
||||
const coordinator = bots.find((bot) => bot.kind === "coordinator");
|
||||
const workers = bots.filter((bot) => bot.kind !== "coordinator");
|
||||
|
||||
@@ -23,13 +30,15 @@ export default function RailCrewList({ bots, selected_id }: Props) {
|
||||
selected={coordinator.id === selected_id}
|
||||
/>
|
||||
) : null}
|
||||
{workers.map((bot) => (
|
||||
<BotRow
|
||||
key={bot.id}
|
||||
bot={bot}
|
||||
selected={bot.id === selected_id}
|
||||
/>
|
||||
))}
|
||||
<RailBotsSection
|
||||
action={<RailSectionAddButton title="Add a bot" onClick={() => openForm({ kind: "bot" })} />}
|
||||
title="Bots"
|
||||
workers={workers}
|
||||
selected_id={selected_id}
|
||||
hrefFor={(bot) => `/admin/bots/${bot.id}`}
|
||||
empty="No bots yet. Add one for a job you hand out often."
|
||||
/>
|
||||
<RailWorkspacesSection workspaces={workspaces} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user