Commit c8bc9838 by Archer Committed by GitHub

feat: app template;fix: chat test reset (#1838)

* feat: app template;fix: chat test reset

* template output

* template output
parent 5c8c7fb9
...@@ -46,12 +46,14 @@ curl --location --request POST 'https://{{host}}/api/admin/init/485' \ ...@@ -46,12 +46,14 @@ curl --location --request POST 'https://{{host}}/api/admin/init/485' \
1. 新增 - 合并插件和应用,统一成工作台 1. 新增 - 合并插件和应用,统一成工作台
2. 新增 - 应用创建副本功能 2. 新增 - 应用创建副本功能
3. 优化 - 原文件编码存取 3. 新增 - 应用创建模板
4. 优化 - 文件夹读取,支持单个文件夹超出 100 个文件 4. 新增 - 支持代码运行结果作为工具输出。
5. 优化 - 问答拆分/手动录入,当有`a`字段时,自动将`q`作为补充索引。 5. 优化 - 原文件编码存取
6. 优化 - 对话框页面代码 6. 优化 - 文件夹读取,支持单个文件夹超出 100 个文件
7. 修复 - SSR渲染 7. 优化 - 问答拆分/手动录入,当有`a`字段时,自动将`q`作为补充索引。
8. 修复 - 定时任务无法实际关闭 8. 优化 - 对话框页面代码
9. 修复 - 输入引导特殊字符导致正则报错 9. 修复 - SSR渲染
10. 修复 - 文件包含特殊字符`%`,且为转义时会导致页面崩溃 10. 修复 - 定时任务无法实际关闭
11. 修复 - 自定义输入选择知识库引用时页面崩溃 11. 修复 - 输入引导特殊字符导致正则报错
\ No newline at end of file 12. 修复 - 文件包含特殊字符`%`,且为转义时会导致页面崩溃
13. 修复 - 自定义输入选择知识库引用时页面崩溃
\ No newline at end of file
...@@ -272,7 +272,7 @@ Response: ...@@ -272,7 +272,7 @@ Response:
{ {
"key": "Authorization", "key": "Authorization",
"type": "string", "type": "string",
"value": "Bearer sk-zsfBsxEU3ApSFGYxF4CdB97e9556412588421823371b9f7b" "value": "Bearer "
} }
], ],
"label": "", "label": "",
......
...@@ -42,6 +42,7 @@ export const dispatchRunCode = async (props: RunCodeType): Promise<RunCodeRespon ...@@ -42,6 +42,7 @@ export const dispatchRunCode = async (props: RunCodeType): Promise<RunCodeRespon
customOutputs: runResult.data.codeReturn, customOutputs: runResult.data.codeReturn,
codeLog: runResult.data.log codeLog: runResult.data.log
}, },
[DispatchNodeResponseKeyEnum.toolResponses]: runResult.data.codeReturn,
...runResult.data.codeReturn ...runResult.data.codeReturn
}; };
} else { } else {
......
<svg t="1719285602998" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="13146" width="256" height="256"><path d="M383.853714 257.170286l-0.487619-4.681143c-14.019048-104.082286 73.264762-183.759238 184.758857-139.580953 45.83619 18.16381 94.329905 45.884952 126.415238 73.386667A30.47619 30.47619 0 0 1 654.872381 232.594286c-26.575238-22.77181-69.241905-47.201524-109.226667-63.024762-64.121905-25.404952-107.910095 12.653714-102.351238 70.631619l0.487619 4.169143c6.777905 50.785524-13.775238 96.207238-58.148571 114.663619-58.09981 24.137143-121.392762 5.510095-149.138286-55.344762-8.362667-18.334476-34.986667-33.475048-62.342095-32.402286-33.767619 1.316571-64.146286 25.404952-84.163048 77.653333-67.876571 177.005714 15.262476 371.614476 190.805334 441.148953 68.388571 27.111619 147.602286 30.549333 221.379047 11.702857a30.47619 30.47619 0 0 1 15.116191 59.050667c-85.869714 21.942857-178.176 17.92-258.925715-14.092191-206.848-81.92-305.005714-311.661714-225.28-519.631238C61.44 253.123048 112.39619 212.699429 171.78819 210.383238c49.39581-1.926095 97.475048 24.33219 117.906286 63.439238l2.243048 4.559238c13.04381 28.598857 40.569905 36.693333 70.314666 24.356572 15.36-6.38781 23.454476-22.601143 21.601524-45.592381zM826.343619 18.992762a30.47619 30.47619 0 0 1 52.370286 31.134476l-5.290667 9.313524-3.267048 5.948952c-7.070476 12.946286-14.969905 28.184381-23.478857 45.568a1723.026286 1723.026286 0 0 0-71.801904 169.618286c-3.730286 10.264381-7.387429 20.626286-10.971429 31.085714-27.843048 81.188571-43.715048 167.424-50.517333 250.148572a30.47619 30.47619 0 0 1-60.757334-4.998096c7.192381-87.381333 23.942095-178.41981 53.613715-264.923428 3.705905-10.825143 7.484952-21.528381 11.361523-32.134095a1783.710476 1783.710476 0 0 1 74.361905-175.640381l8.679619-17.456762c4.242286-8.362667 8.313905-16.164571 12.190476-23.405714l10.337524-18.797715c1.316571-2.31619 2.364952-4.144762 3.169524-5.461333zM990.305524 45.251048a30.47619 30.47619 0 0 1 28.135619 32.670476l-1.316572 13.921524a959.878095 959.878095 0 0 1-0.950857 8.387047l-2.291809 18.432c-1.706667 12.873143-3.754667 26.86781-6.217143 41.886476a1806.921143 1806.921143 0 0 1-47.542857 209.066667c-15.555048 53.76-37.034667 108.153905-62.927238 162.133333a1327.250286 1327.250286 0 0 1-61.147429 112.88381l-8.533333 13.897143c-2.730667 4.388571-5.412571 8.582095-7.948191 12.55619l-10.678857 16.140191a30.47619 30.47619 0 1 1-51.053714-33.353143l6.972952-10.410667 7.216762-11.215238a1266.736762 1266.736762 0 0 0 70.217143-126.902857c24.527238-51.102476 44.78781-102.4 59.318857-152.673524a1746.236952 1746.236952 0 0 0 45.958095-201.947428c2.340571-14.384762 4.315429-27.769905 5.924572-39.984762l2.194286-17.505524c1.145905-9.849905 1.755429-16.579048 2.023619-19.846095a30.47619 30.47619 0 0 1 29.525333-28.208762l3.120762 0.073143z" fill="#5AC2EE" p-id="13147"></path><path d="M594.944 641.609143c-6.192762 5.38819-13.848381 14.628571-20.967619 28.038095-17.529905 33.01181-23.235048 76.092952-11.434667 128.731429 9.581714 42.73981 3.85219 84.74819-11.702857 123.245714a213.113905 213.113905 0 0 1-11.142095 23.478857l-4.315429 7.265524c-15.335619 22.479238 4.217905 52.248381 30.939429 47.104 15.774476-3.023238 41.447619-11.337143 73.679238-27.452952 52.687238-26.331429 105.130667-65.462857 153.84381-119.759239 4.217905-4.705524 8.411429-9.532952 12.55619-14.457904 53.174857-63.24419 38.838857-154.209524-25.453714-203.580953-54.613333-41.984-131.779048-39.984762-182.393905 4.096l-3.608381 3.291429z m148.870095 40.935619c37.741714 29.013333 45.860571 80.457143 15.945143 116.004571-3.730286 4.437333-7.484952 8.777143-11.288381 13.019429l-8.728381 9.508571c-37.961143 40.350476-77.897143 70.38781-117.784381 91.672381l-4.486095 2.29181 1.194667-4.071619c10.069333-36.985905 12.775619-76.239238 5.266285-116.589715l-1.926095-9.337904c-8.630857-38.473143-4.87619-66.681905 5.802667-86.820572 2.925714-5.485714 5.461333-8.825905 6.631619-10.118095l1.536-1.438476c28.525714-27.209143 75.142095-29.257143 107.836952-4.144762z" fill="#5AC2EE" p-id="13148"></path><path d="M663.210667 743.545905c18.334476-7.314286 38.253714-9.508571 58.294857-2.998857l6.290286 2.340571 4.510476 1.950476c3.120762 1.487238 5.973333 3.169524 12.970666 7.484953l3.267048 1.999238c16.871619 10.361905 20.23619 10.556952 36.181333-3.291429a30.47619 30.47619 0 1 1 39.936 46.08c-37.497905 32.475429-68.266667 32.182857-103.765333 11.702857l-13.628952-8.216381a26.136381 26.136381 0 0 0-2.340572-1.219047l-0.902095-0.365715c-5.193143-2.072381-11.580952-1.511619-18.212571 1.145905l-3.82781 1.755429a30.47619 30.47619 0 1 1-33.401905-50.980572c3.34019-2.194286 8.289524-4.87619 14.628572-7.387428zM759.686095 498.688l96.889905 29.866667-17.944381 58.270476-96.914286-29.891048zM243.321905 571.075048a50.371048 50.371048 0 1 0 0 100.766476 50.371048 50.371048 0 0 0 0-100.766476z m0 39.814095a10.581333 10.581333 0 1 1 0 21.138286 10.581333 10.581333 0 0 1 0-21.138286zM402.529524 650.703238a50.371048 50.371048 0 1 0 0 100.742095 50.371048 50.371048 0 0 0 0-100.742095z m0 39.789714a10.581333 10.581333 0 1 1 0 21.162667 10.581333 10.581333 0 0 1 0-21.162667zM183.588571 411.867429a50.371048 50.371048 0 1 0 0 100.766476 50.371048 50.371048 0 0 0 0-100.766476z m0 39.814095a10.581333 10.581333 0 1 1 0 21.138286 10.581333 10.581333 0 0 1 0-21.138286zM561.761524 252.635429a50.371048 50.371048 0 1 0 0 100.766476 50.371048 50.371048 0 0 0 0-100.766476z m0 39.814095a10.556952 10.556952 0 1 1 0 21.138286 10.556952 10.556952 0 0 1 0-21.138286z" fill="#5AC2EE" p-id="13149"></path></svg>
\ No newline at end of file
<svg t="1719284536895" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5409" width="256" height="256"><path d="M891.318857 340.845714c4.900571 0 9.728 0.292571 14.628572 0.804572a409.965714 409.965714 0 0 1 108.836571 30.061714c10.093714 4.534857 12.580571 8.192 3.949714 17.334857-24.868571 26.624-45.494857 57.051429-61.001143 89.965714-16.822857 35.328-35.108571 69.851429-52.297142 105.033143a225.28 225.28 0 0 1-52.150858 69.412572c-53.613714 48.493714-116.150857 68.973714-187.538285 59.099428-81.92-11.337143-159.451429-38.985143-232.740572-75.483428a143.506286 143.506286 0 0 1-10.459428-5.485715 5.339429 5.339429 0 0 1 0.292571-9.216l5.12-2.706285c59.245714-31.670857 108.836571-75.849143 156.525714-122.294857 20.187429-19.529143 39.497143-40.009143 59.904-59.318858A345.014857 345.014857 0 0 1 804.571429 352.256c13.165714-3.218286 26.550857-5.778286 39.789714-8.630857h0.585143l28.233143-2.56" fill="#133C9A" p-id="5410"></path><path d="M317.659429 913.846857c-8.996571-0.512-31.158857-3.584-33.865143-3.949714a536.429714 536.429714 0 0 1-165.083429-48.274286c-30.208-14.116571-59.245714-30.72-88.356571-46.957714-19.163429-10.678857-27.794286-27.282286-27.648-49.883429 0.585143-83.382857 0.585143-166.765714 0-250.148571C2.413714 461.019429 0.731429 407.405714 0 353.718857c0-4.754286 0.731429-9.508571 2.194286-13.897143 3.291429-9.728 9.947429-10.24 16.530285-3.949714 7.606857 7.314286 13.677714 16.237714 21.211429 23.405714 67.291429 66.413714 138.752 127.195429 218.770286 177.225143 45.056 28.891429 91.940571 54.710857 140.434285 77.385143 77.750857 35.328 157.549714 66.486857 241.078858 86.235429 73.874286 17.481143 145.627429 6.436571 205.458285-40.374858 18.285714-15.652571 27.282286-27.062857 48.932572-55.881142a359.862857 359.862857 0 0 1-37.376 72.850285c-13.897143 21.942857-45.348571 51.2-69.193143 74.093715-36.278857 35.108571-83.748571 63.561143-128.292572 87.552-48.566857 26.185143-99.035429 47.104-152.941714 58.514285-27.648 6.948571-67.584 14.848-81.334857 15.579429-2.413714-0.146286-10.678857 1.682286-14.848 1.389714-35.547429 2.633143-57.490286 3.657143-92.891429 0z" fill="#3370FF" p-id="5411"></path><path d="M165.083429 110.518857a52.443429 52.443429 0 0 1 7.460571 0c152.649143 0 304.128 2.486857 456.630857 2.486857 0.292571 0 0.585143 0 0.731429 0.219429 14.189714 12.361143 27.282286 25.746286 39.277714 40.155428 34.450286 34.230857 60.123429 93.622857 77.677714 129.755429 8.777143 25.014857 21.942857 48.859429 28.16 76.8v0.438857c-15.579429 5.046857-30.72 11.190857-45.348571 18.505143-44.178286 22.381714-64.219429 38.765714-100.790857 74.752-19.968 19.529143-37.010286 37.083429-63.488 62.098286a563.346286 563.346286 0 0 1-29.769143 26.916571c-7.021714-12.434286-125.732571-244.589714-364.251429-427.300571" fill="#00D6B9" p-id="5412"></path></svg>
\ No newline at end of file
<svg t="1719285050683" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6411" width="256" height="256"><path d="M214.101333 512c0-32.512 5.546667-63.701333 15.36-92.928L57.173333 290.218667A491.861333 491.861333 0 0 0 4.693333 512c0 79.701333 18.858667 154.88 52.394667 221.610667l172.202667-129.066667A290.56 290.56 0 0 1 214.101333 512" fill="#FBBC05" p-id="6412"></path><path d="M516.693333 216.192c72.106667 0 137.258667 25.002667 188.458667 65.962667L854.101333 136.533333C763.349333 59.178667 646.997333 11.392 516.693333 11.392c-202.325333 0-376.234667 113.28-459.52 278.826667l172.373334 128.853333c39.68-118.016 152.832-202.88 287.146666-202.88" fill="#EA4335" p-id="6413"></path><path d="M516.693333 807.808c-134.357333 0-247.509333-84.864-287.232-202.88l-172.288 128.853333c83.242667 165.546667 257.152 278.826667 459.52 278.826667 124.842667 0 244.053333-43.392 333.568-124.757333l-163.584-123.818667c-46.122667 28.458667-104.234667 43.776-170.026666 43.776" fill="#34A853" p-id="6414"></path><path d="M1005.397333 512c0-29.568-4.693333-61.44-11.648-91.008H516.650667V614.4h274.602666c-13.696 65.962667-51.072 116.650667-104.533333 149.632l163.541333 123.818667c93.994667-85.418667 155.136-212.650667 155.136-375.850667" fill="#4285F4" p-id="6415"></path></svg>
\ No newline at end of file
<svg t="1719284028629" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4376" width="256" height="256"><path d="M381.5 483.7c0-53.1 43.2-96.3 96.3-96.3h85v-187c0-9.4-7.6-17-17-17H137.9c-9.4 0-17 7.6-17 17v283.3c0 9.4 7.6 17 17 17h73.6v32.1l64.3-32.1h105.7v-17z" fill="#9ADCCF" p-id="4377"></path><path d="M747.7 784h-270c-9.4 0-17-7.6-17-17V483.7c0-9.4 7.6-17 17-17h407.9c9.4 0 17 7.6 17 17V767c0 9.4-7.6 17-17 17H812v32.1L747.7 784z" fill="#FFF370" p-id="4378"></path><path d="M341.8 523.4h-56.7c-2.6 0-5.2 0.6-7.6 1.8l-88.7 44.4v-29.2c0-9.4-7.6-17-17-17h-34c-21.9 0-39.7-17.8-39.7-39.7V200.5c0-21.9 17.8-39.7 39.7-39.7h407.9c21.9 0 39.7 17.8 39.7 39.7v147.3c0 9.4 7.6 17 17 17s17-7.6 17-17V200.5c0-40.6-33-73.6-73.6-73.6H137.9c-40.6 0-73.6 33-73.6 73.6v283.3c0 40.6 33 73.6 73.6 73.6h17V597c0 5.9 3 11.4 8.1 14.5 2.7 1.7 5.8 2.5 8.9 2.5 2.6 0 5.2-0.6 7.6-1.8l109.7-54.9h52.6c9.4 0 17-7.6 17-17 0-9.3-7.6-16.9-17-16.9z" fill="#4F3D3B" p-id="4379"></path><path d="M885.7 410.1h-65.8c-9.4 0-17 7.6-17 17s7.6 17 17 17h65.8c21.9 0 39.7 17.8 39.7 39.7V767c0 21.9-17.8 39.7-39.7 39.7h-34c-9.4 0-17 7.6-17 17v29.2L746 808.4c-2.4-1.2-5-1.8-7.6-1.8H477.8c-21.9 0-39.7-17.8-39.7-39.7V483.7c0-21.9 17.8-39.7 39.7-39.7h249.3c9.4 0 17-7.6 17-17s-7.6-17-17-17H477.8c-12.9 0-25 3.3-35.5 9.2l-85-180.7c-2.8-6-8.8-9.8-15.4-9.8s-12.6 3.8-15.4 9.8l-90.6 192.6c-4 8.5-0.3 18.6 8.1 22.6 8.5 4 18.6 0.3 22.6-8.1l19.4-41.2h111.7l18.4 39.1c-7.6 11.6-12 25.4-12 40.2V767c0 40.6 33 73.6 73.6 73.6h256.6L844 895.5c2.4 1.2 5 1.8 7.6 1.8 3.1 0 6.2-0.9 8.9-2.5 5-3.1 8.1-8.6 8.1-14.5v-39.7h17c40.6 0 73.6-33 73.6-73.6V483.7c0.1-40.6-32.9-73.6-73.5-73.6z m-583.8-39.7l39.9-84.7 39.9 84.7h-79.8zM358 733.9c-0.2-0.6-0.3-1.1-0.5-1.7-0.2-0.6-0.6-1.1-0.9-1.7-0.2-0.4-0.4-0.8-0.7-1.2-1.2-1.9-2.9-3.5-4.7-4.7-0.4-0.3-0.8-0.4-1.2-0.6-0.6-0.3-1.1-0.7-1.7-0.9-0.5-0.2-1.1-0.3-1.7-0.5-0.5-0.2-1-0.3-1.5-0.4-1.1-0.2-2.2-0.3-3.3-0.3H241c-21.9 0-39.7-17.8-39.7-39.7v-17.1c0-9.4-7.6-17-17-17s-17 7.6-17 17V682c0 40.6 33 73.6 73.6 73.6h59.8L284.5 772c-6.6 6.6-6.6 17.4 0 24 3.3 3.3 7.7 5 12 5s8.7-1.7 12-5l45.3-45.3c0.8-0.8 1.5-1.7 2.1-2.6 0.3-0.4 0.4-0.8 0.7-1.2 0.3-0.6 0.6-1.1 0.9-1.7 0.2-0.5 0.4-1.1 0.5-1.7 0.1-0.5 0.3-1 0.4-1.5 0.4-2.2 0.4-4.5 0-6.7 0-0.5-0.2-1-0.4-1.4zM665.5 222.3c0.2 0.6 0.3 1.1 0.5 1.7 0.2 0.6 0.6 1.1 0.9 1.7 0.2 0.4 0.4 0.8 0.7 1.2 1.2 1.9 2.9 3.5 4.7 4.7 0.4 0.3 0.8 0.4 1.2 0.6 0.6 0.3 1.1 0.7 1.7 0.9 0.5 0.2 1.1 0.3 1.7 0.5 0.5 0.2 1 0.3 1.5 0.4 1.1 0.2 2.2 0.3 3.3 0.3h100.8c21.9 0 39.7 17.8 39.7 39.7v73.6c0 9.4 7.6 17 17 17s17-7.6 17-17V274c0-40.6-33-73.6-73.6-73.6h-59.8l16.3-16.3c6.6-6.6 6.6-17.4 0-24-6.6-6.6-17.4-6.6-24 0l-45.3 45.3c-0.8 0.8-1.5 1.7-2.1 2.6-0.3 0.4-0.4 0.8-0.7 1.2-0.3 0.6-0.6 1.1-0.9 1.7-0.2 0.5-0.4 1.1-0.5 1.7-0.1 0.5-0.3 1-0.4 1.5-0.4 2.2-0.4 4.5 0 6.7 0 0.5 0.2 1 0.3 1.5z" fill="#4F3D3B" p-id="4380"></path><path d="M681.7 750c9.4 0 17-7.6 17-17v-45.3H778c9.4 0 17-7.6 17-17V580c0-9.4-7.6-17-17-17h-79.3v-45.3c0-9.4-7.6-17-17-17s-17 7.6-17 17V563h-79.3c-9.4 0-17 7.6-17 17v90.6c0 9.4 7.6 17 17 17h79.3V733c0 9.4 7.6 17 17 17z m17-153H761v56.7h-62.3V597z m-96.3 56.7V597h62.3v56.7h-62.3z" fill="#4F3D3B" p-id="4381"></path></svg>
\ No newline at end of file
...@@ -316,8 +316,8 @@ export const ResponseBox = React.memo(function ResponseBox({ ...@@ -316,8 +316,8 @@ export const ResponseBox = React.memo(function ResponseBox({
)} )}
{/* code */} {/* code */}
<Row label={workflowT('response.Custom inputs')} value={activeModule?.customInputs} />
<Row label={workflowT('response.Custom outputs')} value={activeModule?.customOutputs} /> <Row label={workflowT('response.Custom outputs')} value={activeModule?.customOutputs} />
<Row label={workflowT('response.Custom inputs')} value={activeModule?.customInputs} />
<Row label={workflowT('response.Code log')} value={activeModule?.codeLog} /> <Row label={workflowT('response.Code log')} value={activeModule?.codeLog} />
</Box> </Box>
</> </>
......
import type { StoreNodeItemType } from '@fastgpt/global/core/workflow/type/index.d'; import type { StoreNodeItemType } from '@fastgpt/global/core/workflow/type/index.d';
import React, { useRef, forwardRef, ForwardedRef, useImperativeHandle } from 'react'; import React, { forwardRef, ForwardedRef } from 'react';
import { SmallCloseIcon } from '@chakra-ui/icons'; import { SmallCloseIcon } from '@chakra-ui/icons';
import { Box, Flex, IconButton } from '@chakra-ui/react'; import { Box, Flex, IconButton } from '@chakra-ui/react';
import MyIcon from '@fastgpt/web/components/common/Icon'; import MyIcon from '@fastgpt/web/components/common/Icon';
import MyTooltip from '@fastgpt/web/components/common/MyTooltip'; import MyTooltip from '@fastgpt/web/components/common/MyTooltip';
import { useUserStore } from '@/web/support/user/useUserStore';
import type { ComponentRef } from '@/components/ChatBox/type.d';
import { useTranslation } from 'next-i18next'; import { useTranslation } from 'next-i18next';
import { StoreEdgeItemType } from '@fastgpt/global/core/workflow/type/edge'; import { StoreEdgeItemType } from '@fastgpt/global/core/workflow/type/edge';
...@@ -32,7 +30,6 @@ const ChatTest = ( ...@@ -32,7 +30,6 @@ const ChatTest = (
ref: ForwardedRef<ChatTestComponentRef> ref: ForwardedRef<ChatTestComponentRef>
) => { ) => {
const { t } = useTranslation(); const { t } = useTranslation();
const ChatBoxRef = useRef<ComponentRef>(null);
const { appDetail } = useContextSelector(AppContext, (v) => v); const { appDetail } = useContextSelector(AppContext, (v) => v);
const { resetChatBox, ChatBox } = useChatTest({ const { resetChatBox, ChatBox } = useChatTest({
...@@ -41,10 +38,6 @@ const ChatTest = ( ...@@ -41,10 +38,6 @@ const ChatTest = (
chatConfig: appDetail.chatConfig chatConfig: appDetail.chatConfig
}); });
useImperativeHandle(ref, () => ({
resetChatTest: resetChatBox
}));
return ( return (
<> <>
<Box <Box
...@@ -84,9 +77,7 @@ const ChatTest = ( ...@@ -84,9 +77,7 @@ const ChatTest = (
borderRadius={'md'} borderRadius={'md'}
aria-label={'delete'} aria-label={'delete'}
onClick={(e) => { onClick={(e) => {
e.stopPropagation(); resetChatBox();
ChatBoxRef.current?.resetHistory([]);
ChatBoxRef.current?.resetVariables();
}} }}
/> />
</MyTooltip> </MyTooltip>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment