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
1b1c987d
authored
Jan 21, 2026
by
Seefs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: optimized display
parent
38791fa4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
11 deletions
+22
-11
service/log_info_generate.go
+11
-3
web/src/hooks/usage-logs/useUsageLogsData.jsx
+11
-8
No files found.
service/log_info_generate.go
View file @
1b1c987d
...
...
@@ -83,10 +83,18 @@ func appendRequestConversionChain(relayInfo *relaycommon.RelayInfo, other map[st
}
chain
:=
make
([]
string
,
0
,
len
(
relayInfo
.
RequestConversionChain
))
for
_
,
f
:=
range
relayInfo
.
RequestConversionChain
{
if
f
==
""
{
continue
switch
f
{
case
types
.
RelayFormatOpenAI
:
chain
=
append
(
chain
,
"OpenAI Compatible"
)
case
types
.
RelayFormatClaude
:
chain
=
append
(
chain
,
"Claude Messages"
)
case
types
.
RelayFormatGemini
:
chain
=
append
(
chain
,
"Google Gemini"
)
case
types
.
RelayFormatOpenAIResponses
:
chain
=
append
(
chain
,
"OpenAI Responses"
)
default
:
chain
=
append
(
chain
,
string
(
f
))
}
chain
=
append
(
chain
,
string
(
f
))
}
if
len
(
chain
)
==
0
{
return
...
...
web/src/hooks/usage-logs/useUsageLogsData.jsx
View file @
1b1c987d
...
...
@@ -306,6 +306,16 @@ export const useLogsData = () => {
// Format logs data
const
setLogsFormat
=
(
logs
)
=>
{
const
requestConversionDisplayValue
=
(
conversionChain
)
=>
{
const
chain
=
Array
.
isArray
(
conversionChain
)
?
conversionChain
.
filter
(
Boolean
)
:
[];
if
(
chain
.
length
<=
1
)
{
return
t
(
'原生格式'
);
}
return
chain
.
join
(
' -> '
);
};
let
expandDatesLocal
=
{};
for
(
let
i
=
0
;
i
<
logs
.
length
;
i
++
)
{
logs
[
i
].
timestamp2string
=
timestamp2string
(
logs
[
i
].
created_at
);
...
...
@@ -477,16 +487,9 @@ export const useLogsData = () => {
}
}
if
(
isAdminUser
)
{
const
requestConversionChain
=
other
?.
request_conversion
;
const
chain
=
Array
.
isArray
(
requestConversionChain
)
?
requestConversionChain
.
filter
(
Boolean
)
:
[];
expandDataLocal
.
push
({
key
:
t
(
'请求转换'
),
value
:
chain
.
length
>
1
?
`
${
chain
.
join
(
' -> '
)}
`
:
t
(
'原生格式'
),
value
:
requestConversionDisplayValue
(
other
?.
request_conversion
),
});
}
if
(
isAdminUser
)
{
...
...
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