Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: Restore automatic composer height after sending https://github.com/siyuan-note/siyuan/issues/20807

Danielc3e1c19902bc
diff --git a/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-xaduj2o/20230304000547-ibldj1z/20260804171004-aiagt03.sy b/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-xaduj2o/20230304000547-ibldj1z/20260804171004-aiagt03.sy
index 8db7906b72..1844122047 100644
--- a/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-xaduj2o/20230304000547-ibldj1z/20260804171004-aiagt03.sy
+++ b/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-xaduj2o/20230304000547-ibldj1z/20260804171004-aiagt03.sy
@@ -6,7 +6,7 @@
"id": "20260804171004-aiagt03",
"title": "AI Agent",
"type": "doc",
- "updated": "20261026182137"
+ "updated": "20261027140312"
},
"Children": [
{
@@ -317,7 +317,7 @@
"HeadingLevel": 2,
"Properties": {
"id": "20260804170027-iffmsq0",
- "updated": "20261024164212"
+ "updated": "20261027140312"
},
"Children": [
{
@@ -538,7 +538,7 @@
"HeadingLevel": 3,
"Properties": {
"id": "20260804170039-x813t3f",
- "updated": "20261024164212"
+ "updated": "20261027140312"
},
"Children": [
{
@@ -597,12 +597,12 @@
"Type": "NodeParagraph",
"Properties": {
"id": "20261022182404-71cve53",
- "updated": "20261024164212"
+ "updated": "20261027140312"
},
"Children": [
{
"Type": "NodeText",
- "Data": "The input grows automatically as you add text and images, then scrolls when it reaches its automatic height limit. On desktop, hover over the input to reveal the small handle at the top; it remains visible on touch screens."
+ "Data": "The input grows automatically as you add text and images, then scrolls when it reaches the height available in the panel. On desktop, hover over the input to reveal the small handle at the top; it remains visible on touch screens."
}
]
},
@@ -611,12 +611,12 @@
"Type": "NodeParagraph",
"Properties": {
"id": "20261024164212-w2e9juj",
- "updated": "20261024164212"
+ "updated": "20261027140312"
},
"Children": [
{
"Type": "NodeText",
- "Data": "Drag the handle upward or downward to set a fixed height, even when the input is empty. The minimum height fits a complete line of text, and the maximum depends on the available panel space. Double-click the handle to restore automatic sizing. Space above and below the content makes the first and last lines easier to inspect."
+ "Data": "Drag the handle upward or downward to set a fixed height for the current message, even when the input is empty. The minimum height fits a complete line of text, and the maximum depends on the available panel space. Sending a message returns the cleared input to its initial height and restores automatic sizing for the next message. Double-click the handle to restore automatic sizing while composing. Space above and below the content makes the first and last lines easier to inspect."
}
]
},
diff --git a/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180321-hbvl5c2/20230303235619-ex5l63e/20260804171000-aiagt01.sy b/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180321-hbvl5c2/20230303235619-ex5l63e/20260804171000-aiagt01.sy
index f2b7f9369a..663dec70f3 100644
--- a/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180321-hbvl5c2/20230303235619-ex5l63e/20260804171000-aiagt01.sy
+++ b/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180321-hbvl5c2/20230303235619-ex5l63e/20260804171000-aiagt01.sy
@@ -6,7 +6,7 @@
"id": "20260804171000-aiagt01",
"title": "AI 智能体",
"type": "doc",
- "updated": "20261026182118"
+ "updated": "20261027140312"
},
"Children": [
{
@@ -289,7 +289,7 @@
"HeadingLevel": 2,
"Properties": {
"id": "20260804170027-76js6ua",
- "updated": "20261024153700"
+ "updated": "20261027140312"
},
"Children": [
{
@@ -510,7 +510,7 @@
"HeadingLevel": 3,
"Properties": {
"id": "20260804170039-6hkjcgx",
- "updated": "20261024153700"
+ "updated": "20261027140312"
},
"Children": [
{
@@ -569,12 +569,12 @@
"Type": "NodeParagraph",
"Properties": {
"id": "20261022182404-g6vs2ax",
- "updated": "20261024153700"
+ "updated": "20261027140312"
},
"Children": [
{
"Type": "NodeText",
- "Data": "输入框默认随文字和图片自动增高,达到自动高度上限后滚动。桌面端将鼠标移入输入区域后显示顶部的小把手,触屏设备上保持显示。拖动把手可在允许范围内设置固定高度,空输入框也能拉高;最小高度可完整容纳一行文本,最大高度受面板可用空间限制。双击把手可恢复自动增高。内容首尾保留滚动余量,便于完整查看首行和末行。"
+ "Data": "输入框默认随文字和图片自动增高,达到面板可用高度上限后滚动。桌面端将鼠标移入输入区域后显示顶部的小把手,触屏设备上保持显示。拖动把手可为当前消息设置固定高度,空输入框也能拉高;最小高度可完整容纳一行文本,最大高度受面板可用空间限制。发送消息后,清空的输入框恢复初始高度,下一条消息重新自动增高。编辑过程中也可双击把手恢复自动增高。内容首尾保留滚动余量,便于完整查看首行和末行。"
}
]
},
diff --git a/app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226121203-rjjngpz/20230304000829-9jwu3po/20260804171002-aiagt02.sy b/app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226121203-rjjngpz/20230304000829-9jwu3po/20260804171002-aiagt02.sy
index e0bcca84a0..56bb20e2ca 100644
--- a/app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226121203-rjjngpz/20230304000829-9jwu3po/20260804171002-aiagt02.sy
+++ b/app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226121203-rjjngpz/20230304000829-9jwu3po/20260804171002-aiagt02.sy
@@ -6,7 +6,7 @@
"id": "20260804171002-aiagt02",
"title": "AI 智能體",
"type": "doc",
- "updated": "20261026182118"
+ "updated": "20261027140312"
},
"Children": [
{
@@ -289,7 +289,7 @@
"HeadingLevel": 2,
"Properties": {
"id": "20260804170027-qlngedh",
- "updated": "20261024153700"
+ "updated": "20261027140312"
},
"Children": [
{
@@ -510,7 +510,7 @@
"HeadingLevel": 3,
"Properties": {
"id": "20260804170039-1z57i1s",
- "updated": "20261024153700"
+ "updated": "20261027140312"
},
"Children": [
{
@@ -569,12 +569,12 @@
"Type": "NodeParagraph",
"Properties": {
"id": "20261022182404-zoui51x",
- "updated": "20261024153700"
+ "updated": "20261027140312"
},
"Children": [
{
"Type": "NodeText",
- "Data": "輸入框預設會隨文字和圖片自動增高,達到自動高度上限後捲動。桌面端將滑鼠移入輸入區域後會顯示頂部的小控制點,觸控裝置上則保持顯示。拖曳控制點可在允許範圍內設定固定高度,空白輸入框也能拉高;最小高度可完整容納一行文字,最大高度受面板可用空間限制。按兩下控制點可恢復自動增高。內容首尾保留捲動空間,方便完整查看首行和末行。"
+ "Data": "輸入框預設會隨文字和圖片自動增高,達到面板可用高度上限後捲動。桌面端將滑鼠移入輸入區域後會顯示頂部的小控制點,觸控裝置上則保持顯示。拖曳控制點可為目前的訊息設定固定高度,空白輸入框也能拉高;最小高度可完整容納一行文字,最大高度受面板可用空間限制。傳送訊息後,清空的輸入框會恢復初始高度,下一則訊息重新自動增高。編輯時也可按兩下控制點恢復自動增高。內容首尾保留捲動空間,方便完整查看首行和末行。"
}
]
},
diff --git a/app/guide/20240530133126-axarxgx/20240530101000-4qitucx/20240530101000-g3ugxml/20240530101000-ei5t6tt/20260804171006-aiagt04.sy b/app/guide/20240530133126-axarxgx/20240530101000-4qitucx/20240530101000-g3ugxml/20240530101000-ei5t6tt/20260804171006-aiagt04.sy
index 9a4eaf6fcf..786df8c377 100644
--- a/app/guide/20240530133126-axarxgx/20240530101000-4qitucx/20240530101000-g3ugxml/20240530101000-ei5t6tt/20260804171006-aiagt04.sy
+++ b/app/guide/20240530133126-axarxgx/20240530101000-4qitucx/20240530101000-g3ugxml/20240530101000-ei5t6tt/20260804171006-aiagt04.sy
@@ -6,7 +6,7 @@
"id": "20260804171006-aiagt04",
"title": "AI エージェント",
"type": "doc",
- "updated": "20261026182137"
+ "updated": "20261027140312"
},
"Children": [
{
@@ -281,7 +281,7 @@
"HeadingLevel": 2,
"Properties": {
"id": "20260804170027-2jaadkf",
- "updated": "20261024164212"
+ "updated": "20261027140312"
},
"Children": [
{
@@ -502,7 +502,7 @@
"HeadingLevel": 3,
"Properties": {
"id": "20260804170039-9kcdqv4",
- "updated": "20261024164212"
+ "updated": "20261027140312"
},
"Children": [
{
@@ -561,12 +561,12 @@
"Type": "NodeParagraph",
"Properties": {
"id": "20261022182404-hxp98ok",
- "updated": "20261024164212"
+ "updated": "20261027140312"
},
"Children": [
{
"Type": "NodeText",
- "Data": "入力欄は文字や画像に合わせて自動的に高くなり、自動調整の上限に達するとスクロールします。デスクトップでは入力欄にマウスポインターを合わせると上端に小さなハンドルが表示され、タッチ画面では常に表示されます。ハンドルを上下にドラッグすると、許容範囲内で高さを固定でき、空の入力欄も広げられます。"
+ "Data": "入力欄は文字や画像に合わせて自動的に高くなり、パネルで利用可能な高さの上限に達するとスクロールします。デスクトップでは入力欄にマウスポインターを合わせると上端に小さなハンドルが表示され、タッチ画面では常に表示されます。ハンドルを上下にドラッグすると、現在のメッセージの入力中は高さが固定され、空の入力欄も広げられます。"
}
]
},
@@ -575,12 +575,12 @@
"Type": "NodeParagraph",
"Properties": {
"id": "20261024164212-5kzoj2e",
- "updated": "20261024164212"
+ "updated": "20261027140312"
},
"Children": [
{
"Type": "NodeText",
- "Data": "最小の高さはテキストを一行すべて表示できる大きさで、最大の高さはパネルの利用可能なスペースに応じて決まります。ハンドルをダブルクリックすると自動調整に戻ります。内容の前後にはスクロール用の余白があり、最初と最後の行を確認しやすくなっています。"
+ "Data": "最小の高さはテキストを一行すべて表示できる大きさで、最大の高さはパネルの利用可能なスペースに応じて決まります。メッセージを送信すると、空になった入力欄は初期の高さに戻り、次のメッセージでは再び自動調整されます。入力中にハンドルをダブルクリックして自動調整に戻すこともできます。内容の前後にはスクロール用の余白があり、最初と最後の行を確認しやすくなっています。"
}
]
},
diff --git a/app/src/layout/dock/agent/AgentChat.send.test.ts b/app/src/layout/dock/agent/AgentChat.send.test.ts
new file mode 100644
index 0000000000..1d74cce3ab
--- /dev/null
+++ b/app/src/layout/dock/agent/AgentChat.send.test.ts
@@ -0,0 +1,81 @@
+import * as assert from "node:assert/strict";
+import {readFileSync} from "node:fs";
+import {test} from "node:test";
+import {runInNewContext} from "node:vm";
+import {createSourceFile, isClassDeclaration, ScriptTarget, transpileModule} from "typescript";
+import type {AgentComposerData} from "./AgentComposer";
+
+const source = createSourceFile("AgentChat.ts", readFileSync("src/layout/dock/agent/AgentChat.ts", "utf8"),
+ ScriptTarget.Latest, true);
+const declaration = source.statements.find(item => isClassDeclaration(item) && item.name?.text === "AgentChat");
+assert.ok(declaration && isClassDeclaration(declaration));
+const method = declaration.members.find(item => item.name?.getText(source) === "sendMessage");
+assert.ok(method);
+const compiled = transpileModule(`class Chat { ${method.getText(source)} } globalThis.Chat = Chat;`, {
+ compilerOptions: {target: ScriptTarget.ES2021},
+}).outputText;
+
+const createChat = () => {
+ const events: string[] = [];
+ const sent: string[] = [];
+ const context: any = {
+ window: {siyuan: {config: {appearance: {lang: "en_US"}}}},
+ listCapabilityManifests: (): [] => [],
+ SessionStore: {newSessionId: () => "entry", getRevision: () => 1},
+ fetchAgentSSE: async (text: string) => { events.push("send"); sent.push(text); },
+ };
+ runInNewContext(compiled, context);
+ const chat = Object.assign(new context.Chat(), {
+ composer: {
+ isUploading: () => false,
+ getSendData: (): AgentComposerData => ({text: "Message", blockHTML: "<p>Message</p>", references: []}),
+ clear: () => events.push("clear"),
+ pushHistory: () => {},
+ },
+ composerResize: {reset: () => events.push("reset")},
+ captureEditorContext: (): undefined => undefined,
+ isCurrentSessionRunning: () => false,
+ modelOptions: [{id: "model"}],
+ prepareForNewTurn: async () => true,
+ setStreaming: () => {},
+ clearThinking: () => {},
+ getSelectedModel: () => "model",
+ entries: [],
+ messagesContainer: {innerHTML: ""},
+ appendUserMessage: () => {},
+ rebuildNavMarkers: () => {},
+ tryGenerateTitle: () => {},
+ saveSession: async () => {},
+ runController: {
+ begin: () => ({sessionID: "session", controller: new AbortController()}),
+ finish: async () => events.push("finish"),
+ },
+ });
+ return {chat, events, sent};
+};
+
+test("sending a new message resets composer height after clearing and before starting the response", async () => {
+ const {chat, events, sent} = createChat();
+ await chat.sendMessage();
+ assert.deepEqual(events, ["clear", "reset", "send", "finish"]);
+ assert.deepEqual(sent, ["Message"]);
+ assert.equal(chat.entries[0].content, "Message");
+});
+
+test("rejected sends preserve the current draft and its manually selected height", async () => {
+ const cases = [
+ (chat: any) => { chat.composer.isUploading = () => true; },
+ (chat: any) => { chat.composer.getSendData = (): AgentComposerData => ({text: "", blockHTML: "", references: []}); },
+ (chat: any) => { chat.isCurrentSessionRunning = () => true; },
+ (chat: any) => { chat.modelOptions = []; },
+ (chat: any) => { chat.prepareForNewTurn = async () => false; },
+ ];
+ for (const configure of cases) {
+ const {chat, events, sent} = createChat();
+ configure(chat);
+ await chat.sendMessage();
+ assert.deepEqual(events, []);
+ assert.deepEqual(sent, []);
+ assert.equal(chat.entries.length, 0);
+ }
+});
diff --git a/app/src/layout/dock/agent/AgentChat.ts b/app/src/layout/dock/agent/AgentChat.ts
index eab79533ea..d3148ce88e 100644
--- a/app/src/layout/dock/agent/AgentChat.ts
+++ b/app/src/layout/dock/agent/AgentChat.ts
@@ -198,7 +198,7 @@ export class AgentChat extends Model {
private panelElement: HTMLElement;
private messagesContainer: HTMLElement;
private composerHost: HTMLElement;
- private destroyComposerResize?: () => void;
+ private composerResize?: ReturnType<typeof bindAgentComposerResize>;
private composer: ReturnType<typeof mountComposer> | null = null;
private sendBtn: HTMLElement;
private stopBtn: HTMLElement;
@@ -345,7 +345,7 @@ export class AgentChat extends Model {
}
public destroy() {
- this.destroyComposerResize?.();
+ this.composerResize?.destroy();
this.welcomeObserver?.disconnect();
super.destroy();
}
@@ -471,8 +471,8 @@ export class AgentChat extends Model {
this.messagesContainer = panel.querySelector(".agent-chat__messages") as HTMLElement;
this.composerHost = panel.querySelector(".agent-chat__composer-host") as HTMLElement;
- this.destroyComposerResize?.();
- this.destroyComposerResize = bindAgentComposerResize(panel, this.composerHost,
+ this.composerResize?.destroy();
+ this.composerResize = bindAgentComposerResize(panel, this.composerHost,
panel.querySelector(".agent-chat__input-resize .protyle-block-resize"));
this.sendBtn = panel.querySelector(".agent-chat__send") as HTMLElement;
this.stopBtn = panel.querySelector(".agent-chat__stop") as HTMLElement;
@@ -2387,6 +2387,7 @@ export class AgentChat extends Model {
this.hasInterveningCard = false;
this.currentRoundID = "";
this.composer.clear();
+ this.composerResize?.reset();
const selectedModel = this.getSelectedModel();
const reasoningEffort = this.selectedReasoningEffort;
diff --git a/app/src/layout/dock/agent/AgentComposerResize.test.ts b/app/src/layout/dock/agent/AgentComposerResize.test.ts
index 426a01d8b6..66c6e25491 100644
--- a/app/src/layout/dock/agent/AgentComposerResize.test.ts
+++ b/app/src/layout/dock/agent/AgentComposerResize.test.ts
@@ -50,7 +50,7 @@ const cases = async (source: string, css: string, mobile: boolean) => {
`<div contenteditable="true" spellcheck="false">${text}</div></div>`;
const short = () => editor.innerHTML = paragraph("Short input");
short();
- const destroy = module.exports.bindAgentComposerResize(panel, composer, handle);
+ const resize = module.exports.bindAgentComposerResize(panel, composer, handle);
await tick();
const small = composer.clientHeight;
check.ok(small < 100, `short input stays compact: ${small}`);
@@ -126,7 +126,8 @@ const cases = async (source: string, css: string, mobile: boolean) => {
const long = () => editor.innerHTML = paragraph(image) + Array.from({length: 24}, (_, i) => paragraph(`Line ${i + 1}`)).join("");
long();
await tick();
- check.equal(composer.clientHeight, 240);
+ const automaticMaximum = panelHeight - 160;
+ check.equal(composer.clientHeight, automaticMaximum, "automatic growth uses the available panel space beyond 240px");
check.equal(composer.scrollHeight, composer.clientHeight, "only the inner editor scrolls");
check.ok(content.scrollHeight > content.clientHeight);
content.scrollTop = content.scrollHeight;
@@ -137,10 +138,10 @@ const cases = async (source: string, css: string, mobile: boolean) => {
check.ok(editor.firstElementChild.getBoundingClientRect().top - content.getBoundingClientRect().top >= 7);
handle.focus();
- key("ArrowUp");
- check.equal(composer.style.maxHeight, "264px");
key("ArrowDown");
- check.equal(composer.style.maxHeight, "240px");
+ check.equal(composer.style.height, `${automaticMaximum - 24}px`);
+ key("ArrowUp");
+ check.equal(composer.style.height, `${automaticMaximum}px`);
key("End");
check.equal(composer.style.maxHeight, `${panelHeight - 160}px`, "End uses the available panel height");
await tick();
@@ -149,14 +150,19 @@ const cases = async (source: string, css: string, mobile: boolean) => {
// 原生指针事件验证捕获、鼠标拖动以及触摸取消。
handle.dispatchEvent(new MouseEvent("dblclick", {bubbles: true}));
+ key("Home");
+ for (let i = 0; i < 8; i++) {
+ key("ArrowUp");
+ }
await tick();
+ const beforeDrag = composer.clientHeight;
const editable = editor.querySelector<HTMLElement>('[contenteditable="true"]');
editable.focus();
const rect = handle.getBoundingClientRect();
const x = Math.round(rect.left + rect.width / 2);
const y = Math.round(rect.top + rect.height / 2);
await require("electron").ipcRenderer.invoke("composer-drag", {x, y, dy: -100, touch: false});
- check.ok(composer.clientHeight >= 338 && composer.clientHeight <= 342, "mouse dragging raises the actual height");
+ check.equal(composer.clientHeight, beforeDrag + 100, "mouse dragging raises the actual height");
check.equal(handle.classList.contains("touch-resize-active"), false);
check.equal(document.activeElement, editable, "mouse dragging keeps focus in the composer");
check.equal(getComputedStyle(handle).outlineStyle, "none", "mouse dragging does not leave a keyboard focus box");
@@ -212,14 +218,30 @@ const cases = async (source: string, css: string, mobile: boolean) => {
});
check.equal(composer.style.height, preferred, "clicking without dragging does not change the chosen height");
handle.dispatchEvent(new MouseEvent("dblclick", {bubbles: true}));
- check.equal(composer.style.maxHeight, "240px", "double click restores the automatic cap");
+ check.equal(composer.style.maxHeight, `${automaticMaximum}px`, "double click restores the automatic height range");
await tick();
check.ok(composer.clientHeight < 120, "resetting returns short content to intrinsic height");
long();
await tick();
+ check.equal(composer.clientHeight, automaticMaximum, "restored automatic mode grows with the next input");
+ key("Home");
+ const manualHeight = composer.clientHeight;
+ short();
+ await tick();
+ long();
+ await tick();
+ check.equal(composer.clientHeight, manualHeight, "manually selected height stays fixed as content increases");
+ editor.innerHTML = paragraph("");
+ resize.reset();
+ await tick();
+ check.equal(composer.style.height, "", "sending clears the manually selected height");
+ check.equal(composer.clientHeight, Number(handle.getAttribute("aria-valuemin")), "the cleared input returns to its initial height");
+ long();
+ await tick();
+ check.equal(composer.clientHeight, automaticMaximum, "the next message grows automatically after sending");
key("End");
check.notEqual(composer.style.height, "");
- destroy();
+ resize.destroy();
key("End");
check.equal(composer.style.maxHeight, "", "destroy removes listeners and the temporary geometry");
check.equal(composer.style.height, "");
diff --git a/app/src/layout/dock/agent/AgentComposerResize.ts b/app/src/layout/dock/agent/AgentComposerResize.ts
index b4e1b65800..6d67deb828 100644
--- a/app/src/layout/dock/agent/AgentComposerResize.ts
+++ b/app/src/layout/dock/agent/AgentComposerResize.ts
@@ -1,4 +1,4 @@
-// 输入框默认随内容增高;手动调节后保持所选高度,双击把手恢复自动尺寸。
+// 输入框默认随内容增高;手动调节后保持所选高度,发送或双击把手恢复自动尺寸。
export const bindAgentComposerResize = (panel: HTMLElement, composer: HTMLElement, handle: HTMLElement) => {
const windowSelf = panel.ownerDocument.defaultView;
let preferred: number | undefined;
@@ -16,7 +16,7 @@ export const bindAgentComposerResize = (panel: HTMLElement, composer: HTMLElemen
minimum = Math.max(40, Math.ceil(parseFloat(windowSelf.getComputedStyle(composer).minHeight)) || 0);
// 给标题、操作栏和会话正文留出空间,软键盘弹出时也不能把发送按钮挤出面板。
maximum = Math.max(minimum, Math.floor(height - 160));
- const limit = Math.round(Math.max(minimum, Math.min(maximum, preferred ?? Math.min(240, height * .4))));
+ const limit = Math.round(Math.max(minimum, Math.min(maximum, preferred ?? maximum)));
composer.style.maxHeight = `${limit}px`;
composer.style.height = preferred === undefined ? "" : `${limit}px`;
value = composer.clientHeight;
@@ -110,7 +110,7 @@ export const bindAgentComposerResize = (panel: HTMLElement, composer: HTMLElemen
observer.observe(panel);
observer.observe(composer);
update();
- return () => {
+ const destroy = () => {
finish(true);
observer.disconnect();
handle.removeEventListener("pointerdown", down);
@@ -127,4 +127,5 @@ export const bindAgentComposerResize = (panel: HTMLElement, composer: HTMLElemen
composer.style.maxHeight = "";
composer.style.height = "";
};
+ return {reset, destroy};
};