fix: Address code review feedback - use step title as key and add type safety

Co-authored-by: itsababseh <36419647+itsababseh@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-02-13 19:40:11 +00:00
parent e5f267df81
commit 54a3b6121e
2 changed files with 5 additions and 5 deletions

View File

@@ -2,7 +2,7 @@
from datetime import datetime
from enum import Enum
from typing import Any
from typing import Any, Literal
from pydantic import BaseModel, Field
@@ -293,7 +293,7 @@ class AgentCreationStep(BaseModel):
title: str
description: str
status: str = "pending" # pending, in_progress, completed
status: Literal["pending", "in_progress", "completed"] = "pending"
class AgentCreationStepsResponse(ToolResponseBase):

View File

@@ -3,7 +3,7 @@ import { CheckCircleIcon, CircleIcon } from "@phosphor-icons/react";
export interface AgentCreationChecklistStep {
title: string;
description: string;
status: "pending" | "completed";
status: "pending" | "in_progress" | "completed";
}
interface Props {
@@ -17,8 +17,8 @@ export function AgentCreationChecklistCard({ steps }: Props) {
Creating your custom agent...
</p>
<div className="space-y-2">
{steps.map((step, index) => (
<div key={index} className="flex items-start gap-3">
{steps.map((step) => (
<div key={step.title} className="flex items-start gap-3">
<div className="mt-0.5 flex-shrink-0">
{step.status === "completed" ? (
<CheckCircleIcon