Files
freewriting-prompts/types.ts
T
Jarvis 4786e7647d refactor: rename "Staggered Prompts" to "Timed Prompts" for clarity
Renames command terminology throughout codebase to better reflect
regular interval delivery rather than irregular/staggered timing.

Changes:
- Rename staggeredPrompts.ts → timedPrompts.ts
- Update class StaggeredPromptsCommand → TimedPromptsCommand
- Update command IDs: staggered-prompts → timed-prompts
- Update user-facing labels in settings and README
- Update property names: staggeredCount → timedCount
- Update method names: generateStaggeredPrompts → generateTimedPrompts
- Update API constants and type annotations

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-21 07:53:48 +02:00

58 lines
1.3 KiB
TypeScript

// ABOUTME: Type definitions for the Freewriting Prompts plugin
// ABOUTME: Defines interfaces for settings, API responses, and plugin configuration
export interface FreewritingPromptsSettings {
apiKey: string;
model: AnthropicModel;
timedCount: number;
delaySeconds: number;
noteCount: number;
systemPrompt: string;
timedExamplePrompt: string;
freewritingExamplePrompt: string;
}
export interface AnthropicMessage {
role: 'user' | 'assistant' | 'system';
content: string;
}
export interface AnthropicRequest {
model: string;
max_tokens: number;
messages: AnthropicMessage[];
system?: string;
}
export interface AnthropicResponse {
content: Array<{
text: string;
type: 'text';
}>;
id: string;
model: string;
role: 'assistant';
stop_reason: string;
stop_sequence: null;
type: 'message';
usage: {
input_tokens: number;
output_tokens: number;
};
}
export interface GeneratedPrompt {
text: string;
timestamp: Date;
}
export const ANTHROPIC_MODELS = [
'claude-opus-4-1-20250805',
'claude-opus-4-20250514',
'claude-sonnet-4-20250514',
'claude-3-7-sonnet-latest',
'claude-3-5-haiku-latest',
'claude-3-haiku-20240307'
] as const;
export type AnthropicModel = typeof ANTHROPIC_MODELS[number];