Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/components/agents/DeployModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,9 @@ function copyCommandToClipboard(command) {
label.label {{ field.name }}
.field-body
.field.has-addons
.control.is-expanded
.control.is-expanded(v-if="field.name === 'agents.architecture'")
input.input(type="text" v-tooltip="'e.g. 386, amd64, arm64, wasm, etc.'" v-model="field.value")
Comment thread
clenk marked this conversation as resolved.
.control.is-expanded(v-else)
input.input(type="text" v-model="field.value")
Comment on lines +152 to 155
Copy link

Copilot AI Mar 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The architecture-specific branch duplicates the same input markup as the default case and only differs by the tooltip. Consider using a single input and conditionally setting/disable the tooltip content based on field.name to reduce duplication and make future field-specific hints easier to maintain.

Suggested change
.control.is-expanded(v-if="field.name === 'agents.architecture'")
input.input(type="text" v-tooltip="'e.g. 386, amd64, arm64, wasm, etc.'" v-model="field.value")
.control.is-expanded(v-else)
input.input(type="text" v-model="field.value")
.control.is-expanded
input.input(
type="text"
v-model="field.value"
v-tooltip="field.name === 'agents.architecture' ? 'e.g. 386, amd64, arm64, wasm, etc.' : null"
)

Copilot uses AI. Check for mistakes.
.control
a.button.has-tooltip-arrow(title="Reset to default" @click="field.value = agentFieldConfig[field.name]")
Copy link

Copilot AI Mar 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Reset to default" assigns agentFieldConfig[field.name] directly; for fields that don't have a configured default (e.g., new placeholders like agents.architecture), this will set the model to undefined even though the initial value is "" when no default exists. Consider falling back to an empty string (or checking hasOwnProperty) so reset always returns to the same effective default shown when the field is first rendered.

Suggested change
a.button.has-tooltip-arrow(title="Reset to default" @click="field.value = agentFieldConfig[field.name]")
a.button.has-tooltip-arrow(title="Reset to default" @click="field.value = Object.prototype.hasOwnProperty.call(agentFieldConfig, field.name) ? agentFieldConfig[field.name] : ''")

Copilot uses AI. Check for mistakes.
Expand Down