diff --git a/web/default/src/components/ChannelsTable.js b/web/default/src/components/ChannelsTable.js
index 48f476a7..6e0ec05d 100644
--- a/web/default/src/components/ChannelsTable.js
+++ b/web/default/src/components/ChannelsTable.js
@@ -59,6 +59,12 @@ function renderBalance(type, balance) {
}
}
+function isShowDetail() {
+ return localStorage.getItem("show_detail") === "true";
+}
+
+const promptID = "detail"
+
const ChannelsTable = () => {
const [channels, setChannels] = useState([]);
const [loading, setLoading] = useState(true);
@@ -66,7 +72,8 @@ const ChannelsTable = () => {
const [searchKeyword, setSearchKeyword] = useState('');
const [searching, setSearching] = useState(false);
const [updatingBalance, setUpdatingBalance] = useState(false);
- const [showPrompt, setShowPrompt] = useState(shouldShowPrompt("channel-test"));
+ const [showPrompt, setShowPrompt] = useState(shouldShowPrompt(promptID));
+ const [showDetail, setShowDetail] = useState(isShowDetail());
const loadChannels = async (startIdx) => {
const res = await API.get(`/api/channel/?p=${startIdx}`);
@@ -120,6 +127,11 @@ const ChannelsTable = () => {
await loadChannels(activePage - 1);
};
+ const toggleShowDetail = () => {
+ setShowDetail(!showDetail);
+ localStorage.setItem("show_detail", (!showDetail).toString());
+ }
+
useEffect(() => {
loadChannels(0)
.then()
@@ -364,11 +376,13 @@ const ChannelsTable = () => {
showPrompt && (
渠道测试仅支持 chat 模型,优先使用 gpt-3.5-turbo,如果该模型不可用则使用你所配置的模型列表中的第一个模型。
+
+ 点击下方详情按钮可以显示余额以及设置额外的测试模型。