balibabu commited on
Commit
ee64c42
·
1 Parent(s): 94c4106

Fix: An error occurred when deleting a new conversation #3898 (#3900)

Browse files

### What problem does this PR solve?

Fix: An error occurred when deleting a new conversation #3898

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)

web/src/locales/en.ts CHANGED
@@ -160,7 +160,7 @@ export default {
160
  delimiterTip:
161
  'Supports multiple characters as separators, and the multiple character separators are wrapped with `. For example, if it is configured like this: \n`##`; then the text will be separated by line breaks, two #s and a semicolon, and then assembled according to the size of the "token number".',
162
  html4excel: 'Excel to HTML',
163
- html4excelTip: `When enabled, the spreadsheet will be parsed into HTML tables; otherwise, it will be parsed into key-value pairs by row.`,
164
  autoKeywords: 'Auto-keyword',
165
  autoKeywordsTip: `Extract N keywords for each chunk to increase their ranking for queries containing those keywords. You can check or update the added keywords for a chunk from the chunk list. Be aware that extra tokens will be consumed by the LLM specified in 'System model settings'.`,
166
  autoQuestions: 'Auto-question',
 
160
  delimiterTip:
161
  'Supports multiple characters as separators, and the multiple character separators are wrapped with `. For example, if it is configured like this: \n`##`; then the text will be separated by line breaks, two #s and a semicolon, and then assembled according to the size of the "token number".',
162
  html4excel: 'Excel to HTML',
163
+ html4excelTip: `When enabled, the spreadsheet will be parsed into HTML tables, and at most 256 rows for one table. Otherwise, it will be parsed into key-value pairs by row.`,
164
  autoKeywords: 'Auto-keyword',
165
  autoKeywordsTip: `Extract N keywords for each chunk to increase their ranking for queries containing those keywords. You can check or update the added keywords for a chunk from the chunk list. Be aware that extra tokens will be consumed by the LLM specified in 'System model settings'.`,
166
  autoQuestions: 'Auto-question',
web/src/locales/zh-traditional.ts CHANGED
@@ -156,7 +156,7 @@ export default {
156
  delimiterTip:
157
  '支援多字元作為分隔符,多字元分隔符用`包裹。如配置成這樣:\n`##`;那麼就會用換行,兩個#以及分號先對文字進行分割,然後按照「 token number」大小進行拼裝。',
158
  html4excel: '表格轉HTML',
159
- html4excelTip: `Excel 是否會被解析為 HTML 表格。如果為 FALSE,Excel 中的每一行都會形成一個區塊。`,
160
  autoKeywords: '自動關鍵字',
161
  autoKeywordsTip: `在查詢此類關鍵字時,為每個區塊提取 N 個關鍵字以提高其排名分數。在「系統模型設定」中設定的 LLM 將消耗額外的 token。您可以在區塊清單中查看結果。 `,
162
  autoQuestions: '自動問題',
 
156
  delimiterTip:
157
  '支援多字元作為分隔符,多字元分隔符用`包裹。如配置成這樣:\n`##`;那麼就會用換行,兩個#以及分號先對文字進行分割,然後按照「 token number」大小進行拼裝。',
158
  html4excel: '表格轉HTML',
159
+ html4excelTip: `啟用後,電子表格將解析為 HTML 表格,一張表格最多 256 行。否則,會按行解析成鍵值對。`,
160
  autoKeywords: '自動關鍵字',
161
  autoKeywordsTip: `在查詢此類關鍵字時,為每個區塊提取 N 個關鍵字以提高其排名分數。在「系統模型設定」中設定的 LLM 將消耗額外的 token。您可以在區塊清單中查看結果。 `,
162
  autoQuestions: '自動問題',
web/src/locales/zh.ts CHANGED
@@ -157,7 +157,7 @@ export default {
157
  delimiterTip:
158
  '支持多字符作为分隔符,多字符分隔符用`包裹。如配置成这样:\n`##`;那么就会用换行,两个#以及分号先对文本进行分割,然后按照“ token number”大小进行拼装。',
159
  html4excel: '表格转HTML',
160
- html4excelTip: `Excel 是否将被解析为 HTML 表。如果为 FALSE,Excel 中的每一行都将形成一个块。`,
161
  autoKeywords: '自动关键词',
162
  autoKeywordsTip: `在查询此类关键词时,为每个块提取 N 个关键词以提高其排名得分。在“系统模型设置”中设置的 LLM 将消耗额外的 token。您可以在块列表中查看结果。`,
163
  autoQuestions: '自动问题',
 
157
  delimiterTip:
158
  '支持多字符作为分隔符,多字符分隔符用`包裹。如配置成这样:\n`##`;那么就会用换行,两个#以及分号先对文本进行分割,然后按照“ token number”大小进行拼装。',
159
  html4excel: '表格转HTML',
160
+ html4excelTip: `开启后电子表格会被解析为 HTML 表格,每张表格最多 256 行,否则会按行解析为键值对。`,
161
  autoKeywords: '自动关键词',
162
  autoKeywordsTip: `在查询此类关键词时,为每个块提取 N 个关键词以提高其排名得分。在“系统模型设置”中设置的 LLM 将消耗额外的 token。您可以在块列表中查看结果。`,
163
  autoQuestions: '自动问题',
web/src/pages/chat/index.tsx CHANGED
@@ -328,17 +328,19 @@ const Chat = () => {
328
  {x.name}
329
  </Text>
330
  </div>
331
- {conversationActivated === x.id && x.id !== '' && (
332
- <section>
333
- <Dropdown
334
- menu={{ items: buildConversationItems(x.id) }}
335
- >
336
- <ChatAppCube
337
- className={styles.cubeIcon}
338
- ></ChatAppCube>
339
- </Dropdown>
340
- </section>
341
- )}
 
 
342
  </Flex>
343
  </Card>
344
  ))}
 
328
  {x.name}
329
  </Text>
330
  </div>
331
+ {conversationActivated === x.id &&
332
+ x.id !== '' &&
333
+ !x.is_new && (
334
+ <section>
335
+ <Dropdown
336
+ menu={{ items: buildConversationItems(x.id) }}
337
+ >
338
+ <ChatAppCube
339
+ className={styles.cubeIcon}
340
+ ></ChatAppCube>
341
+ </Dropdown>
342
+ </section>
343
+ )}
344
  </Flex>
345
  </Card>
346
  ))}