Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion frontend/src/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@
"lark": "Lark",
"larksuite": "Larksuite",
"dingtalk": "DingTalk",
"wechat_for_business": "WeChat for business",
"wecom": "WeCom",
"1240_results": "{msg} results",
"clear_conditions": "Clear conditions",
"disabled": "Disabled",
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/i18n/ko-KR.json
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@
"lark": "페이슈",
"larksuite": "페이수 (Pei-su)",
"dingtalk": "딩톡",
"wechat_for_business": "기업용 위챗",
"wecom": "기업용 위챗",
"1240_results": "{msg}개 결과 ",
"clear_conditions": "조건 지우기",
"disabled": "비활성화됨",
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/i18n/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@
"lark": "飞书",
"larksuite": "国际飞书",
"dingtalk": "钉钉",
"wechat_for_business": "企业微信",
"wecom": "企业微信",
"1240_results": "{msg} 个结果 ",
"clear_conditions": "清空条件",
"disabled": "已禁用",
Expand Down
27 changes: 16 additions & 11 deletions frontend/src/views/chat/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -569,6 +569,8 @@ let scrollTime: any
let scrollingTime: any
let scrollTopVal = 0
let scrolling = false
let userScrolledAway = false // 用户是否主动滚动离开底部

const scrollBottom = () => {
if (scrolling) return
if (!isTyping.value && !getRecommendQuestionsLoading.value) {
Expand All @@ -588,22 +590,25 @@ const handleScroll = (val: any) => {
scrollingTime = setTimeout(() => {
scrolling = false
}, 400)
if (
scrollTopVal + 200 <
innerRef.value!.clientHeight - (document.querySelector('.chat-record-list')!.clientHeight - 20)
) {

const threshold =
innerRef.value!.clientHeight -
(document.querySelector('.chat-record-list')!.clientHeight - 20)
const isNearBottom = scrollTopVal + 50 >= threshold

// 用户滚动离开底部时,标记并停止自动滚动
if (!isNearBottom) {
userScrolledAway = true
clearInterval(scrollTime)
scrollTime = null
return
}

if (
!scrollTime &&
isTyping.value &&
scrollTopVal + 30 <
innerRef.value!.clientHeight -
(document.querySelector('.chat-record-list')!.clientHeight - 20)
) {
// 用户滚回底部时,重置标记
userScrolledAway = false

// 只有用户在底部、没有主动滚走、且正在输入时才启动自动滚动
if (!scrollTime && isTyping.value && !userScrolledAway) {
scrollTime = setInterval(() => {
scrollBottom()
}, 300)
Expand Down
8 changes: 2 additions & 6 deletions frontend/src/views/login/xpack/QrTab.vue
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
<template>
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane
v-if="props.wecom"
:label="t('user.wechat_for_business')"
name="wecom"
></el-tab-pane>
<el-tab-pane v-if="props.wecom" :label="t('user.wecom')" name="wecom"></el-tab-pane>
<el-tab-pane v-if="props.dingtalk" :label="t('user.dingtalk')" name="dingtalk"></el-tab-pane>
<el-tab-pane v-if="props.lark" :label="t('user.lark')" name="lark"></el-tab-pane>
<el-tab-pane v-if="props.larksuite" :label="t('user.larksuite')" name="larksuite"></el-tab-pane>
Expand All @@ -14,7 +10,7 @@
<el-icon>
<Icon name="logo_wechat-work"><logo_wechatWork class="svg-icon" /></Icon>
</el-icon>
{{ t('user.wechat_for_business') }}
{{ t('user.wecom') }}
</div>
<div class="qrcode">
<wecom-qr v-if="activeName === 'wecom'" />
Expand Down
6 changes: 3 additions & 3 deletions frontend/src/views/system/platform/common/SettingTemplate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,14 +105,14 @@ export const settingMapping = {

export const cardMapping = {
6: {
title: 'user.wechat_for_business',
icon: logo_dingtalk,
title: 'user.wecom',
icon: logo_wechatWork,
settingList: settingMapping[6],
copyField: ['CorpId', 'APP Secret'],
},
7: {
title: 'user.dingtalk',
icon: logo_wechatWork,
icon: logo_dingtalk,
settingList: settingMapping[7],
copyField: ['CorpId', 'APP Secret'],
},
Expand Down
16 changes: 15 additions & 1 deletion frontend/src/views/system/user/User.vue
Original file line number Diff line number Diff line change
Expand Up @@ -435,6 +435,10 @@ const filterOption = ref<any[]>([
{ id: '3', name: 'LDAP' },
{ id: '4', name: 'OAuth2' },
/* { id: '5', name: 'SAML2' }, */
{ id: '6', name: t('user.wecom') },
{ id: '7', name: t('user.dingtalk') },
{ id: '8', name: t('user.lark') },
/* { id: '9', name: t('user.larksuite') }, */
],
field: 'origins',
title: t('user.user_source'),
Expand Down Expand Up @@ -834,7 +838,17 @@ const formatUserOrigin = (origin?: number) => {
if (!origin) {
return t('user.local_creation')
}
const originArray = ['CAS', 'OIDC', 'LDAP', 'OAuth2', 'SAML2']
const originArray = [
'CAS',
'OIDC',
'LDAP',
'OAuth2',
'SAML2',
t('user.wecom'),
t('user.dingtalk'),
t('user.lark'),
t('user.larksuite'),
]
return originArray[origin - 1]
}
onMounted(() => {
Expand Down
2 changes: 2 additions & 0 deletions installer/install.conf
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,5 @@ SQLBOT_LOG_LEVEL="INFO"
SQLBOT_CACHE_TYPE="memory"
## MCP 图片存储路径
SQLBOT_SERVER_IMAGE_HOST=http://YOUR_SERVER_IP:MCP_PORT/images/
##Token过期时间: 60 minutes * 24 hours * 8 days = 11520 minutes
SQLBOT_ACCESS_TOKEN_EXPIRE_MINUTES=11520
2 changes: 2 additions & 0 deletions installer/sqlbot/templates/sqlbot.conf
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,5 @@ POSTGRES_USER=${SQLBOT_DB_USER}
POSTGRES_PASSWORD=${SQLBOT_DB_PASSWORD}

SERVER_IMAGE_HOST=${SQLBOT_SERVER_IMAGE_HOST}

ACCESS_TOKEN_EXPIRE_MINUTES=${SQLBOT_ACCESS_TOKEN_EXPIRE_MINUTES}
Loading