forked from bai/curriculum-project-hub
feat: redesign Feishu project console
This commit is contained in:
@@ -47,6 +47,7 @@ async function main(argv: readonly string[]): Promise<void> {
|
||||
: {}),
|
||||
...(tools !== undefined ? { tools } : {}),
|
||||
...(sortOrderRaw !== undefined ? { sortOrder: integer(sortOrderRaw, "sort-order") } : {}),
|
||||
...(options.has("default") ? { isDefault: boolean(options.get("default")!, "default") } : {}),
|
||||
});
|
||||
console.log(JSON.stringify(role));
|
||||
return;
|
||||
@@ -79,6 +80,7 @@ async function main(argv: readonly string[]): Promise<void> {
|
||||
systemPromptConfigured: role.systemPrompt !== null,
|
||||
tools: role.tools,
|
||||
disabled: role.disabledAt !== null,
|
||||
default: role.isDefault,
|
||||
skills: role.skillBindings.map((binding) => ({
|
||||
name: binding.skill.name,
|
||||
version: binding.skill.version,
|
||||
@@ -138,10 +140,16 @@ function integer(raw: string, name: string): number {
|
||||
return value;
|
||||
}
|
||||
|
||||
function boolean(raw: string, name: string): boolean {
|
||||
if (raw === "true") return true;
|
||||
if (raw === "false") return false;
|
||||
throw new Error(`--${name} must be true or false`);
|
||||
}
|
||||
|
||||
function printHelp(): void {
|
||||
console.log(`Usage:
|
||||
agent-config install-skill --organization ORG --source DIR --version VERSION
|
||||
agent-config upsert-role --organization ORG --role ID --label LABEL [--model MODEL] [--system-prompt-file FILE] [--tools-json JSON] [--sort-order N]
|
||||
agent-config upsert-role --organization ORG --role ID --label LABEL [--model MODEL] [--system-prompt-file FILE] [--tools-json JSON] [--sort-order N] [--default true|false]
|
||||
agent-config set-role-skills --organization ORG --role ID --skills name,name
|
||||
agent-config list --organization ORG
|
||||
agent-config verify-store --organization ORG`);
|
||||
|
||||
@@ -233,6 +233,7 @@ async function initializeSilo(
|
||||
roleId: "draft",
|
||||
label: "草稿",
|
||||
sortOrder: 10,
|
||||
isDefault: true,
|
||||
},
|
||||
{
|
||||
organizationId: input.organization.id,
|
||||
|
||||
Reference in New Issue
Block a user