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
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { useMessagePagination } from '../shared/use-message-pagination'
import { useConversationCrud } from '../shared/use-conversation-crud'
import { aggregators } from '../../../index'
import type { ChatMessage } from '../../types'
import { v4 as uuidv4 } from 'uuid'

// ── 共享状态(单例) ─────────────────────────────────────
const appInfo = ref<{ name: string; icon: string } | null>(null)
Expand Down Expand Up @@ -86,7 +87,7 @@ export function useChatStore() {
// 不请求后端 open,不往左侧列表 push(直到首次发消息才入列表,见 chat-panel send)。
const getChatId = (): string => {
if (currentChatId.value) return currentChatId.value
currentChatId.value = crypto.randomUUID()
currentChatId.value = uuidv4()
return currentChatId.value
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { useMessagePagination } from '../shared/use-message-pagination'
import { useConversationCrud } from '../shared/use-conversation-crud'
import { aggregators, Scroll } from '../../../index'
import type { ChatMessage } from '../../types'
import { v4 as uuidv4 } from 'uuid'

// ── 共享状态(单例) ─────────────────────────────────────
const appInfo = ref<{ name: string; icon: string } | null>(null)
Expand Down Expand Up @@ -95,7 +96,7 @@ export function useDebugStore() {
// 不请求后端 open,不往左侧列表 push(直到首次发消息才入列表,见 chat-panel send)。
const getChatId = (): string => {
if (currentChatId.value) return currentChatId.value
currentChatId.value = crypto.randomUUID()
currentChatId.value = uuidv4()
return currentChatId.value
}

Expand Down
3 changes: 2 additions & 1 deletion ui/src/views/login/modes/AccountLogin.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { useStore } from '@/stores'
import { LOGIN_METHOD } from '@/api/enums'
import type { LoginConfig, LoginMethod } from '@/api/types'
import { MsgConfirm } from '@/utils/message'
import { v4 as uuidv4 } from 'uuid'

interface AccountLoginForm {
captcha: string
Expand Down Expand Up @@ -142,7 +143,7 @@ const getExternalLoginUrl = (authType: LoginMethod): Promise<string> => {
}
if (authType === LOGIN_METHOD.OAUTH2) {
if (!config.authEndpoint || !config.clientId) return ''
let url = `${config.authEndpoint}?client_id=${config.clientId}&response_type=code&redirect_uri=${redirectUrl}&state=${crypto.randomUUID()}`
let url = `${config.authEndpoint}?client_id=${config.clientId}&response_type=code&redirect_uri=${redirectUrl}&state=${uuidv4()}`
if (config.scope) url += `&scope=${config.scope}`
return url
}
Expand Down
Loading