index.ts
commands/clear/index.ts
20
Lines
603
Bytes
0
Exports
3
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 lives in the command layer. It likely turns a user action into concrete program behavior.
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 commands. It contains 20 lines, 3 detected imports, and 0 detected exports.
Important relationships
Detected exports
- No clear exports detected.
Keywords
clearcommandconversationminimalmetadataonlyimplementationlazy-loadedreducestartup
Detected imports
./clear/caches.js./clear/conversation.js../../commands.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
/**
* Clear command - minimal metadata only.
* Implementation is lazy-loaded from clear.ts to reduce startup time.
* Utility functions:
* - clearSessionCaches: import from './clear/caches.js'
* - clearConversation: import from './clear/conversation.js'
*/
import type { Command } from '../../commands.js'
const clear = {
type: 'local',
name: 'clear',
description: 'Clear conversation history and free up context',
aliases: ['reset', 'new'],
supportsNonInteractive: false, // Should just create a new session
load: () => import('./clear.js'),
} satisfies Command
export default clear