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>
This commit is contained in:
8 files changed
+65
-65
No files matched your search
@@ -21,7 +21,7 @@ Generate AI-powered writing prompts for freewriting sessions using Anthropic's C
|
|||||||
|
|
||||||
## Key Features
|
## Key Features
|
||||||
|
|
||||||
- **🎯 Two Prompt Modes**: Staggered notifications for timed writing sessions, or direct note insertion
|
- **🎯 Two Prompt Modes**: Timed notifications for writing sessions, or direct note insertion
|
||||||
- **🤖 AI-Powered**: Uses Anthropic's Claude models for creative, diverse prompt generation
|
- **🤖 AI-Powered**: Uses Anthropic's Claude models for creative, diverse prompt generation
|
||||||
- **⚡ Customizable Timing**: Configure prompt count and delay intervals for your writing rhythm
|
- **⚡ Customizable Timing**: Configure prompt count and delay intervals for your writing rhythm
|
||||||
- **🎨 Personalized Prompts**: System prompts and examples to match your writing style
|
- **🎨 Personalized Prompts**: System prompts and examples to match your writing style
|
||||||
@@ -106,7 +106,7 @@ Write without the ability to delete or edit - just like pen on paper. Perfect fo
|
|||||||
### 3. Start Using Prompts
|
### 3. Start Using Prompts
|
||||||
|
|
||||||
**For Timed Writing Sessions:**
|
**For Timed Writing Sessions:**
|
||||||
1. Use `Ctrl/Cmd + P` → "Staggered Freewriting Prompts"
|
1. Use `Ctrl/Cmd + P` → "Show Timed Prompts"
|
||||||
2. Prompts will appear as notifications at your configured intervals
|
2. Prompts will appear as notifications at your configured intervals
|
||||||
|
|
||||||
**For Note Integration:**
|
**For Note Integration:**
|
||||||
@@ -127,19 +127,19 @@ Write without the ability to delete or edit - just like pen on paper. Perfect fo
|
|||||||
|
|
||||||
| Setting | Description | Default | Range |
|
| Setting | Description | Default | Range |
|
||||||
|---------|-------------|---------|-------|
|
|---------|-------------|---------|-------|
|
||||||
| **Staggered Count** | Number of timed prompts | 10 | 1-50 |
|
| **Timed Count** | Number of timed prompts | 10 | 1-50 |
|
||||||
| **Delay Seconds** | Seconds between prompts | 6 | 1-300 |
|
| **Delay Seconds** | Seconds between prompts | 6 | 1-300 |
|
||||||
| **Note Count** | Prompts inserted in notes | 3 | 1-20 |
|
| **Note Count** | Prompts inserted in notes | 3 | 1-20 |
|
||||||
|
|
||||||
### Prompt Customization
|
### Prompt Customization
|
||||||
|
|
||||||
- **System Prompt**: Instructions for the AI on how to generate prompts
|
- **System Prompt**: Instructions for the AI on how to generate prompts
|
||||||
- **Staggered Example**: Example prompt for timed sessions
|
- **Timed Example**: Example prompt for timed sessions
|
||||||
- **Freewriting Example**: Example prompt for note insertion
|
- **Freewriting Example**: Example prompt for note insertion
|
||||||
|
|
||||||
## Commands
|
## Commands
|
||||||
|
|
||||||
### Staggered Freewriting Prompts
|
### Timed Freewriting Prompts
|
||||||
|
|
||||||
Delivers prompts as timed notifications perfect for writing sprints:
|
Delivers prompts as timed notifications perfect for writing sprints:
|
||||||
|
|
||||||
@@ -169,9 +169,9 @@ Inserts prompts directly into your current note:
|
|||||||
- Creating prompt libraries
|
- Creating prompt libraries
|
||||||
- Inspiration gathering
|
- Inspiration gathering
|
||||||
|
|
||||||
### Stop Staggered Prompts
|
### Stop Timed Prompts
|
||||||
|
|
||||||
Cancels any running staggered prompt sequence.
|
Cancels any running timed prompt sequence.
|
||||||
|
|
||||||
## Settings
|
## Settings
|
||||||
|
|
||||||
@@ -250,7 +250,7 @@ freewriting-prompts/
|
|||||||
├── api/
|
├── api/
|
||||||
│ └── anthropicClient.ts # Anthropic API integration
|
│ └── anthropicClient.ts # Anthropic API integration
|
||||||
├── commands/
|
├── commands/
|
||||||
│ ├── staggeredPrompts.ts # Timed notification prompts
|
│ ├── timedPrompts.ts # Timed notification prompts
|
||||||
│ └── notePrompts.ts # Note insertion prompts
|
│ └── notePrompts.ts # Note insertion prompts
|
||||||
├── services/
|
├── services/
|
||||||
│ └── promptGenerator.ts # Prompt generation service
|
│ └── promptGenerator.ts # Prompt generation service
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ export class AnthropicClient {
|
|||||||
private baseUrl = 'https://api.anthropic.com/v1/messages';
|
private baseUrl = 'https://api.anthropic.com/v1/messages';
|
||||||
private readonly SYSTEM_PROMPT_SUFFIX = '\n\nIMPORTANT OUTPUT REQUIREMENTS:\n- Return ONLY the numbered writing prompts, nothing else\n- Do not include any explanations, questions, or additional commentary\n- Do not ask if the user wants more prompts or different styles\n- Format: numbered list with one prompt per line (1. [prompt], 2. [prompt], etc.)';
|
private readonly SYSTEM_PROMPT_SUFFIX = '\n\nIMPORTANT OUTPUT REQUIREMENTS:\n- Return ONLY the numbered writing prompts, nothing else\n- Do not include any explanations, questions, or additional commentary\n- Do not ask if the user wants more prompts or different styles\n- Format: numbered list with one prompt per line (1. [prompt], 2. [prompt], etc.)';
|
||||||
|
|
||||||
private readonly STAGGERED_PROMPT_MODIFIER = '\n\nFOR STAGGERED PROMPTS - MAKE THEM EXTREMELY SHORT AND DIRECT:\n- Each prompt should be answerable in 1-5 words or a single sentence\n- Focus on immediate, concrete observations or quick thoughts\n- Avoid complex scenarios or deep philosophical questions\n- Examples: "What color is closest to you?", "Your favorite word today:", "First sound you hear:", "Describe your mood in one word", "Name something soft"\n- Keep prompts simple, immediate, and concrete';
|
private readonly TIMED_PROMPT_MODIFIER = '\n\nFOR TIMED PROMPTS - MAKE THEM EXTREMELY SHORT AND DIRECT:\n- Each prompt should be answerable in 1-5 words or a single sentence\n- Focus on immediate, concrete observations or quick thoughts\n- Avoid complex scenarios or deep philosophical questions\n- Examples: "What color is closest to you?", "Your favorite word today:", "First sound you hear:", "Describe your mood in one word", "Name something soft"\n- Keep prompts simple, immediate, and concrete';
|
||||||
|
|
||||||
constructor(apiKey: string) {
|
constructor(apiKey: string) {
|
||||||
this.apiKey = apiKey;
|
this.apiKey = apiKey;
|
||||||
@@ -22,7 +22,7 @@ export class AnthropicClient {
|
|||||||
model: AnthropicModel,
|
model: AnthropicModel,
|
||||||
systemPrompt: string,
|
systemPrompt: string,
|
||||||
examplePrompt: string,
|
examplePrompt: string,
|
||||||
type: 'staggered' | 'note'
|
type: 'timed' | 'note'
|
||||||
): Promise<string[]> {
|
): Promise<string[]> {
|
||||||
if (!this.apiKey) {
|
if (!this.apiKey) {
|
||||||
throw new Error('API key is required');
|
throw new Error('API key is required');
|
||||||
@@ -33,8 +33,8 @@ export class AnthropicClient {
|
|||||||
|
|
||||||
// Build system prompt with type-specific modifiers
|
// Build system prompt with type-specific modifiers
|
||||||
let finalSystemPrompt = systemPrompt;
|
let finalSystemPrompt = systemPrompt;
|
||||||
if (type === 'staggered') {
|
if (type === 'timed') {
|
||||||
finalSystemPrompt += this.STAGGERED_PROMPT_MODIFIER;
|
finalSystemPrompt += this.TIMED_PROMPT_MODIFIER;
|
||||||
}
|
}
|
||||||
finalSystemPrompt += this.SYSTEM_PROMPT_SUFFIX;
|
finalSystemPrompt += this.SYSTEM_PROMPT_SUFFIX;
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
// ABOUTME: Staggered prompts command implementation that shows prompts as timed notifications
|
// ABOUTME: Timed prompts command implementation that shows prompts as timed notifications
|
||||||
// ABOUTME: Manages interval-based prompt display with proper cleanup and error handling
|
// ABOUTME: Manages interval-based prompt display with proper cleanup and error handling
|
||||||
|
|
||||||
import { Notice } from 'obsidian';
|
import { Notice } from 'obsidian';
|
||||||
import { PromptGeneratorService } from '../services/promptGenerator';
|
import { PromptGeneratorService } from '../services/promptGenerator';
|
||||||
import { FreewritingPromptsSettings } from '../types';
|
import { FreewritingPromptsSettings } from '../types';
|
||||||
|
|
||||||
export class StaggeredPromptsCommand {
|
export class TimedPromptsCommand {
|
||||||
private activeInterval: number | null = null;
|
private activeInterval: number | null = null;
|
||||||
private promptQueue: string[] = [];
|
private promptQueue: string[] = [];
|
||||||
private currentIndex = 0;
|
private currentIndex = 0;
|
||||||
@@ -15,12 +15,12 @@ export class StaggeredPromptsCommand {
|
|||||||
// MARK: - Public Methods
|
// MARK: - Public Methods
|
||||||
|
|
||||||
async execute(settings: FreewritingPromptsSettings): Promise<void> {
|
async execute(settings: FreewritingPromptsSettings): Promise<void> {
|
||||||
// Stop any existing staggered sequence
|
// Stop any existing timed sequence
|
||||||
this.stop();
|
this.stop();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// Generate prompts
|
// Generate prompts
|
||||||
const prompts = await this.promptGenerator.generateStaggeredPrompts(settings);
|
const prompts = await this.promptGenerator.generateTimedPrompts(settings);
|
||||||
|
|
||||||
if (prompts.length === 0) {
|
if (prompts.length === 0) {
|
||||||
new Notice('No prompts were generated');
|
new Notice('No prompts were generated');
|
||||||
@@ -40,7 +40,7 @@ export class StaggeredPromptsCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Error executing staggered prompts command:', error);
|
console.error('Error executing timed prompts command:', error);
|
||||||
// Error handling is done in the service layer
|
// Error handling is done in the service layer
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -5,13 +5,13 @@ import { Editor, MarkdownView, Notice, Plugin } from 'obsidian';
|
|||||||
import { FreewritingPromptsSettings } from './types';
|
import { FreewritingPromptsSettings } from './types';
|
||||||
import { DEFAULT_SETTINGS, FreewritingPromptsSettingTab } from './settings';
|
import { DEFAULT_SETTINGS, FreewritingPromptsSettingTab } from './settings';
|
||||||
import { PromptGeneratorService } from './services/promptGenerator';
|
import { PromptGeneratorService } from './services/promptGenerator';
|
||||||
import { StaggeredPromptsCommand } from './commands/staggeredPrompts';
|
import { TimedPromptsCommand } from './commands/timedPrompts';
|
||||||
import { NotePromptsCommand } from './commands/notePrompts';
|
import { NotePromptsCommand } from './commands/notePrompts';
|
||||||
|
|
||||||
export default class FreewritingPromptsPlugin extends Plugin {
|
export default class FreewritingPromptsPlugin extends Plugin {
|
||||||
settings: FreewritingPromptsSettings;
|
settings: FreewritingPromptsSettings;
|
||||||
promptGenerator: PromptGeneratorService;
|
promptGenerator: PromptGeneratorService;
|
||||||
staggeredCommand: StaggeredPromptsCommand;
|
timedCommand: TimedPromptsCommand;
|
||||||
noteCommand: NotePromptsCommand;
|
noteCommand: NotePromptsCommand;
|
||||||
|
|
||||||
async onload() {
|
async onload() {
|
||||||
@@ -19,7 +19,7 @@ export default class FreewritingPromptsPlugin extends Plugin {
|
|||||||
|
|
||||||
// Initialize services
|
// Initialize services
|
||||||
this.promptGenerator = new PromptGeneratorService(this.settings);
|
this.promptGenerator = new PromptGeneratorService(this.settings);
|
||||||
this.staggeredCommand = new StaggeredPromptsCommand(this.promptGenerator);
|
this.timedCommand = new TimedPromptsCommand(this.promptGenerator);
|
||||||
this.noteCommand = new NotePromptsCommand(this.promptGenerator);
|
this.noteCommand = new NotePromptsCommand(this.promptGenerator);
|
||||||
|
|
||||||
// Register commands
|
// Register commands
|
||||||
@@ -30,9 +30,9 @@ export default class FreewritingPromptsPlugin extends Plugin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onunload() {
|
onunload() {
|
||||||
// Stop any running staggered prompts
|
// Stop any running timed prompts
|
||||||
if (this.staggeredCommand) {
|
if (this.timedCommand) {
|
||||||
this.staggeredCommand.stop();
|
this.timedCommand.stop();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Clear prompt cache
|
// Clear prompt cache
|
||||||
@@ -59,12 +59,12 @@ export default class FreewritingPromptsPlugin extends Plugin {
|
|||||||
// MARK: - Command Registration
|
// MARK: - Command Registration
|
||||||
|
|
||||||
private registerCommands() {
|
private registerCommands() {
|
||||||
// Staggered prompts command
|
// Timed prompts command
|
||||||
this.addCommand({
|
this.addCommand({
|
||||||
id: 'staggered-prompts',
|
id: 'timed-prompts',
|
||||||
name: 'Show Staggered Prompts',
|
name: 'Show Timed Prompts',
|
||||||
callback: async () => {
|
callback: async () => {
|
||||||
await this.executeStaggeredPrompts();
|
await this.executeTimedPrompts();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -77,22 +77,22 @@ export default class FreewritingPromptsPlugin extends Plugin {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// Stop staggered prompts command
|
// Stop timed prompts command
|
||||||
this.addCommand({
|
this.addCommand({
|
||||||
id: 'stop-staggered-prompts',
|
id: 'stop-timed-prompts',
|
||||||
name: 'Stop Staggered Prompts',
|
name: 'Stop Timed Prompts',
|
||||||
callback: () => {
|
callback: () => {
|
||||||
this.stopStaggeredPrompts();
|
this.stopTimedPrompts();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// MARK: - Command Implementations
|
// MARK: - Command Implementations
|
||||||
|
|
||||||
private async executeStaggeredPrompts(): Promise<void> {
|
private async executeTimedPrompts(): Promise<void> {
|
||||||
// Check if staggered prompts are already running
|
// Check if timed prompts are already running
|
||||||
if (this.staggeredCommand.isRunning()) {
|
if (this.timedCommand.isRunning()) {
|
||||||
new Notice('Staggered prompts are already running. Use "Stop Staggered Prompts" to stop them first.');
|
new Notice('Timed prompts are already running. Use "Stop Timed Prompts" to stop them first.');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -104,9 +104,9 @@ export default class FreewritingPromptsPlugin extends Plugin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await this.staggeredCommand.execute(this.settings);
|
await this.timedCommand.execute(this.settings);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Error executing staggered prompts:', error);
|
console.error('Error executing timed prompts:', error);
|
||||||
// Error handling is done in the command layer
|
// Error handling is done in the command layer
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -133,18 +133,18 @@ export default class FreewritingPromptsPlugin extends Plugin {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private stopStaggeredPrompts(): void {
|
private stopTimedPrompts(): void {
|
||||||
if (this.staggeredCommand.isRunning()) {
|
if (this.timedCommand.isRunning()) {
|
||||||
this.staggeredCommand.stop();
|
this.timedCommand.stop();
|
||||||
new Notice('Staggered prompts stopped');
|
new Notice('Timed prompts stopped');
|
||||||
} else {
|
} else {
|
||||||
new Notice('No staggered prompts are currently running');
|
new Notice('No timed prompts are currently running');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// MARK: - Public API for Settings
|
// MARK: - Public API for Settings
|
||||||
|
|
||||||
getStaggeredStatus(): { isRunning: boolean; currentPrompt: number; totalPrompts: number } {
|
getTimedStatus(): { isRunning: boolean; currentPrompt: number; totalPrompts: number } {
|
||||||
return this.staggeredCommand.getStatus();
|
return this.timedCommand.getStatus();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -21,13 +21,13 @@ export class PromptGeneratorService {
|
|||||||
|
|
||||||
// MARK: - Public Methods
|
// MARK: - Public Methods
|
||||||
|
|
||||||
async generateStaggeredPrompts(settings: FreewritingPromptsSettings): Promise<string[]> {
|
async generateTimedPrompts(settings: FreewritingPromptsSettings): Promise<string[]> {
|
||||||
return this.generatePrompts(
|
return this.generatePrompts(
|
||||||
settings.staggeredCount,
|
settings.timedCount,
|
||||||
settings.model,
|
settings.model,
|
||||||
settings.systemPrompt,
|
settings.systemPrompt,
|
||||||
settings.staggeredExamplePrompt,
|
settings.timedExamplePrompt,
|
||||||
'staggered'
|
'timed'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -57,7 +57,7 @@ export class PromptGeneratorService {
|
|||||||
model: AnthropicModel,
|
model: AnthropicModel,
|
||||||
systemPrompt: string,
|
systemPrompt: string,
|
||||||
examplePrompt: string,
|
examplePrompt: string,
|
||||||
type: 'staggered' | 'note'
|
type: 'timed' | 'note'
|
||||||
): Promise<string[]> {
|
): Promise<string[]> {
|
||||||
if (!this.client.validateApiKey()) {
|
if (!this.client.validateApiKey()) {
|
||||||
new Notice('Please configure your Anthropic API key in settings');
|
new Notice('Please configure your Anthropic API key in settings');
|
||||||
@@ -138,8 +138,8 @@ export class PromptGeneratorService {
|
|||||||
errors.push('API key is required');
|
errors.push('API key is required');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (settings.staggeredCount < 1 || settings.staggeredCount > 50) {
|
if (settings.timedCount < 1 || settings.timedCount > 50) {
|
||||||
errors.push('Staggered count must be between 1 and 50');
|
errors.push('Timed count must be between 1 and 50');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (settings.delaySeconds < 1 || settings.delaySeconds > 300) {
|
if (settings.delaySeconds < 1 || settings.delaySeconds > 300) {
|
||||||
|
|||||||
+11
-11
@@ -8,11 +8,11 @@ import { FreewritingPromptsSettings, ANTHROPIC_MODELS, AnthropicModel } from './
|
|||||||
export const DEFAULT_SETTINGS: FreewritingPromptsSettings = {
|
export const DEFAULT_SETTINGS: FreewritingPromptsSettings = {
|
||||||
apiKey: '',
|
apiKey: '',
|
||||||
model: 'claude-3-5-haiku-latest' as const,
|
model: 'claude-3-5-haiku-latest' as const,
|
||||||
staggeredCount: 10,
|
timedCount: 10,
|
||||||
delaySeconds: 6,
|
delaySeconds: 6,
|
||||||
noteCount: 3,
|
noteCount: 3,
|
||||||
systemPrompt: 'You are a creative writing assistant. Generate engaging, thought-provoking writing prompts that inspire creativity and help writers overcome blocks. Focus on variety, originality, and emotional depth.',
|
systemPrompt: 'You are a creative writing assistant. Generate engaging, thought-provoking writing prompts that inspire creativity and help writers overcome blocks. Focus on variety, originality, and emotional depth.',
|
||||||
staggeredExamplePrompt: 'The interesting thing about a rose is…',
|
timedExamplePrompt: 'The interesting thing about a rose is…',
|
||||||
freewritingExamplePrompt: 'Describe a world where colors have been outlawed and only exist in secret underground galleries.'
|
freewritingExamplePrompt: 'Describe a world where colors have been outlawed and only exist in secret underground galleries.'
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -79,22 +79,22 @@ export class FreewritingPromptsSettingTab extends PluginSettingTab {
|
|||||||
containerEl.createEl('h3', { text: 'Command Configuration' });
|
containerEl.createEl('h3', { text: 'Command Configuration' });
|
||||||
|
|
||||||
new Setting(containerEl)
|
new Setting(containerEl)
|
||||||
.setName('Staggered Prompts Count')
|
.setName('Timed Prompts Count')
|
||||||
.setDesc('Number of prompts to generate for staggered notifications (1-50)')
|
.setDesc('Number of prompts to generate for timed notifications (1-50)')
|
||||||
.addText(text => text
|
.addText(text => text
|
||||||
.setPlaceholder('10')
|
.setPlaceholder('10')
|
||||||
.setValue(this.plugin.settings.staggeredCount.toString())
|
.setValue(this.plugin.settings.timedCount.toString())
|
||||||
.onChange(async (value) => {
|
.onChange(async (value) => {
|
||||||
const count = parseInt(value);
|
const count = parseInt(value);
|
||||||
if (!isNaN(count) && count >= 1 && count <= 50) {
|
if (!isNaN(count) && count >= 1 && count <= 50) {
|
||||||
this.plugin.settings.staggeredCount = count;
|
this.plugin.settings.timedCount = count;
|
||||||
await this.plugin.saveSettings();
|
await this.plugin.saveSettings();
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
|
|
||||||
new Setting(containerEl)
|
new Setting(containerEl)
|
||||||
.setName('Delay Between Prompts')
|
.setName('Delay Between Prompts')
|
||||||
.setDesc('Seconds to wait between each staggered prompt notification (1-300)')
|
.setDesc('Seconds to wait between each timed prompt notification (1-300)')
|
||||||
.addText(text => text
|
.addText(text => text
|
||||||
.setPlaceholder('6')
|
.setPlaceholder('6')
|
||||||
.setValue(this.plugin.settings.delaySeconds.toString())
|
.setValue(this.plugin.settings.delaySeconds.toString())
|
||||||
@@ -139,13 +139,13 @@ export class FreewritingPromptsSettingTab extends PluginSettingTab {
|
|||||||
});
|
});
|
||||||
|
|
||||||
new Setting(containerEl)
|
new Setting(containerEl)
|
||||||
.setName('Staggered Prompts Example')
|
.setName('Timed Prompts Example')
|
||||||
.setDesc('Example prompt to guide the style for staggered notifications')
|
.setDesc('Example prompt to guide the style for timed notifications')
|
||||||
.addTextArea(text => text
|
.addTextArea(text => text
|
||||||
.setPlaceholder('Write about a character who...')
|
.setPlaceholder('Write about a character who...')
|
||||||
.setValue(this.plugin.settings.staggeredExamplePrompt)
|
.setValue(this.plugin.settings.timedExamplePrompt)
|
||||||
.onChange(async (value) => {
|
.onChange(async (value) => {
|
||||||
this.plugin.settings.staggeredExamplePrompt = value;
|
this.plugin.settings.timedExamplePrompt = value;
|
||||||
await this.plugin.saveSettings();
|
await this.plugin.saveSettings();
|
||||||
}))
|
}))
|
||||||
.then(setting => {
|
.then(setting => {
|
||||||
|
|||||||
+1
-1
@@ -2,7 +2,7 @@
|
|||||||
Freewriting Prompts Plugin Styles
|
Freewriting Prompts Plugin Styles
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Styling for staggered prompt notifications */
|
/* Styling for timed prompt notifications */
|
||||||
.freewriting-prompt-notice {
|
.freewriting-prompt-notice {
|
||||||
max-width: 400px !important;
|
max-width: 400px !important;
|
||||||
white-space: pre-wrap !important;
|
white-space: pre-wrap !important;
|
||||||
|
|||||||
@@ -4,11 +4,11 @@
|
|||||||
export interface FreewritingPromptsSettings {
|
export interface FreewritingPromptsSettings {
|
||||||
apiKey: string;
|
apiKey: string;
|
||||||
model: AnthropicModel;
|
model: AnthropicModel;
|
||||||
staggeredCount: number;
|
timedCount: number;
|
||||||
delaySeconds: number;
|
delaySeconds: number;
|
||||||
noteCount: number;
|
noteCount: number;
|
||||||
systemPrompt: string;
|
systemPrompt: string;
|
||||||
staggeredExamplePrompt: string;
|
timedExamplePrompt: string;
|
||||||
freewritingExamplePrompt: string;
|
freewritingExamplePrompt: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user