🎨 AI clear context action https://github.com/siyuan-note/siyuan/issues/10255
This commit is contained in:
parent
a2ebdbdc2f
commit
b375208ab8
1 changed files with 6 additions and 6 deletions
|
@ -40,6 +40,12 @@ func ChatGPTWithAction(ids []string, action string) (ret string) {
|
|||
return
|
||||
}
|
||||
|
||||
if "Clear context" == action {
|
||||
// AI clear context action https://github.com/siyuan-note/siyuan/issues/10255
|
||||
cachedContextMsg = nil
|
||||
return
|
||||
}
|
||||
|
||||
msg := getBlocksContent(ids)
|
||||
ret = chatGPTWithAction(msg, action, false)
|
||||
return
|
||||
|
@ -64,12 +70,6 @@ func chatGPT(msg string, cloud bool) (ret string) {
|
|||
|
||||
func chatGPTWithAction(msg string, action string, cloud bool) (ret string) {
|
||||
action = strings.TrimSpace(action)
|
||||
if "Clear context" == action {
|
||||
// AI clear context action https://github.com/siyuan-note/siyuan/issues/10255
|
||||
cachedContextMsg = nil
|
||||
return
|
||||
}
|
||||
|
||||
if "" != action {
|
||||
msg = action + ":\n\n" + msg
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue