mirror of
https://github.com/larksuite/cli.git
synced 2026-08-03 08:32:46 +08:00
refactor(apps): remove doubao app_type conversion in +create, let server decide via source_agent
This commit is contained in:
@@ -62,14 +62,10 @@ func buildAppsCreateBody(rctx *common.RuntimeContext) map[string]interface{} {
|
||||
// --app-type is constrained to the lowercase enum (html / full_stack) by the
|
||||
// flag's Enum, so send it through verbatim. Legacy uppercase compatibility is
|
||||
// a server concern and is intentionally not surfaced by the CLI.
|
||||
appType := rctx.Str("app-type")
|
||||
agent := envvars.AgentName()
|
||||
if appType == "html" && strings.HasPrefix(agent, "doubao") {
|
||||
appType = "modern_html"
|
||||
}
|
||||
body := map[string]interface{}{
|
||||
"name": strings.TrimSpace(rctx.Str("name")),
|
||||
"app_type": appType,
|
||||
"app_type": rctx.Str("app-type"),
|
||||
}
|
||||
if desc := strings.TrimSpace(rctx.Str("description")); desc != "" {
|
||||
body["description"] = desc
|
||||
|
||||
Reference in New Issue
Block a user