feat: allow using chat to modify page titles

This commit is contained in:
LIlGG
2025-10-11 16:36:20 +08:00
parent a672fcad1c
commit 7acc4949fb
8 changed files with 88 additions and 23 deletions

View File

@@ -101,6 +101,26 @@ export class EditorBridge {
});
}
/**
* 更新页面属性
*
* @param pageName
* @param param1
* @returns
*/
async updatePageAttributes(pageName: string, { title }: { title?: string } = {}) {
const page = this.#pages.get(pageName);
if (!page) {
return;
}
const actionIds = page.actionIds;
this.#emit('upsert_page', {
pageName,
title,
actionIds,
});
}
async removePage(pageName: string) {
this.#pages.delete(pageName);