mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-11-25 10:48:42 +00:00
feat(agent): consolidate media tools into read_asset and add S3 key support to download_asset (#376)
* feat(agent): consolidate media tools into read_asset and add S3 key support to download_asset * fix(agent): refine parameter descriptions and remove download URL from read_asset text content * fix(agent): resolve owning asset and enforce RBAC permissions when downloading by S3 key
This commit is contained in:
@@ -70,19 +70,9 @@ const BUILTIN_TOOLS = [
|
||||
description: () => m.agent_tool_read_skill_desc(),
|
||||
},
|
||||
{
|
||||
id: 'analyze_image',
|
||||
name: () => m.agent_tool_analyze_image_name(),
|
||||
description: () => m.agent_tool_analyze_image_desc(),
|
||||
},
|
||||
{
|
||||
id: 'screenshot',
|
||||
name: () => m.agent_tool_screenshot_name(),
|
||||
description: () => m.agent_tool_screenshot_desc(),
|
||||
},
|
||||
{
|
||||
id: 'read_pdf_pages',
|
||||
name: () => m.agent_tool_read_pdf_pages_name(),
|
||||
description: () => m.agent_tool_read_pdf_pages_desc(),
|
||||
id: 'read_asset',
|
||||
name: () => m.agent_tool_read_asset_name(),
|
||||
description: () => m.agent_tool_read_asset_desc(),
|
||||
},
|
||||
{
|
||||
id: 'list_assets',
|
||||
|
||||
@@ -69,9 +69,7 @@ interface QuotaRuleDialogProps {
|
||||
}
|
||||
|
||||
const STANDARD_TOOLS = [
|
||||
{ value: 'analyze_image', label: () => m.agent_tool_analyze_image_name() },
|
||||
{ value: 'screenshot', label: () => m.agent_tool_screenshot_name() },
|
||||
{ value: 'read_pdf_pages', label: () => m.agent_tool_read_pdf_pages_name() },
|
||||
{ value: 'read_asset', label: () => m.agent_tool_read_asset_name() },
|
||||
{ value: 'list_assets', label: () => m.agent_tool_list_assets_name() },
|
||||
{ value: 'create_folder', label: () => m.agent_tool_create_folder_name() },
|
||||
{ value: 'create_file', label: () => m.agent_tool_create_file_name() },
|
||||
@@ -129,7 +127,7 @@ export const QuotaRuleDialog: React.FC<QuotaRuleDialogProps> = ({
|
||||
const [resource, setResource] = useState<QuotaResourceTypeEnum>('agent_total_tokens')
|
||||
const [mcpServerId, setMcpServerId] = useState<string>('')
|
||||
const [bashMatch, setBashMatch] = useState<string>('*')
|
||||
const [toolName, setToolName] = useState<string>('analyze_image')
|
||||
const [toolName, setToolName] = useState<string>('read_asset')
|
||||
const [limit, setLimit] = useState<number>(100000)
|
||||
const [period, setPeriod] = useState<QuotaPeriodEnum>('1day')
|
||||
const [enabled, setEnabled] = useState<boolean>(true)
|
||||
@@ -177,7 +175,7 @@ export const QuotaRuleDialog: React.FC<QuotaRuleDialogProps> = ({
|
||||
? resData.name
|
||||
: typeof resData.toolName === 'string'
|
||||
? resData.toolName
|
||||
: 'analyze_image',
|
||||
: 'read_asset',
|
||||
)
|
||||
setLimit(rule.limit)
|
||||
setPeriod(formatQuotaPeriod(rule.period) as QuotaPeriodEnum)
|
||||
@@ -189,7 +187,7 @@ export const QuotaRuleDialog: React.FC<QuotaRuleDialogProps> = ({
|
||||
setResource('agent_total_tokens')
|
||||
setMcpServerId('')
|
||||
setBashMatch('*')
|
||||
setToolName('analyze_image')
|
||||
setToolName('read_asset')
|
||||
setLimit(RESOURCE_CONFIG.agent_total_tokens.defaultLimit)
|
||||
setPeriod('1day')
|
||||
setEnabled(true)
|
||||
@@ -213,7 +211,7 @@ export const QuotaRuleDialog: React.FC<QuotaRuleDialogProps> = ({
|
||||
} else if (resource === 'agent_bash_call_count') {
|
||||
resourceData.match = bashMatch.trim() || '*'
|
||||
} else if (resource === 'agent_tool_call_count') {
|
||||
resourceData.name = toolName || 'analyze_image'
|
||||
resourceData.name = toolName || 'read_asset'
|
||||
}
|
||||
|
||||
const res = await client.api.teams[':teamId'].quotas.$post({
|
||||
@@ -261,7 +259,7 @@ export const QuotaRuleDialog: React.FC<QuotaRuleDialogProps> = ({
|
||||
} else if (resource === 'agent_bash_call_count') {
|
||||
resourceData.match = bashMatch.trim() || '*'
|
||||
} else if (resource === 'agent_tool_call_count') {
|
||||
resourceData.name = toolName || 'analyze_image'
|
||||
resourceData.name = toolName || 'read_asset'
|
||||
}
|
||||
|
||||
const res = await client.api.teams[':teamId'].quotas[':id'].$put({
|
||||
|
||||
@@ -477,12 +477,8 @@
|
||||
"agent_tool_bash_desc": "Allows the agent to run terminal/shell commands in a highly isolated environment.",
|
||||
"agent_tool_read_skill_name": "Read Skills",
|
||||
"agent_tool_read_skill_desc": "Allows the agent to load and read skill definitions to perform specialized actions.",
|
||||
"agent_tool_analyze_image_name": "Analyze Image",
|
||||
"agent_tool_analyze_image_desc": "Allows the agent to view and analyze the visual contents of an image file.",
|
||||
"agent_tool_screenshot_name": "Video Frame Extraction",
|
||||
"agent_tool_screenshot_desc": "Allows the agent to extract still image frames from video files for analysis.",
|
||||
"agent_tool_read_pdf_pages_name": "Read PDF Pages",
|
||||
"agent_tool_read_pdf_pages_desc": "Allows the agent to convert and view specific pages of a PDF document as images.",
|
||||
"agent_tool_read_asset_name": "Read Asset",
|
||||
"agent_tool_read_asset_desc": "Allows the agent to view and inspect images, video frames, and document pages.",
|
||||
"agent_tool_list_assets_name": "Browse Shumai",
|
||||
"agent_tool_list_assets_desc": "Allows the agent to list folders and browse files in Shumai.",
|
||||
"agent_tool_create_folder_name": "Create Folder",
|
||||
|
||||
@@ -477,12 +477,8 @@
|
||||
"agent_tool_bash_desc": "允许智能体在高度隔离的环境中运行终端/命令行命令。",
|
||||
"agent_tool_read_skill_name": "读取技能",
|
||||
"agent_tool_read_skill_desc": "允许智能体加载和读取技能定义以执行特定操作。",
|
||||
"agent_tool_analyze_image_name": "分析图片",
|
||||
"agent_tool_analyze_image_desc": "允许智能体查看和分析图片文件的视觉内容。",
|
||||
"agent_tool_screenshot_name": "提取视频帧",
|
||||
"agent_tool_screenshot_desc": "允许智能体从视频文件中提取静态画面进行分析。",
|
||||
"agent_tool_read_pdf_pages_name": "读取 PDF 页面",
|
||||
"agent_tool_read_pdf_pages_desc": "允许智能体将 PDF 文件的指定页面转换为图片并查看。",
|
||||
"agent_tool_read_asset_name": "读取资源",
|
||||
"agent_tool_read_asset_desc": "允许智能体查看和分析图片、视频画面和文档页面。",
|
||||
"agent_tool_list_assets_name": "浏览 Shumai",
|
||||
"agent_tool_list_assets_desc": "允许智能体列出文件夹并浏览 Shumai 中的文件。",
|
||||
"agent_tool_create_folder_name": "创建文件夹",
|
||||
|
||||
+2
-6
@@ -458,12 +458,8 @@ export * from "./agent_tool_bash_name.js";
|
||||
export * from "./agent_tool_bash_desc.js";
|
||||
export * from "./agent_tool_read_skill_name.js";
|
||||
export * from "./agent_tool_read_skill_desc.js";
|
||||
export * from "./agent_tool_analyze_image_name.js";
|
||||
export * from "./agent_tool_analyze_image_desc.js";
|
||||
export * from "./agent_tool_screenshot_name.js";
|
||||
export * from "./agent_tool_screenshot_desc.js";
|
||||
export * from "./agent_tool_read_pdf_pages_name.js";
|
||||
export * from "./agent_tool_read_pdf_pages_desc.js";
|
||||
export * from "./agent_tool_read_asset_name.js";
|
||||
export * from "./agent_tool_read_asset_desc.js";
|
||||
export * from "./agent_tool_list_assets_name.js";
|
||||
export * from "./agent_tool_list_assets_desc.js";
|
||||
export * from "./agent_tool_create_folder_name.js";
|
||||
|
||||
+2
-6
@@ -460,12 +460,8 @@ export * from './agent_tool_bash_name.js'
|
||||
export * from './agent_tool_bash_desc.js'
|
||||
export * from './agent_tool_read_skill_name.js'
|
||||
export * from './agent_tool_read_skill_desc.js'
|
||||
export * from './agent_tool_analyze_image_name.js'
|
||||
export * from './agent_tool_analyze_image_desc.js'
|
||||
export * from './agent_tool_screenshot_name.js'
|
||||
export * from './agent_tool_screenshot_desc.js'
|
||||
export * from './agent_tool_read_pdf_pages_name.js'
|
||||
export * from './agent_tool_read_pdf_pages_desc.js'
|
||||
export * from './agent_tool_read_asset_name.js'
|
||||
export * from './agent_tool_read_asset_desc.js'
|
||||
export * from './agent_tool_list_assets_name.js'
|
||||
export * from './agent_tool_list_assets_desc.js'
|
||||
export * from './agent_tool_create_folder_name.js'
|
||||
|
||||
-16
@@ -1,16 +0,0 @@
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Allows the agent to view and analyze the visual contents of an image file." |
|
||||
*
|
||||
* @param {Agent_Tool_Analyze_Image_DescInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const agent_tool_analyze_image_desc: ((inputs?: Agent_Tool_Analyze_Image_DescInputs, options?: {
|
||||
locale?: "en" | "zh";
|
||||
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Agent_Tool_Analyze_Image_DescInputs, {
|
||||
locale?: "en" | "zh";
|
||||
}, {}>;
|
||||
export type LocalizedString = import("../runtime.js").LocalizedString;
|
||||
export type Agent_Tool_Analyze_Image_DescInputs = {};
|
||||
@@ -1,29 +0,0 @@
|
||||
/* eslint-disable */
|
||||
import { getLocale, experimentalStaticLocale } from '../runtime.js';
|
||||
|
||||
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
||||
|
||||
/** @typedef {{}} Agent_Tool_Analyze_Image_DescInputs */
|
||||
|
||||
const en_agent_tool_analyze_image_desc = /** @type {(inputs: Agent_Tool_Analyze_Image_DescInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`Allows the agent to view and analyze the visual contents of an image file.`)
|
||||
};
|
||||
|
||||
const zh_agent_tool_analyze_image_desc = /** @type {(inputs: Agent_Tool_Analyze_Image_DescInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`允许智能体查看和分析图片文件的视觉内容。`)
|
||||
};
|
||||
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Allows the agent to view and analyze the visual contents of an image file." |
|
||||
*
|
||||
* @param {Agent_Tool_Analyze_Image_DescInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const agent_tool_analyze_image_desc = /** @type {((inputs?: Agent_Tool_Analyze_Image_DescInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Agent_Tool_Analyze_Image_DescInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
|
||||
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
|
||||
if (locale === "en") return en_agent_tool_analyze_image_desc(inputs)
|
||||
return zh_agent_tool_analyze_image_desc(inputs)
|
||||
});
|
||||
-16
@@ -1,16 +0,0 @@
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Analyze Image" |
|
||||
*
|
||||
* @param {Agent_Tool_Analyze_Image_NameInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const agent_tool_analyze_image_name: ((inputs?: Agent_Tool_Analyze_Image_NameInputs, options?: {
|
||||
locale?: "en" | "zh";
|
||||
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Agent_Tool_Analyze_Image_NameInputs, {
|
||||
locale?: "en" | "zh";
|
||||
}, {}>;
|
||||
export type LocalizedString = import("../runtime.js").LocalizedString;
|
||||
export type Agent_Tool_Analyze_Image_NameInputs = {};
|
||||
@@ -1,29 +0,0 @@
|
||||
/* eslint-disable */
|
||||
import { getLocale, experimentalStaticLocale } from '../runtime.js';
|
||||
|
||||
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
||||
|
||||
/** @typedef {{}} Agent_Tool_Analyze_Image_NameInputs */
|
||||
|
||||
const en_agent_tool_analyze_image_name = /** @type {(inputs: Agent_Tool_Analyze_Image_NameInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`Analyze Image`)
|
||||
};
|
||||
|
||||
const zh_agent_tool_analyze_image_name = /** @type {(inputs: Agent_Tool_Analyze_Image_NameInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`分析图片`)
|
||||
};
|
||||
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Analyze Image" |
|
||||
*
|
||||
* @param {Agent_Tool_Analyze_Image_NameInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const agent_tool_analyze_image_name = /** @type {((inputs?: Agent_Tool_Analyze_Image_NameInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Agent_Tool_Analyze_Image_NameInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
|
||||
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
|
||||
if (locale === "en") return en_agent_tool_analyze_image_name(inputs)
|
||||
return zh_agent_tool_analyze_image_name(inputs)
|
||||
});
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Allows the agent to view and inspect images, video frames, and document pages." |
|
||||
*
|
||||
* @param {Agent_Tool_Read_Asset_DescInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const agent_tool_read_asset_desc: ((inputs?: Agent_Tool_Read_Asset_DescInputs, options?: {
|
||||
locale?: "en" | "zh";
|
||||
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Agent_Tool_Read_Asset_DescInputs, {
|
||||
locale?: "en" | "zh";
|
||||
}, {}>;
|
||||
export type LocalizedString = import("../runtime.js").LocalizedString;
|
||||
export type Agent_Tool_Read_Asset_DescInputs = {};
|
||||
@@ -0,0 +1,29 @@
|
||||
/* eslint-disable */
|
||||
import { getLocale, experimentalStaticLocale } from '../runtime.js';
|
||||
|
||||
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
||||
|
||||
/** @typedef {{}} Agent_Tool_Read_Asset_DescInputs */
|
||||
|
||||
const en_agent_tool_read_asset_desc = /** @type {(inputs: Agent_Tool_Read_Asset_DescInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`Allows the agent to view and inspect images, video frames, and document pages.`)
|
||||
};
|
||||
|
||||
const zh_agent_tool_read_asset_desc = /** @type {(inputs: Agent_Tool_Read_Asset_DescInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`允许智能体查看和分析图片、视频画面和文档页面。`)
|
||||
};
|
||||
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Allows the agent to view and inspect images, video frames, and document pages." |
|
||||
*
|
||||
* @param {Agent_Tool_Read_Asset_DescInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const agent_tool_read_asset_desc = /** @type {((inputs?: Agent_Tool_Read_Asset_DescInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Agent_Tool_Read_Asset_DescInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
|
||||
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
|
||||
if (locale === "en") return en_agent_tool_read_asset_desc(inputs)
|
||||
return zh_agent_tool_read_asset_desc(inputs)
|
||||
});
|
||||
Generated
Vendored
+5
-5
@@ -1,16 +1,16 @@
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Video Frame Extraction" |
|
||||
* | "Read Asset" |
|
||||
*
|
||||
* @param {Agent_Tool_Screenshot_NameInputs} inputs
|
||||
* @param {Agent_Tool_Read_Asset_NameInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const agent_tool_screenshot_name: ((inputs?: Agent_Tool_Screenshot_NameInputs, options?: {
|
||||
export const agent_tool_read_asset_name: ((inputs?: Agent_Tool_Read_Asset_NameInputs, options?: {
|
||||
locale?: "en" | "zh";
|
||||
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Agent_Tool_Screenshot_NameInputs, {
|
||||
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Agent_Tool_Read_Asset_NameInputs, {
|
||||
locale?: "en" | "zh";
|
||||
}, {}>;
|
||||
export type LocalizedString = import("../runtime.js").LocalizedString;
|
||||
export type Agent_Tool_Screenshot_NameInputs = {};
|
||||
export type Agent_Tool_Read_Asset_NameInputs = {};
|
||||
@@ -0,0 +1,29 @@
|
||||
/* eslint-disable */
|
||||
import { getLocale, experimentalStaticLocale } from '../runtime.js';
|
||||
|
||||
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
||||
|
||||
/** @typedef {{}} Agent_Tool_Read_Asset_NameInputs */
|
||||
|
||||
const en_agent_tool_read_asset_name = /** @type {(inputs: Agent_Tool_Read_Asset_NameInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`Read Asset`)
|
||||
};
|
||||
|
||||
const zh_agent_tool_read_asset_name = /** @type {(inputs: Agent_Tool_Read_Asset_NameInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`读取资源`)
|
||||
};
|
||||
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Read Asset" |
|
||||
*
|
||||
* @param {Agent_Tool_Read_Asset_NameInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const agent_tool_read_asset_name = /** @type {((inputs?: Agent_Tool_Read_Asset_NameInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Agent_Tool_Read_Asset_NameInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
|
||||
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
|
||||
if (locale === "en") return en_agent_tool_read_asset_name(inputs)
|
||||
return zh_agent_tool_read_asset_name(inputs)
|
||||
});
|
||||
-16
@@ -1,16 +0,0 @@
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Allows the agent to convert and view specific pages of a PDF document as images." |
|
||||
*
|
||||
* @param {Agent_Tool_Read_Pdf_Pages_DescInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const agent_tool_read_pdf_pages_desc: ((inputs?: Agent_Tool_Read_Pdf_Pages_DescInputs, options?: {
|
||||
locale?: "en" | "zh";
|
||||
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Agent_Tool_Read_Pdf_Pages_DescInputs, {
|
||||
locale?: "en" | "zh";
|
||||
}, {}>;
|
||||
export type LocalizedString = import("../runtime.js").LocalizedString;
|
||||
export type Agent_Tool_Read_Pdf_Pages_DescInputs = {};
|
||||
@@ -1,29 +0,0 @@
|
||||
/* eslint-disable */
|
||||
import { getLocale, experimentalStaticLocale } from '../runtime.js';
|
||||
|
||||
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
||||
|
||||
/** @typedef {{}} Agent_Tool_Read_Pdf_Pages_DescInputs */
|
||||
|
||||
const en_agent_tool_read_pdf_pages_desc = /** @type {(inputs: Agent_Tool_Read_Pdf_Pages_DescInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`Allows the agent to convert and view specific pages of a PDF document as images.`)
|
||||
};
|
||||
|
||||
const zh_agent_tool_read_pdf_pages_desc = /** @type {(inputs: Agent_Tool_Read_Pdf_Pages_DescInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`允许智能体将 PDF 文件的指定页面转换为图片并查看。`)
|
||||
};
|
||||
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Allows the agent to convert and view specific pages of a PDF document as images." |
|
||||
*
|
||||
* @param {Agent_Tool_Read_Pdf_Pages_DescInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const agent_tool_read_pdf_pages_desc = /** @type {((inputs?: Agent_Tool_Read_Pdf_Pages_DescInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Agent_Tool_Read_Pdf_Pages_DescInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
|
||||
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
|
||||
if (locale === "en") return en_agent_tool_read_pdf_pages_desc(inputs)
|
||||
return zh_agent_tool_read_pdf_pages_desc(inputs)
|
||||
});
|
||||
-16
@@ -1,16 +0,0 @@
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Read PDF Pages" |
|
||||
*
|
||||
* @param {Agent_Tool_Read_Pdf_Pages_NameInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const agent_tool_read_pdf_pages_name: ((inputs?: Agent_Tool_Read_Pdf_Pages_NameInputs, options?: {
|
||||
locale?: "en" | "zh";
|
||||
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Agent_Tool_Read_Pdf_Pages_NameInputs, {
|
||||
locale?: "en" | "zh";
|
||||
}, {}>;
|
||||
export type LocalizedString = import("../runtime.js").LocalizedString;
|
||||
export type Agent_Tool_Read_Pdf_Pages_NameInputs = {};
|
||||
@@ -1,29 +0,0 @@
|
||||
/* eslint-disable */
|
||||
import { getLocale, experimentalStaticLocale } from '../runtime.js';
|
||||
|
||||
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
||||
|
||||
/** @typedef {{}} Agent_Tool_Read_Pdf_Pages_NameInputs */
|
||||
|
||||
const en_agent_tool_read_pdf_pages_name = /** @type {(inputs: Agent_Tool_Read_Pdf_Pages_NameInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`Read PDF Pages`)
|
||||
};
|
||||
|
||||
const zh_agent_tool_read_pdf_pages_name = /** @type {(inputs: Agent_Tool_Read_Pdf_Pages_NameInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`读取 PDF 页面`)
|
||||
};
|
||||
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Read PDF Pages" |
|
||||
*
|
||||
* @param {Agent_Tool_Read_Pdf_Pages_NameInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const agent_tool_read_pdf_pages_name = /** @type {((inputs?: Agent_Tool_Read_Pdf_Pages_NameInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Agent_Tool_Read_Pdf_Pages_NameInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
|
||||
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
|
||||
if (locale === "en") return en_agent_tool_read_pdf_pages_name(inputs)
|
||||
return zh_agent_tool_read_pdf_pages_name(inputs)
|
||||
});
|
||||
-16
@@ -1,16 +0,0 @@
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Allows the agent to extract still image frames from video files for analysis." |
|
||||
*
|
||||
* @param {Agent_Tool_Screenshot_DescInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const agent_tool_screenshot_desc: ((inputs?: Agent_Tool_Screenshot_DescInputs, options?: {
|
||||
locale?: "en" | "zh";
|
||||
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Agent_Tool_Screenshot_DescInputs, {
|
||||
locale?: "en" | "zh";
|
||||
}, {}>;
|
||||
export type LocalizedString = import("../runtime.js").LocalizedString;
|
||||
export type Agent_Tool_Screenshot_DescInputs = {};
|
||||
@@ -1,29 +0,0 @@
|
||||
/* eslint-disable */
|
||||
import { getLocale, experimentalStaticLocale } from '../runtime.js';
|
||||
|
||||
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
||||
|
||||
/** @typedef {{}} Agent_Tool_Screenshot_DescInputs */
|
||||
|
||||
const en_agent_tool_screenshot_desc = /** @type {(inputs: Agent_Tool_Screenshot_DescInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`Allows the agent to extract still image frames from video files for analysis.`)
|
||||
};
|
||||
|
||||
const zh_agent_tool_screenshot_desc = /** @type {(inputs: Agent_Tool_Screenshot_DescInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`允许智能体从视频文件中提取静态画面进行分析。`)
|
||||
};
|
||||
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Allows the agent to extract still image frames from video files for analysis." |
|
||||
*
|
||||
* @param {Agent_Tool_Screenshot_DescInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const agent_tool_screenshot_desc = /** @type {((inputs?: Agent_Tool_Screenshot_DescInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Agent_Tool_Screenshot_DescInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
|
||||
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
|
||||
if (locale === "en") return en_agent_tool_screenshot_desc(inputs)
|
||||
return zh_agent_tool_screenshot_desc(inputs)
|
||||
});
|
||||
@@ -1,29 +0,0 @@
|
||||
/* eslint-disable */
|
||||
import { getLocale, experimentalStaticLocale } from '../runtime.js';
|
||||
|
||||
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
||||
|
||||
/** @typedef {{}} Agent_Tool_Screenshot_NameInputs */
|
||||
|
||||
const en_agent_tool_screenshot_name = /** @type {(inputs: Agent_Tool_Screenshot_NameInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`Video Frame Extraction`)
|
||||
};
|
||||
|
||||
const zh_agent_tool_screenshot_name = /** @type {(inputs: Agent_Tool_Screenshot_NameInputs) => LocalizedString} */ () => {
|
||||
return /** @type {LocalizedString} */ (`提取视频帧`)
|
||||
};
|
||||
|
||||
/**
|
||||
* | output |
|
||||
* | --- |
|
||||
* | "Video Frame Extraction" |
|
||||
*
|
||||
* @param {Agent_Tool_Screenshot_NameInputs} inputs
|
||||
* @param {{ locale?: "en" | "zh" }} options
|
||||
* @returns {LocalizedString}
|
||||
*/
|
||||
export const agent_tool_screenshot_name = /** @type {((inputs?: Agent_Tool_Screenshot_NameInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Agent_Tool_Screenshot_NameInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
|
||||
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
|
||||
if (locale === "en") return en_agent_tool_screenshot_name(inputs)
|
||||
return zh_agent_tool_screenshot_name(inputs)
|
||||
});
|
||||
Reference in New Issue
Block a user