refactor(apps): remove doubao app_type conversion in +create, let server decide via source_agent

This commit is contained in:
anguohui
2026-07-10 18:51:11 +08:00
parent ec6744136a
commit 39e1314f37

View File

@@ -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