Let workers ask each other through the coordinator in chatrooms
A worker asks for another bot's help with ask_crew. The coordinator reads the request, asks the right bot (in a workspace, only its members), and sends the answer back into the asking bot's conversation, waking it. Each exchange is kept as a read-only chatroom: listed in the main rail after the workspaces, or in the workspace's rail for requests made there, with live status rows for each bot while it's open and a Stop button. Room sessions are hidden from every conversation list, other bots' words reach the model fenced as data, and turns, nesting and open rooms are capped. Closed rooms are pruned after a retention period and past a cap per place (Settings > General). Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
import BotAvatar from "@/src/components/general/bot-avatar";
|
||||
import botStoneProps from "@/src/utils/bot-stone-props";
|
||||
import type { ChatroomBot } from "@/src/types";
|
||||
|
||||
type Props = {
|
||||
bot: ChatroomBot;
|
||||
size?: number;
|
||||
/**
|
||||
* Its face while it works in the room (left out, the resting face).
|
||||
*/
|
||||
face?: "working" | "idle";
|
||||
};
|
||||
|
||||
/**
|
||||
* One bot of a chatroom, drawn as its stone (or picture). The coordinator
|
||||
* stays hue-less.
|
||||
*/
|
||||
export default function ChatroomStone({ bot, size = 18, face }: Props) {
|
||||
return (
|
||||
<BotAvatar
|
||||
image_media_id={bot.image_media_id}
|
||||
{...botStoneProps({ color: bot.color, stone: bot.stone, hue: bot.hue })}
|
||||
label={bot.name || ""}
|
||||
size={size}
|
||||
face={face}
|
||||
/>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
import Row from "@moduletrace/twui/layout/Row";
|
||||
import { twMerge } from "tailwind-merge";
|
||||
import type { ChatroomBot } from "@/src/types";
|
||||
import ChatroomStone from "./chatroom-stone";
|
||||
|
||||
type Props = {
|
||||
bots: ChatroomBot[];
|
||||
size?: number;
|
||||
className?: string;
|
||||
};
|
||||
|
||||
/**
|
||||
* The bots in a chatroom side by side, asking bot first: stones never
|
||||
* overlap, sit in a badge or get an outline.
|
||||
*/
|
||||
export default function ChatroomStones({ bots, size = 18, className }: Props) {
|
||||
return (
|
||||
<Row className={twMerge("shrink-0 gap-1! flex-nowrap items-center", className)}>
|
||||
{bots.map((bot) => (
|
||||
<ChatroomStone key={bot.id} bot={bot} size={size} />
|
||||
))}
|
||||
</Row>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user