Prompt gallery (#957)

- [x] show prompt instead of app in autocomplete
- [x] use proper array/list for db (tags)
- [x] don't do <dyad-prompt> - replace inline
This commit is contained in:
Will Chen
2025-08-18 13:25:11 -07:00
committed by GitHub
parent a547735714
commit 573642ae5f
26 changed files with 1540 additions and 42 deletions

View File

@@ -58,6 +58,9 @@ import type {
RevertVersionResponse,
RevertVersionParams,
RespondToAppInputParams,
PromptDto,
CreatePromptParamsDto,
UpdatePromptParamsDto,
} from "./ipc_types";
import type { Template } from "../shared/templates";
import type { AppChatContext, ProposalResult } from "@/lib/schemas";
@@ -1069,4 +1072,21 @@ export class IpcClient {
public async getTemplates(): Promise<Template[]> {
return this.ipcRenderer.invoke("get-templates");
}
// --- Prompts Library ---
public async listPrompts(): Promise<PromptDto[]> {
return this.ipcRenderer.invoke("prompts:list");
}
public async createPrompt(params: CreatePromptParamsDto): Promise<PromptDto> {
return this.ipcRenderer.invoke("prompts:create", params);
}
public async updatePrompt(params: UpdatePromptParamsDto): Promise<void> {
await this.ipcRenderer.invoke("prompts:update", params);
}
public async deletePrompt(id: number): Promise<void> {
await this.ipcRenderer.invoke("prompts:delete", id);
}
}