Files
hive/core/frontend/src/api/prompts.ts
T
Vincent Jiang 6e97191f21 feat: UI/UX improvements across BYOK, org chart, profiles, and prompt library
- BYOK: unified styling (remove purple, consistent grey headers), model selector opens settings modal directly, backend validates API keys before activation
- Org chart: queen profiles are now editable (name, title, about, skills, achievement) with changes persisted to YAML
- Avatars: upload profile pictures for queens and user with client-side compression, displayed across org chart, sidebar, chat, and header
- Colony deletion: await backend delete and re-fetch to prevent ghost colonies
- Prompt library: add pagination (24/page), custom prompt upload/delete with backend persistence
- Settings modal: performance cleanup (remove backdrop-blur, reduce transitions)
- Fix ensure_default_queens() overwriting user edits on every API call

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-17 14:21:18 -07:00

20 lines
478 B
TypeScript

import { api } from "./client";
export interface CustomPrompt {
id: string;
title: string;
category: string;
content: string;
custom: true;
}
export const promptsApi = {
list: () => api.get<{ prompts: CustomPrompt[] }>("/prompts"),
create: (title: string, category: string, content: string) =>
api.post<CustomPrompt>("/prompts", { title, category, content }),
delete: (promptId: string) =>
api.delete<{ deleted: string }>(`/prompts/${promptId}`),
};