Remove duplicate UI fields already provided by the platform
The adapter config schema was re-declaring model, promptTemplate, env, extraArgs, timeoutSec, and graceSec which the Paperclip platform already surfaces as standard fields, causing duplicate controls in the agent configuration UI. Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
@@ -3,15 +3,7 @@ import type { AdapterConfigSchema } from "@paperclipai/adapter-utils";
|
||||
export function getConfigSchema(): AdapterConfigSchema {
|
||||
return {
|
||||
fields: [
|
||||
// Core fields
|
||||
{
|
||||
key: "model",
|
||||
label: "Model",
|
||||
type: "text",
|
||||
hint: "OpenCode model id in provider/model format (e.g. anthropic/claude-sonnet-4-6)",
|
||||
required: true,
|
||||
group: "Core",
|
||||
},
|
||||
// Core fields (model, promptTemplate, env, extraArgs are provided by the platform)
|
||||
{
|
||||
key: "variant",
|
||||
label: "Variant",
|
||||
@@ -27,27 +19,6 @@ export function getConfigSchema(): AdapterConfigSchema {
|
||||
hint: "Inject runtime config with permission.external_directory=allow",
|
||||
group: "Core",
|
||||
},
|
||||
{
|
||||
key: "promptTemplate",
|
||||
label: "Prompt Template",
|
||||
type: "text",
|
||||
hint: "Run prompt template",
|
||||
group: "Core",
|
||||
},
|
||||
{
|
||||
key: "extraArgs",
|
||||
label: "Extra Arguments",
|
||||
type: "textarea",
|
||||
hint: "JSON array of additional CLI args appended to the opencode command",
|
||||
group: "Core",
|
||||
},
|
||||
{
|
||||
key: "env",
|
||||
label: "Environment Variables",
|
||||
type: "textarea",
|
||||
hint: "KEY=VALUE pairs, one per line. Overrides inherited vars from the Deployment.",
|
||||
group: "Core",
|
||||
},
|
||||
|
||||
// Kubernetes fields
|
||||
{
|
||||
@@ -148,23 +119,7 @@ export function getConfigSchema(): AdapterConfigSchema {
|
||||
group: "Kubernetes",
|
||||
},
|
||||
|
||||
// Operational fields
|
||||
{
|
||||
key: "timeoutSec",
|
||||
label: "Timeout (seconds)",
|
||||
type: "number",
|
||||
default: 0,
|
||||
hint: "Run timeout in seconds; 0 means no timeout",
|
||||
group: "Operational",
|
||||
},
|
||||
{
|
||||
key: "graceSec",
|
||||
label: "Grace Period (seconds)",
|
||||
type: "number",
|
||||
default: 60,
|
||||
hint: "Additional grace before adapter gives up after Job deadline",
|
||||
group: "Operational",
|
||||
},
|
||||
// Operational fields (timeoutSec and graceSec are provided by the platform)
|
||||
],
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user