4.8.23 dev (#3917)

* fix: icon refresh

* fix: aiproxy http request

* fix: collection list count

* fix: collection list count

* fix: tts selector name

* update action
This commit is contained in:
Archer
2025-02-27 22:15:48 +08:00
committed by GitHub
parent 1121ea33bd
commit fc9e614f88
7 changed files with 19 additions and 23 deletions

View File

@@ -68,14 +68,3 @@ jobs:
SEALOS_TYPE: 'pr_comment'
SEALOS_FILENAME: 'report.md'
SEALOS_REPLACE_TAG: 'DEFAULT_REPLACE_DEPLOY'
helm-check:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Helm Check
run: |
helm dependency update files/helm/fastgpt
helm lint files/helm/fastgpt
helm package files/helm/fastgpt

View File

@@ -24,6 +24,6 @@ jobs:
export APP_VERSION=${{ steps.vars.outputs.tag }}
export HELM_VERSION=${{ steps.vars.outputs.tag }}
export HELM_REPO=ghcr.io/${{ github.repository_owner }}
helm dependency update files/helm/fastgpt
helm package files/helm/fastgpt --version ${HELM_VERSION}-helm --app-version ${APP_VERSION} -d bin
helm dependency update deploy/helm/fastgpt
helm package deploy/helm/fastgpt --version ${HELM_VERSION}-helm --app-version ${APP_VERSION} -d bin
helm push bin/fastgpt-${HELM_VERSION}-helm.tgz oci://${HELM_REPO}

View File

@@ -38,10 +38,12 @@ const addCommonMiddleware = (schema: mongoose.Schema) => {
schema.post(op, function (this: any, result: any, next) {
if (this._startTime) {
const duration = Date.now() - this._startTime;
const warnLogData = {
query: this._query,
op,
collectionName: this.collection?.name,
op: this.op,
...(this._query && { query: this._query }),
...(this._update && { update: this._update }),
...(this._delete && { delete: this._delete }),
duration
};

View File

@@ -1,4 +1,4 @@
import React, { useEffect } from 'react';
import React, { useEffect, useState } from 'react';
import type { IconProps } from '@chakra-ui/react';
import { Box, Icon } from '@chakra-ui/react';
import { iconPaths } from './constants';
@@ -8,7 +8,7 @@ import { useRefresh } from '../../../hooks/useRefresh';
const iconCache: Record<string, any> = {};
const MyIcon = ({ name, w = 'auto', h = 'auto', ...props }: { name: IconNameType } & IconProps) => {
const { refresh } = useRefresh();
const [, setUpdate] = useState(0);
useEffect(() => {
if (iconCache[name]) {
@@ -20,7 +20,7 @@ const MyIcon = ({ name, w = 'auto', h = 'auto', ...props }: { name: IconNameType
const component = { as: icon.default };
// Store in cache
iconCache[name] = component;
refresh();
setUpdate((prev) => prev + 1); // force update
})
.catch((error) => console.log(error));
}, [name]);

View File

@@ -42,7 +42,7 @@ const TTSSelect = ({
label: (
<HStack>
<Avatar borderRadius={'0'} w={'1.25rem'} src={providerData.avatar} />
<Box>{t(providerData.name)}</Box>
<Box>{t(model.name as any)}</Box>
</HStack>
),
value: model.model,

View File

@@ -1,6 +1,7 @@
import type { NextApiRequest, NextApiResponse } from 'next';
import { jsonRes } from '@fastgpt/service/common/response';
import { request } from 'https';
import { request as httpsRequest } from 'https';
import { request as httpRequest } from 'http';
import { authSystemAdmin } from '@fastgpt/service/support/permission/user/auth';
const baseUrl = process.env.AIPROXY_API_ENDPOINT;
@@ -30,7 +31,10 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
delete req.headers?.host;
delete req.headers?.origin;
const requestResult = request({
// Select request function based on protocol
const requestFn = parsedUrl.protocol === 'https:' ? httpsRequest : httpRequest;
const requestResult = requestFn({
protocol: parsedUrl.protocol,
hostname: parsedUrl.hostname,
port: parsedUrl.port,

View File

@@ -14,6 +14,7 @@ import { PaginationResponse } from '@fastgpt/web/common/fetch/type';
import { parsePaginationRequest } from '@fastgpt/service/common/api/pagination';
import { DatasetCollectionSchemaType } from '@fastgpt/global/core/dataset/type';
import { MongoDatasetData } from '@fastgpt/service/core/dataset/data/schema';
import { MongoDatasetTraining } from '@fastgpt/service/core/dataset/training/schema';
async function handler(
req: NextApiRequest
@@ -115,7 +116,7 @@ async function handler(
{ _id: string; count: number }[],
{ _id: string; count: number }[]
] = await Promise.all([
MongoDatasetCollection.aggregate(
MongoDatasetTraining.aggregate(
[
{
$match: {