Skip to content

Commit a78b30d

Browse files
committed
feat: Add parameter configuration to hide show SQL button & hide execute log in chat
1 parent 99308c9 commit a78b30d

8 files changed

Lines changed: 28 additions & 28 deletions

File tree

frontend/src/i18n/en.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@
7171
"platform_user_roles": "Third-Party Platform User Roles",
7272
"excessive_data_volume": "Disabling the 1000-row data limit may cause system lag due to excessive data volume.",
7373
"sqlbot_name": "Data Query Assistant Name",
74-
"hide_sql": "Hide Show SQL Button",
75-
"hide_log": "Hide Execution Log",
74+
"show_sql": "Show SQL Button",
75+
"show_log": "Show Execution Log",
7676
"prompt": "Prompt",
7777
"disabling_successfully": "Disabling Successfully",
7878
"closed_by_default": "In the Question Count window, control whether the model thinking process is expanded or closed by default.",

frontend/src/i18n/ko-KR.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@
7171
"platform_user_roles": "타사 플랫폼 사용자 역할",
7272
"excessive_data_volume": "1,000행 데이터 제한을 비활성화하면 과도한 데이터 양으로 인해 시스템 지연이 발생할 수 있습니다.",
7373
"sqlbot_name": "데이터 질의 도우미 이름",
74-
"hide_sql": "SQL 표시 버튼 숨기기",
75-
"hide_log": "실행 로그 숨기기",
74+
"show_sql": "SQL 버튼 표시",
75+
"show_log": "실행 로그 표시",
7676
"prompt": "프롬프트",
7777
"disabling_successfully": "비활성화 완료",
7878
"closed_by_default": "질문 수 창에서 모델 사고 프로세스를 기본적으로 확장할지 또는 닫을지 여부를 제어합니다.",

frontend/src/i18n/zh-CN.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@
7171
"platform_user_roles": "第三方平台用户角色",
7272
"excessive_data_volume": "关闭1000行的数据限制后,数据量过大,可能会造成系统卡顿",
7373
"sqlbot_name": "问数小助手名称",
74-
"hide_sql": "隐藏展示SQL按钮",
75-
"hide_log": "隐藏执行日志",
74+
"show_sql": "显示展示SQL按钮",
75+
"show_log": "显示执行日志",
7676
"prompt": "提示",
7777
"disabling_successfully": "关闭成功",
7878
"closed_by_default": "在问数窗口中,控制模型思考过程默认展开或者关闭",

frontend/src/i18n/zh-TW.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@
7171
"platform_user_roles": "第三方平台使用者角色",
7272
"excessive_data_volume": "關閉1000列的資料限制後,資料量過大,可能會造成系統卡頓",
7373
"sqlbot_name": "問數小助手名稱",
74-
"hide_sql": "隱藏展示SQL按鈕",
75-
"hide_log": "隱藏執行日誌",
74+
"show_sql": "顯示展示SQL按鈕",
75+
"show_log": "顯示執行日誌",
7676
"prompt": "提示",
7777
"disabling_successfully": "關閉成功",
7878
"closed_by_default": "在問數視窗中,控制模型思考過程預設展開或者關閉",

frontend/src/stores/chatConfig.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ interface ChatConfig {
77
sqlbot_name: string
88
expand_thinking_block: boolean
99
limit_rows: boolean
10-
hide_sql: boolean
11-
hide_log: boolean
10+
show_sql: boolean
11+
show_log: boolean
1212
}
1313

1414
export const chatConfigStore = defineStore('chatConfigStore', {
@@ -17,8 +17,8 @@ export const chatConfigStore = defineStore('chatConfigStore', {
1717
sqlbot_name: 'SQLBot',
1818
expand_thinking_block: false,
1919
limit_rows: true,
20-
hide_sql: false,
21-
hide_log: false,
20+
show_sql: true,
21+
show_log: true,
2222
}
2323
},
2424
getters: {
@@ -28,11 +28,11 @@ export const chatConfigStore = defineStore('chatConfigStore', {
2828
getExpandThinkingBlock(): boolean {
2929
return this.expand_thinking_block
3030
},
31-
getHideSQL(): boolean {
32-
return this.hide_sql
31+
getShowSQL(): boolean {
32+
return this.show_sql
3333
},
34-
getHideLog(): boolean {
35-
return this.hide_log
34+
getShowLog(): boolean {
35+
return this.show_log
3636
},
3737
getLimitRows(): boolean {
3838
return this.limit_rows
@@ -46,11 +46,11 @@ export const chatConfigStore = defineStore('chatConfigStore', {
4646
if (item.pkey === 'chat.expand_thinking_block') {
4747
this.expand_thinking_block = formatArg(item.pval)
4848
}
49-
if (item.pkey === 'chat.hide_sql') {
50-
this.hide_sql = formatArg(item.pval)
49+
if (item.pkey === 'chat.show_sql') {
50+
this.show_sql = formatArg(item.pval)
5151
}
52-
if (item.pkey === 'chat.hide_log') {
53-
this.hide_log = formatArg(item.pval)
52+
if (item.pkey === 'chat.show_log') {
53+
this.show_log = formatArg(item.pval)
5454
}
5555
if (item.pkey === 'chat.limit_rows') {
5656
this.limit_rows = formatArg(item.pval)

frontend/src/views/chat/ChatTokenTime.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const props = defineProps<{
99
totalTokens?: number | undefined
1010
}>()
1111
const chatConfig = useChatConfigStore()
12-
const showLogBtn = !chatConfig.getHideLog
12+
const showLogBtn = chatConfig.getShowLog
1313
const executionDetailsRef = ref()
1414
function getLogList() {
1515
executionDetailsRef.value.getLogList(props.recordId)

frontend/src/views/chat/chat-block/ChartBlock.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import { chatApi } from '@/api/chat'
2929
import { useChatConfigStore } from '@/stores/chatConfig.ts'
3030
3131
const chatConfig = useChatConfigStore()
32-
const showSQLBtn = !chatConfig.getHideSQL
32+
const showSQLBtn = chatConfig.getShowSQL
3333
const props = withDefaults(
3434
defineProps<{
3535
recordId?: number

frontend/src/views/system/parameter/index.vue

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ const state = reactive({
1212
'chat.sqlbot_name': 'SQLBot',
1313
'chat.expand_thinking_block': false,
1414
'chat.limit_rows': false,
15-
'chat.hide_sql': false,
16-
'chat.hide_log': false,
15+
'chat.show_sql': false,
16+
'chat.show_log': false,
1717
}),
1818
})
1919
provide('parameterForm', state.parameterForm)
@@ -153,18 +153,18 @@ onMounted(() => {
153153
<el-row>
154154
<div class="card-item">
155155
<div class="label">
156-
{{ t('parameter.hide_sql') }}
156+
{{ t('parameter.show_sql') }}
157157
</div>
158158
<div class="value">
159-
<el-switch v-model="state.parameterForm['chat.hide_sql']" />
159+
<el-switch v-model="state.parameterForm['chat.show_sql']" />
160160
</div>
161161
</div>
162162
<div class="card-item" style="margin-left: 16px">
163163
<div class="label">
164-
{{ t('parameter.hide_log') }}
164+
{{ t('parameter.show_log') }}
165165
</div>
166166
<div class="value">
167-
<el-switch v-model="state.parameterForm['chat.hide_log']" />
167+
<el-switch v-model="state.parameterForm['chat.show_log']" />
168168
</div>
169169
</div>
170170
</el-row>

0 commit comments

Comments
 (0)