mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-08-10 02:02:29 +08:00
fix AiChatButton
This commit is contained in:
parent
aaa3ee2697
commit
a05013c8f4
@ -232,15 +232,10 @@ export default class RootCommandExecutor extends Component {
|
||||
|
||||
async createAiChatCommand() {
|
||||
try {
|
||||
// Create a new AI Chat note
|
||||
const parentNoteId = appContext.tabManager.getActiveContextNotePath();
|
||||
// Create a new AI Chat note at the root level
|
||||
const rootNoteId = "root";
|
||||
|
||||
if (!parentNoteId) {
|
||||
toastService.showError("No active note to create AI Chat under");
|
||||
return;
|
||||
}
|
||||
|
||||
const result = await noteCreateService.createNote(parentNoteId, {
|
||||
const result = await noteCreateService.createNote(rootNoteId, {
|
||||
title: "New AI Chat",
|
||||
type: "aiChat",
|
||||
content: JSON.stringify({
|
||||
|
Loading…
x
Reference in New Issue
Block a user