API Reference
InMemoryScratchpad
Defined in: tools/builtin/scratchpad.ts:54
In-memory Scratchpad — the shipped default.
Remarks
One string, replaced on each write and trimmed of surrounding whitespace. An
empty pad reads as "(empty)" so the model gets a clear signal rather than a
blank line.
Implements
Constructors
Constructor
new InMemoryScratchpad(): InMemoryScratchpad;Returns
InMemoryScratchpad
Methods
read()
read(): string;Defined in: tools/builtin/scratchpad.ts:58
Returns
string
The stored text, or "(empty)" when nothing has been written.
Implementation of
write()
write(content): string;Defined in: tools/builtin/scratchpad.ts:66
Parameters
| Parameter | Type | Description |
|---|---|---|
content | string | The new text; trimmed and stored, replacing what was there. |
Returns
string
The trimmed text now stored.