LaiTool/src/preload/prompt.js

20 lines
813 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { ipcRenderer } from "electron"
import { DEFINE_STRING } from "../define/define_string"
const prompt = {
// 获取所有的排序选项
GetPromptSortOptions: async (callback) => callback(await ipcRenderer.invoke(DEFINE_STRING.PROMPT.GET_SORT_OPTIONS)),
// 保存提示词排序数据
SavePromptSort: async (value, callback) => callback(await ipcRenderer.invoke(DEFINE_STRING.PROMPT.SAVE_PROMPT_SORT_DATA, value)),
// 获取提示词排序数据
GetPromptSort: async (callback) => callback(await ipcRenderer.invoke(DEFINE_STRING.PROMPT.GET_PROMPT_SORT_DATA)),
// 获取提示词文件数据txt指定路径
OpenPromptFileTxt: async (value, callback) => callback(await ipcRenderer.invoke(DEFINE_STRING.PROMPT.OPEN_PROMPT_FILE_TXT, value)),
}
export {
prompt
}