ai: load/save

This commit is contained in:
end-4
2025-07-07 16:48:43 +02:00
parent 9d6452aaaf
commit ae69a4f11a
4 changed files with 104 additions and 3 deletions
@@ -71,6 +71,30 @@ Item {
}
}
},
{
name: "save",
description: qsTr("Save chat"),
execute: (args) => {
const joinedArgs = args.join(" ")
if (joinedArgs.trim().length == 0) {
Ai.addMessage(`Usage: ${root.commandPrefix}save CHAT_NAME`, Ai.interfaceRole);
return;
}
Ai.saveChat(joinedArgs)
}
},
{
name: "load",
description: qsTr("Load chat"),
execute: (args) => {
const joinedArgs = args.join(" ")
if (joinedArgs.trim().length == 0) {
Ai.addMessage(`Usage: ${root.commandPrefix}load CHAT_NAME`, Ai.interfaceRole);
return;
}
Ai.loadChat(joinedArgs)
}
},
{
name: "clear",
description: qsTr("Clear chat history"),