Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
new-api
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
a5b4c2f7
authored
Aug 09, 2025
by
CaIon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: add FluentRead support in chat configuration
parent
8e52b42c
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
5 deletions
+8
-5
setting/chat.go
+3
-0
web/src/components/table/tokens/index.jsx
+5
-5
No files found.
setting/chat.go
View file @
a5b4c2f7
...
@@ -13,6 +13,9 @@ var Chats = []map[string]string{
...
@@ -13,6 +13,9 @@ var Chats = []map[string]string{
"Cherry Studio"
:
"cherrystudio://providers/api-keys?v=1&data={cherryConfig}"
,
"Cherry Studio"
:
"cherrystudio://providers/api-keys?v=1&data={cherryConfig}"
,
},
},
{
{
"流畅阅读"
:
"fluentread"
,
},
{
"Lobe Chat 官方示例"
:
"https://chat-preview.lobehub.com/?settings={
\"
keyVaults
\"
:{
\"
openai
\"
:{
\"
apiKey
\"
:
\"
{key}
\"
,
\"
baseURL
\"
:
\"
{address}/v1
\"
}}}"
,
"Lobe Chat 官方示例"
:
"https://chat-preview.lobehub.com/?settings={
\"
keyVaults
\"
:{
\"
openai
\"
:{
\"
apiKey
\"
:
\"
{key}
\"
,
\"
baseURL
\"
:
\"
{address}/v1
\"
}}}"
,
},
},
{
{
...
...
web/src/components/table/tokens/index.jsx
View file @
a5b4c2f7
...
@@ -91,7 +91,7 @@ function TokensPage() {
...
@@ -91,7 +91,7 @@ function TokensPage() {
if
(
localStorage
.
getItem
(
SUPPRESS_KEY
)
===
'1'
)
return
;
if
(
localStorage
.
getItem
(
SUPPRESS_KEY
)
===
'1'
)
return
;
const
container
=
document
.
getElementById
(
'fluent-new-api-container'
);
const
container
=
document
.
getElementById
(
'fluent-new-api-container'
);
if
(
!
container
)
{
if
(
!
container
)
{
Toast
.
warning
(
t
(
'未检测到 Fluent
容器
,请确认扩展已启用'
));
Toast
.
warning
(
t
(
'未检测到 Fluent
Read(流畅阅读)
,请确认扩展已启用'
));
return
;
return
;
}
}
setPrefillKey
(
key
||
''
);
setPrefillKey
(
key
||
''
);
...
@@ -102,13 +102,13 @@ function TokensPage() {
...
@@ -102,13 +102,13 @@ function TokensPage() {
}
}
Notification
.
info
({
Notification
.
info
({
id
:
'fluent-detected'
,
id
:
'fluent-detected'
,
title
:
t
(
'检测到 Fluent(流畅阅读)'
),
title
:
t
(
'检测到 Fluent
Read
(流畅阅读)'
),
content
:
(
content
:
(
<
div
>
<
div
>
<
div
style=
{
{
marginBottom
:
8
}
}
>
<
div
style=
{
{
marginBottom
:
8
}
}
>
{
prefillKey
{
prefillKey
?
t
(
'已检测到 Fluent 扩展,已从操作中指定密钥,将使用该密钥进行填充。请选择模型后继续。'
)
?
t
(
'已检测到 Fluent
Read
扩展,已从操作中指定密钥,将使用该密钥进行填充。请选择模型后继续。'
)
:
t
(
'已检测到 Fluent 扩展,请选择模型后可一键填充当前选中令牌(或本页第一个令牌)。'
)
}
:
t
(
'已检测到 Fluent
Read
扩展,请选择模型后可一键填充当前选中令牌(或本页第一个令牌)。'
)
}
</
div
>
</
div
>
<
div
style=
{
{
marginBottom
:
8
}
}
>
<
div
style=
{
{
marginBottom
:
8
}
}
>
<
Select
<
Select
...
@@ -124,7 +124,7 @@ function TokensPage() {
...
@@ -124,7 +124,7 @@ function TokensPage() {
</
div
>
</
div
>
<
Space
>
<
Space
>
<
Button
theme=
"solid"
type=
"primary"
onClick=
{
handlePrefillToFluent
}
>
<
Button
theme=
"solid"
type=
"primary"
onClick=
{
handlePrefillToFluent
}
>
{
t
(
'一键填充到 Fluent'
)
}
{
t
(
'一键填充到 Fluent
Read
'
)
}
</
Button
>
</
Button
>
<
Button
type=
"warning"
onClick=
{
()
=>
{
<
Button
type=
"warning"
onClick=
{
()
=>
{
localStorage
.
setItem
(
SUPPRESS_KEY
,
'1'
);
localStorage
.
setItem
(
SUPPRESS_KEY
,
'1'
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment