| 1 | /* |
| 2 | * Copyright 2024 KylinSoft Co., Ltd. |
| 3 | * |
| 4 | * This program is free software: you can redistribute it and/or modify it under |
| 5 | * the terms of the GNU General Public License as published by the Free Software |
| 6 | * Foundation, either version 3 of the License, or (at your option) any later |
| 7 | * version. |
| 8 | * |
| 9 | * This program is distributed in the hope that it will be useful, but WITHOUT |
| 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS |
| 11 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more |
| 12 | * details. |
| 13 | * |
| 14 | * You should have received a copy of the GNU General Public License along with |
| 15 | * this program. If not, see <https://www.gnu.org/licenses/>. |
| 16 | */ |
| 17 | |
| 18 | |
| 19 | #ifndef PROMPTIDMANAGER_H |
| 20 | #define PROMPTIDMANAGER_Hcxx . . $ `ai-assistant/promptidmanager.h:20:9`! |
| 21 | |
| 22 | #include <cstdlib> |
| 23 | #include <fstream> |
| 24 | #include <iostream> |
| 25 | #include <list> |
| 26 | #include <sstream> |
| 27 | #include <string> |
| 28 | #include <vector> |
| 29 | |
| 30 | class PromptIdManagercxx . . $ PromptIdManager# { |
| 31 | public: |
| 32 | PromptIdManagercxx . . $ PromptIdManager#PromptIdManager(49f6e7a06ebc5aa8).(); |
| 33 | |
| 34 | void setDefaultPromptIdListcxx . . $ PromptIdManager#setDefaultPromptIdList(a4b9f365cf9ec45d).(const stdcxx . . $ std/::listcxx . . $ std/__cxx11/list#<int>& idList); |
| 35 | stdcxx . . $ std/::listcxx . . $ std/__cxx11/list#<int> promptIdListcxx . . $ PromptIdManager#promptIdList(34aa21dc5613b5d1).(); |
| 36 | bool addPromptIdcxx . . $ PromptIdManager#addPromptId(83c267b20bac841a).(int id); |
| 37 | bool deletePromptIdcxx . . $ PromptIdManager#deletePromptId(83c267b20bac841a).(int id); |
| 38 | bool updatePromptIdOrdercxx . . $ PromptIdManager#updatePromptIdOrder(6a6adfdb4de1a121).(const stdcxx . . $ std/::listcxx . . $ std/__cxx11/list#<int>& newOrder); |
| 39 | |
| 40 | private: |
| 41 | void loadPromptIdListcxx . . $ PromptIdManager#loadPromptIdList(49f6e7a06ebc5aa8).(); |
| 42 | bool savePromptIdListcxx . . $ PromptIdManager#savePromptIdList(c9857a73d68e59ba).(); |
| 43 | |
| 44 | void createConfigFilecxx . . $ PromptIdManager#createConfigFile(49f6e7a06ebc5aa8).(); |
| 45 | void readConfigFilecxx . . $ PromptIdManager#readConfigFile(49f6e7a06ebc5aa8).(); |
| 46 | |
| 47 | private: |
| 48 | const stdcxx . . $ std/::stringcxx . . $ std/string# configDir_cxx . . $ PromptIdManager#configDir_. = |
| 49 | stdcxx . . $ std/__cxx11/basic_string#basic_string(e36662616dba894d).::stringcxx . . $ std/string#(getenv("HOME")) +cxx . . $ std/operator+(900ec9581c410ad9). "/.config/kylin-ai"; |
| 50 | const stdcxx . . $ std/::stringcxx . . $ std/string# configPath_cxx . . $ PromptIdManager#configPath_. = |
| 51 | stdcxx . . $ std/::stringcxx . . $ std/string#(getenv("HOME")) +cxx . . $ std/operator+(900ec9581c410ad9). "/.config/kylin-ai/promptOrder.conf"; |
| 52 | stdcxx . . $ std/::listcxx . . $ std/__cxx11/list#<int> promptIdList_cxx . . $ PromptIdManager#promptIdList_.; |
| 53 | }; |
| 54 | |
| 55 | #endif |