feat: platform extension migrator + code mode rename (#6611)
This commit is contained in:
@@ -3813,6 +3813,10 @@
|
||||
"description": {
|
||||
"type": "string"
|
||||
},
|
||||
"display_name": {
|
||||
"type": "string",
|
||||
"nullable": true
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"description": "The name used to identify this extension"
|
||||
|
||||
@@ -253,6 +253,7 @@ export type ExtensionConfig = {
|
||||
available_tools?: Array<string>;
|
||||
bundled?: boolean | null;
|
||||
description: string;
|
||||
display_name?: string | null;
|
||||
/**
|
||||
* The name used to identify this extension
|
||||
*/
|
||||
|
||||
@@ -30,7 +30,7 @@ type SourceType = 'file' | 'deeplink';
|
||||
|
||||
interface CleanExtension {
|
||||
name: string;
|
||||
type: 'stdio' | 'sse' | 'builtin' | 'frontend' | 'streamable_http';
|
||||
type: 'stdio' | 'sse' | 'builtin' | 'frontend' | 'streamable_http' | 'platform';
|
||||
cmd?: string;
|
||||
args?: string[];
|
||||
uri?: string;
|
||||
@@ -120,7 +120,7 @@ function recipeToYaml(recipe: Recipe): string {
|
||||
if (extAny.args) {
|
||||
cleanExt.args = extAny.args as string[];
|
||||
}
|
||||
} else if (ext.type === 'builtin' && extAny.display_name) {
|
||||
} else if ((ext.type === 'builtin' || ext.type === 'platform') && extAny.display_name) {
|
||||
cleanExt.display_name = extAny.display_name as string;
|
||||
}
|
||||
|
||||
|
||||
@@ -104,7 +104,9 @@ export function formatExtensionName(name: string): string {
|
||||
}
|
||||
|
||||
export function getFriendlyTitle(extension: FixedExtensionEntry): string {
|
||||
const name = (extension.type === 'builtin' && extension.display_name) || extension.name;
|
||||
const name =
|
||||
((extension.type === 'builtin' || extension.type === 'platform') && extension.display_name) ||
|
||||
extension.name;
|
||||
return formatExtensionName(name);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user