diff --git a/src-tauri/src/services/orchestrator.rs b/src-tauri/src/services/orchestrator.rs index 32981a2..f5823ca 100644 --- a/src-tauri/src/services/orchestrator.rs +++ b/src-tauri/src/services/orchestrator.rs @@ -51,6 +51,41 @@ pub fn build_analyst_prompt(ticket: &ProcessedTicket, project: &Project) -> Stri 3. Evalue si une correction de code est necessaire 4. Produis un rapport structure en markdown +## Format de sortie obligatoire +- Ecris un rapport en markdown avec des titres, des sous-titres et des listes. +- Laisse une ligne vide entre chaque section. +- Mets les labels importants en gras (ex: **Impact**, **Cause racine**). +- Evite les gros paragraphes: maximum 4 lignes par paragraphe. +- Respecte cette structure: + +# Analyse ticket #{artifact_id} - {title} + +## Resume executif +- **Constat:** +- **Impact:** +- **Urgence:** + +## Diagnostic technique +### Cause racine +... +### Indices observables +- ... + +## Zone de code probable +- `chemin/fichier.ext` - justification + +## Plan de correction +1. ... +2. ... + +## Risques et validations +- **Risques:** +- **Tests a executer:** + +## Conclusion +- **Decision:** FIX_NEEDED ou NO_FIX +- **Rationale courte:** ... + Termine ton rapport par un de ces verdicts sur une ligne separee: [VERDICT: FIX_NEEDED] si une correction de code est necessaire [VERDICT: NO_FIX] si aucune correction n'est necessaire"#, diff --git a/src/components/tickets/TicketDetail.tsx b/src/components/tickets/TicketDetail.tsx index 87c0796..67fda53 100644 --- a/src/components/tickets/TicketDetail.tsx +++ b/src/components/tickets/TicketDetail.tsx @@ -492,13 +492,13 @@ export default function TicketDetail() { )} {tab === "analyst" && ticket.analyst_report && ( -
+
{ticket.analyst_report}
)} {tab === "developer" && ticket.developer_report && ( -
+
{ticket.developer_report}
)} diff --git a/src/index.css b/src/index.css index 9229e45..9f165e6 100644 --- a/src/index.css +++ b/src/index.css @@ -24,3 +24,92 @@ cursor: not-allowed; } } + +.markdown-report { + color: #111827; + line-height: 1.6; + font-size: 0.95rem; +} + +.markdown-report > :first-child { + margin-top: 0; +} + +.markdown-report > :last-child { + margin-bottom: 0; +} + +.markdown-report h1, +.markdown-report h2, +.markdown-report h3, +.markdown-report h4 { + color: #0f172a; + font-weight: 700; + line-height: 1.3; + margin-top: 1.25rem; + margin-bottom: 0.65rem; +} + +.markdown-report h1 { + font-size: 1.35rem; +} + +.markdown-report h2 { + border-bottom: 1px solid #e5e7eb; + font-size: 1.15rem; + padding-bottom: 0.2rem; +} + +.markdown-report h3 { + font-size: 1rem; +} + +.markdown-report p { + margin: 0.6rem 0; + white-space: pre-wrap; +} + +.markdown-report ul, +.markdown-report ol { + margin: 0.55rem 0 0.8rem; + padding-left: 1.3rem; +} + +.markdown-report ul { + list-style: disc; +} + +.markdown-report ol { + list-style: decimal; +} + +.markdown-report li { + margin: 0.25rem 0; +} + +.markdown-report strong { + color: #0f172a; + font-weight: 700; +} + +.markdown-report code { + background: #f3f4f6; + border-radius: 0.3rem; + font-size: 0.85em; + padding: 0.1rem 0.3rem; +} + +.markdown-report pre { + background: #111827; + border-radius: 0.5rem; + color: #f9fafb; + margin: 0.7rem 0; + overflow-x: auto; + padding: 0.75rem; +} + +.markdown-report pre code { + background: transparent; + color: inherit; + padding: 0; +}