diff --git a/mobile/src/api/note-prompts.ts b/mobile/src/api/note-prompts.ts index 2ce5170..f7e6739 100644 --- a/mobile/src/api/note-prompts.ts +++ b/mobile/src/api/note-prompts.ts @@ -1,6 +1,6 @@ import { getApiClient } from './client'; -export type PromptCategory = 'transform' | 'extract' | 'generate' | 'analysis' | 'vision' | 'export' | 'custom'; +export type PromptCategory = 'transform' | 'extract' | 'generate' | 'analyze' | 'export'; export type PromptInputType = 'text' | 'image' | 'text+image' | 'multi-note'; export type PromptOutputType = 'new_note' | 'artifact' | 'update_note'; @@ -70,15 +70,18 @@ export async function extractFromUrl( }); } +export type CopilotTone = 'formal' | 'casual' | 'professional' | 'friendly'; + export async function copilotTransform( noteId: string, workspaceId: string, action: string, text: string, + tone?: CopilotTone, ): Promise { const res = await getApiClient().fetch<{ text: string }>( `/notes/${encodeURIComponent(noteId)}/copilot`, - { method: 'POST', body: JSON.stringify({ workspaceId, action, text }) }, + { method: 'POST', body: JSON.stringify({ workspaceId, action, text, ...(tone ? { tone } : {}) }) }, ); return res.text; } diff --git a/mobile/src/app/(tabs)/capture.tsx b/mobile/src/app/(tabs)/capture.tsx index 18fc75b..02b4f20 100644 --- a/mobile/src/app/(tabs)/capture.tsx +++ b/mobile/src/app/(tabs)/capture.tsx @@ -4,7 +4,7 @@ import * as Clipboard from 'expo-clipboard'; import type { MobileWorkspace } from '../../api/workspaces'; import { useNotesStore, type NotesState } from '../../store/notes-store'; import { useWorkspaceStore, type WorkspaceState } from '../../store/workspace-store'; -import { extractFromUrl, copilotTransform } from '../../api/note-prompts'; +import { extractFromUrl } from '../../api/note-prompts'; import { colors } from '../../theme'; type CaptureMode = 'text' | 'photo' | 'voice' | 'url' | 'scan' | 'paste';