prompt.ts
tools/SleepTool/prompt.ts
18
Lines
774
Bytes
3
Exports
1
Imports
10
Keywords
What this is
This page documents one file from the repository and includes its full source so you can read it without leaving the docs site.
Beginner explanation
This file is part of the tool layer, which means it describes actions the system can perform for the user or model.
How it is used
Start from the exports list and related files. Those are the easiest clues for where this file fits into the system.
Expert explanation
Architecturally, this file intersects with tool-system. It contains 18 lines, 1 detected imports, and 3 detected exports.
Important relationships
- buddy/prompt.ts
- services/compact/prompt.ts
- tools/AgentTool/prompt.ts
- tools/AskUserQuestionTool/prompt.ts
- tools/BashTool/prompt.ts
- tools/BriefTool/prompt.ts
- tools/ConfigTool/prompt.ts
- tools/EnterPlanModeTool/prompt.ts
- tools/EnterWorktreeTool/prompt.ts
- tools/ExitPlanModeTool/prompt.ts
- tools/ExitWorktreeTool/prompt.ts
- tools/FileEditTool/prompt.ts
Detected exports
SLEEP_TOOL_NAMEDESCRIPTIONSLEEP_TOOL_PROMPT
Keywords
sleepwhentick_tagwaitspecifieddurationusercallconstantssleep_tool_name
Detected imports
../../constants/xml.js
Source notes
This page embeds the full file contents. Small or leaf files are still indexed honestly instead of being over-explained.
Full source
import { TICK_TAG } from '../../constants/xml.js'
export const SLEEP_TOOL_NAME = 'Sleep'
export const DESCRIPTION = 'Wait for a specified duration'
export const SLEEP_TOOL_PROMPT = `Wait for a specified duration. The user can interrupt the sleep at any time.
Use this when the user tells you to sleep or rest, when you have nothing to do, or when you're waiting for something.
You may receive <${TICK_TAG}> prompts — these are periodic check-ins. Look for useful work to do before sleeping.
You can call this concurrently with other tools — it won't interfere with them.
Prefer this over \`Bash(sleep ...)\` — it doesn't hold a shell process.
Each wake-up costs an API call, but the prompt cache expires after 5 minutes of inactivity — balance accordingly.`