Files
cobble/src/dict/bot-dict.ts
T
tbenandClaude Opus 5.5 cc109bc361 Carry conversations into new sessions with a visible summary
- Bots get continue_in_new_session: the bot writes a title and summary,
  the session closes for good (read-only) and the new one opens with the
  summary as a "Carried over from the last session" message that links
  back to the old session.
- Continue in new session (conversation menu, sessions modal) and the
  automatic rollover at the session length do the same; New session now
  starts a fresh, unlinked session.
- Session length is an app setting in Settings > General.
- ?session_id= opens a session; a carried-over one shows a bar linking to
  where the conversation went on instead of the composer.
- The thread can open the previous session above the current one (shown
  only, never in the prompt), and replies get search_past_sessions and
  read_past_session.
- Sessions are named from their opening messages, not their latest, and
  a carried summary is labelled as the earlier session's.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-26 05:35:52 +01:00

247 lines
5.3 KiB
TypeScript

/**
* The palette a bot starts from: a suggested colour and the stone shape that
* goes with it. A bot's colour is free (any `#rrggbb`), so these are only
* the tiles the picker offers and the colours a new bot is given. Shape is
* stored separately (`bots.stone`), so a custom colour keeps its stone.
*/
export const BotHues = [
{
title: "Ember",
value: "ember",
color: "#e4572e",
},
{
title: "Amber",
value: "amber",
color: "#e9a23b",
},
{
title: "Moss",
value: "moss",
color: "#7fae3c",
},
{
title: "Teal",
value: "teal",
color: "#16a394",
},
{
title: "Cobalt",
value: "cobalt",
color: "#3b7dd8",
},
{
title: "Violet",
value: "violet",
color: "#7c5cd6",
},
{
title: "Rose",
value: "rose",
color: "#d6538c",
},
] as const;
/**
* Historical palette name. Kept for `bots.hue`, which is only read as a
* fallback for a bot saved before `color` and `stone` existed.
*/
export type BotHue = (typeof BotHues)[number]["value"];
/**
* The stone shapes. One flat cut each, from the handoff icon set. Shape is
* the bot's own, independent of its colour.
*/
export const BotStoneShapes = [
{
title: "Ember stone",
value: "ember",
},
{
title: "Amber stone",
value: "amber",
},
{
title: "Moss stone",
value: "moss",
},
{
title: "Teal stone",
value: "teal",
},
{
title: "Cobalt stone",
value: "cobalt",
},
{
title: "Violet stone",
value: "violet",
},
{
title: "Rose stone",
value: "rose",
},
] as const;
export type BotStoneShape = (typeof BotStoneShapes)[number]["value"];
export const BotKinds = [
{
title: "Worker",
value: "worker",
},
{
title: "Coordinator",
value: "coordinator",
},
] as const;
export type BotKind = (typeof BotKinds)[number]["value"];
/**
* Every user has exactly one coordinator, created with the account. It
* coordinates the crew and hands work to the other bots.
*/
export const CoordinatorBotName = "Coordinator";
/**
* The `app_settings` key holding the install-wide text appended to every
* bot's prompt, right after its own core instructions.
*/
export const BotSystemPromptAppendSettingKey = "bot_system_prompt_append";
/**
* The `app_settings` key holding the install's own limit on the tool turns
* one chat reply may take. Unset means `AppData.BotReplyMaxToolSteps`.
*/
export const BotReplyMaxToolStepsSettingKey = "bot_reply_max_tool_steps";
/**
* The `app_settings` key holding how many messages a session takes before
* the next user message starts a new one. Unset means
* `AppData.BotSessionMaxMessages`.
*/
export const BotSessionMaxMessagesSettingKey = "bot_session_max_messages";
/**
* A bot's face is its status. There are no badges or spinners.
*/
export const BotFaces = [
{
title: "Idle",
value: "idle",
},
{
title: "Working",
value: "working",
},
{
title: "Done",
value: "done",
},
{
title: "Asleep",
value: "asleep",
},
{
title: "Needs you",
value: "needs-you",
},
] as const;
export type BotFace = (typeof BotFaces)[number]["value"];
export const BotMessageAuthors = [
{
title: "Bot",
value: "bot",
},
{
title: "User",
value: "user",
},
] as const;
export type BotMessageAuthor = (typeof BotMessageAuthors)[number]["value"];
/**
* The emoji a message can be reacted with. Kept small and fixed, so the
* picker stays a row and every reaction reads the same everywhere.
*/
export const BotMessageReactions = [
{
title: "Like",
value: "👍",
},
{
title: "Love",
value: "❤️",
},
{
title: "Laugh",
value: "😂",
},
{
title: "Surprised",
value: "😮",
},
{
title: "Sad",
value: "😢",
},
{
title: "Celebrate",
value: "🎉",
},
] as const;
export type BotMessageReactionEmoji = (typeof BotMessageReactions)[number]["value"];
export const BotTaskStatuses = [
{
title: "Active",
value: "active",
},
{
title: "Done",
value: "done",
},
] as const;
export type BotTaskStatus = (typeof BotTaskStatuses)[number]["value"];
/**
* A conversation (one bot, in its own chat or one workspace) is split into
* sessions so no single history grows without bound. One is active per
* conversation; closed ones can be browsed and reopened.
*/
export const BotSessionStatuses = [
{
title: "Active",
value: "active",
},
{
title: "Closed",
value: "closed",
},
] as const;
export type BotSessionStatus = (typeof BotSessionStatuses)[number]["value"];
export const BotTaskStepStates = [
{
title: "Done",
value: "done",
},
{
title: "Active",
value: "active",
},
{
title: "Pending",
value: "pending",
},
] as const;
export type BotTaskStepState = (typeof BotTaskStepStates)[number]["value"];