File size: 3,782 Bytes
a070805 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 | import { SlashCommandItem } from "#/hooks/chat/use-slash-command";
export const JSON_VIEW_THEME = {
base00: "transparent", // background
base01: "var(--cool-grey-900)", // lighter background
base02: "var(--cool-grey-700)", // selection background
base03: "var(--cool-grey-600)", // comments, invisibles
base04: "var(--cool-grey-500)", // dark foreground
base05: "var(--cool-grey-200)", // default foreground
base06: "var(--cool-grey-100)", // light foreground
base07: "#ffffff", // light background
base08: "#ff5370", // variables, red
base09: "#f78c6c", // integers, orange
base0A: "#ffcb6b", // booleans, yellow
base0B: "#c3e88d", // strings, green
base0C: "#89ddff", // support, cyan
base0D: "#82aaff", // functions, blue
base0E: "#c792ea", // keywords, purple
base0F: "#ff5370", // deprecated, red
};
export const PRODUCT_URL = {
PRODUCTION: "https://app.all-hands.dev",
};
export const SETTINGS_FORM = {
LABEL_CLASSNAME: "text-[11px] font-medium leading-4 tracking-[0.11px]",
};
// Chat input constants
export const CHAT_INPUT = {
HEIGHT_THRESHOLD: 100, // Height in pixels when suggestions should be hidden
};
// UI tolerance constants
export const EPS = 1.5; // px tolerance for "near min" height comparisons
/** The /btw slash command — asks a side question via the ask_agent endpoint. */
export const BTW_COMMAND = "/btw";
/** The /model slash command — lists or switches the conversation's LLM profile. */
export const MODEL_COMMAND = "/model";
/** The /goal slash command — drives the agent toward an objective, judging completion each round. */
export const GOAL_COMMAND = "/goal";
/** The /plan slash command — switches the conversation into Plan mode. */
export const PLAN_COMMAND = "/plan";
/** The /code slash command — switches the conversation back to Code mode. */
export const CODE_COMMAND = "/code";
/** Built-in slash commands surfaced in the menu for V1 conversations. */
export const BUILT_IN_COMMANDS: SlashCommandItem[] = [
{
skill: {
name: "new",
type: "agentskills",
source: null,
content: "Creates a new conversation using the same runtime",
triggers: ["/new"],
},
command: "/new",
},
{
skill: {
name: "btw",
type: "agentskills",
source: null,
content: "Ask the agent a side question without derailing the main task",
triggers: [BTW_COMMAND],
},
command: BTW_COMMAND,
},
{
skill: {
name: "model",
type: "agentskills",
source: null,
content:
"List saved LLM profiles, or switch the conversation LLM profile with /model <name>",
triggers: [MODEL_COMMAND],
},
command: MODEL_COMMAND,
},
{
skill: {
name: "goal",
type: "agentskills",
source: null,
content:
"Drive the agent toward an objective until a judge says it's done — /goal <objective> or /goal --max <n> <objective>",
triggers: [GOAL_COMMAND],
},
command: GOAL_COMMAND,
},
{
skill: {
name: "plan",
type: "agentskills",
source: null,
content:
"Switch the conversation into Plan mode, or start planning immediately with /plan <task>",
triggers: [PLAN_COMMAND],
},
command: PLAN_COMMAND,
},
{
skill: {
name: "code",
type: "agentskills",
source: null,
content:
"Switch the conversation back to Code mode, or resume immediately with /code <task>",
triggers: [CODE_COMMAND],
},
command: CODE_COMMAND,
},
];
// Skill content metadata prefixes
export const METADATA_PREFIXES: readonly string[] = [
"The following information has been included",
"It may or may not be relevant",
"Skill location:",
"(Use this path to resolve",
];
|