Download src/utils/constants.ts from SaylorTwift/openhands: direct link, hf CLI and curl.
- Browser
- Download file 3.78 kB
-
https://huggingface.co/SaylorTwift/openhands/resolve/main/src/utils/constants.ts
- Command line
-
hf download hf://SaylorTwift/openhands/src/utils/constants.ts
-
curl -L -o constants.ts https://huggingface.co/SaylorTwift/openhands/resolve/main/src/utils/constants.ts
3.78 kB
| 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", | |
| ]; | |