fix share link chat quote number (#4690)
* fix share link chat quote number * fix ts * usememo
This commit is contained in:
@@ -35,9 +35,9 @@ async function handler(
|
||||
? await authApp({ req, appId: parentId, per: TeamAppCreatePermissionVal, authToken: true })
|
||||
: await authUserPer({ req, authToken: true, per: TeamAppCreatePermissionVal });
|
||||
|
||||
await mongoSessionRun(async (session) => {
|
||||
const httpPluginId = await mongoSessionRun(async (session) => {
|
||||
// create http plugin folder
|
||||
const httpPluginIid = await onCreateApp({
|
||||
const httpPluginId = await onCreateApp({
|
||||
parentId,
|
||||
name,
|
||||
avatar,
|
||||
@@ -51,7 +51,7 @@ async function handler(
|
||||
|
||||
// compute children plugins
|
||||
const childrenPlugins = await httpApiSchema2Plugins({
|
||||
parentId: httpPluginIid,
|
||||
parentId: httpPluginId,
|
||||
apiSchemaStr: pluginData.apiSchemaStr,
|
||||
customHeader: pluginData.customHeaders
|
||||
});
|
||||
@@ -65,10 +65,13 @@ async function handler(
|
||||
session
|
||||
});
|
||||
}
|
||||
|
||||
return httpPluginId;
|
||||
});
|
||||
|
||||
pushTrack.createApp({
|
||||
type: AppTypeEnum.httpPlugin,
|
||||
appId: httpPluginId,
|
||||
uid: userId,
|
||||
teamId,
|
||||
tmbId
|
||||
|
||||
@@ -35,7 +35,7 @@ async function handler(
|
||||
? await authApp({ req, appId: parentId, per: TeamAppCreatePermissionVal, authToken: true })
|
||||
: await authUserPer({ req, authToken: true, per: TeamAppCreatePermissionVal });
|
||||
|
||||
await mongoSessionRun(async (session) => {
|
||||
const mcpToolsId = await mongoSessionRun(async (session) => {
|
||||
const mcpToolsId = await onCreateApp({
|
||||
name,
|
||||
avatar,
|
||||
@@ -60,10 +60,13 @@ async function handler(
|
||||
session
|
||||
});
|
||||
}
|
||||
|
||||
return mcpToolsId;
|
||||
});
|
||||
|
||||
pushTrack.createApp({
|
||||
type: AppTypeEnum.toolSet,
|
||||
appId: mcpToolsId,
|
||||
uid: userId,
|
||||
teamId,
|
||||
tmbId
|
||||
|
||||
@@ -294,6 +294,7 @@ const Render = (props: { appId: string; isStandalone?: string }) => {
|
||||
showRouteToAppDetail={isStandalone !== '1'}
|
||||
showRouteToDatasetDetail={isStandalone !== '1'}
|
||||
isShowReadRawSource={true}
|
||||
isResponseDetail={true}
|
||||
// isShowFullText={true}
|
||||
showNodeStatus
|
||||
>
|
||||
|
||||
@@ -50,6 +50,7 @@ type Props = {
|
||||
authToken: string;
|
||||
customUid: string;
|
||||
showRawSource: boolean;
|
||||
responseDetail: boolean;
|
||||
// showFullText: boolean;
|
||||
showNodeStatus: boolean;
|
||||
};
|
||||
@@ -369,6 +370,7 @@ const Render = (props: Props) => {
|
||||
showRouteToAppDetail={false}
|
||||
showRouteToDatasetDetail={false}
|
||||
isShowReadRawSource={props.showRawSource}
|
||||
isResponseDetail={props.responseDetail}
|
||||
// isShowFullText={props.showFullText}
|
||||
showNodeStatus={props.showNodeStatus}
|
||||
>
|
||||
@@ -395,7 +397,7 @@ export async function getServerSideProps(context: any) {
|
||||
{
|
||||
shareId
|
||||
},
|
||||
'appId showRawSource showNodeStatus'
|
||||
'appId showRawSource showNodeStatus responseDetail'
|
||||
)
|
||||
.populate<{ associatedApp: AppSchema }>('associatedApp', 'name avatar intro')
|
||||
.lean();
|
||||
@@ -412,6 +414,7 @@ export async function getServerSideProps(context: any) {
|
||||
appAvatar: app?.associatedApp?.avatar ?? '',
|
||||
appIntro: app?.associatedApp?.intro ?? 'AI',
|
||||
showRawSource: app?.showRawSource ?? false,
|
||||
responseDetail: app?.responseDetail ?? false,
|
||||
// showFullText: app?.showFullText ?? false,
|
||||
showNodeStatus: app?.showNodeStatus ?? false,
|
||||
shareId: shareId ?? '',
|
||||
|
||||
@@ -314,6 +314,7 @@ const Render = (props: Props) => {
|
||||
showRouteToAppDetail={false}
|
||||
showRouteToDatasetDetail={false}
|
||||
isShowReadRawSource={true}
|
||||
isResponseDetail={true}
|
||||
// isShowFullText={true}
|
||||
showNodeStatus
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user