feat: immutable entries + full task logging
Entries now immutable once journal is generated: - Edit/delete returns ENTRY_IMMUTABLE error if journal exists - Frontend shows lock message and hides delete button - Delete Journal button to unlock entries Task logging now stores full JSON: - request: full JSON request sent to AI provider - response: full JSON response from AI provider - prompt: formatted human-readable prompt Prompt structure: 1. System prompt 2. Previous diary entries (journals) 3. Today's entries
This commit is contained in:
@@ -1,6 +1,12 @@
|
||||
export interface AIProviderResult {
|
||||
content: string;
|
||||
request: Record<string, unknown>;
|
||||
response: Record<string, unknown>;
|
||||
}
|
||||
|
||||
export interface AIProvider {
|
||||
provider: 'openai' | 'anthropic' | 'ollama' | 'lmstudio' | 'groq';
|
||||
generate(prompt: string, systemPrompt?: string): Promise<string>;
|
||||
generate(prompt: string, systemPrompt?: string): Promise<AIProviderResult>;
|
||||
validate?(): Promise<boolean>;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user