瀏覽代碼

fix: Incorrect URL Parameter Parsing Causes user_id Retrieval Error (#25261)

Co-authored-by: crazywoola <100913391+crazywoola@users.noreply.github.com>
tags/1.9.0
Debin.Meng 1 月之前
父節點
當前提交
a932413314
No account linked to committer's email address
共有 1 個文件被更改,包括 10 次插入0 次删除
  1. 10
    0
      web/app/components/base/chat/utils.ts

+ 10
- 0
web/app/components/base/chat/utils.ts 查看文件

@@ -43,6 +43,16 @@ async function getProcessedInputsFromUrlParams(): Promise<Record<string, any>> {

async function getProcessedSystemVariablesFromUrlParams(): Promise<Record<string, any>> {
const urlParams = new URLSearchParams(window.location.search)
const redirectUrl = urlParams.get('redirect_url')
if (redirectUrl) {
const decodedRedirectUrl = decodeURIComponent(redirectUrl)
const queryString = decodedRedirectUrl.split('?')[1]
if (queryString) {
const redirectParams = new URLSearchParams(queryString)
for (const [key, value] of redirectParams.entries())
urlParams.set(key, value)
}
}
const systemVariables: Record<string, any> = {}
const entriesArray = Array.from(urlParams.entries())
await Promise.all(

Loading…
取消
儲存