Support page: choose a PDF or a reply mail (D-141)
PDF | Mail before Analyser. In mail mode the support agent gets ecrire_mail (body + figures of the session as attachments, mail-vN.json) instead of the presentation tools; its prompt ends with prompts/support-mail.md, without presentation.md and modele.typ. The page shows the text, Copier, and the attachments to download. check_sortie_mail in API/support/check.py. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
b475da0acc
commit
ee3875fe75
13 files changed
+161
-31
No files matched your search
+28
-1
@@ -262,7 +262,34 @@ def check_stations_dans_la_seance():
|
||||
assert "stations" in AVEC_SORTIE
|
||||
|
||||
|
||||
CHECKS = [check_lire_document, check_cartes, check_stabilite, check_image_proche, check_max_tokens, check_sans_repli, check_capture_reduite, check_stations_dans_la_seance, check_boucle, check_erreur, check_cout, check_source, check_outil_qui_leve, check_lecture_refusee,
|
||||
def check_sortie_mail():
|
||||
# la sortie mail : prompt sans la présentation, outils sans compiler, versions mail-vN.json, pièces du dossier seules
|
||||
import json
|
||||
from seance import Seance, systeme
|
||||
m, p = systeme("support", "mail"), systeme("support", "pdf")
|
||||
assert "ecrire_mail" in m and "modele.typ\">" not in m and "ecrire_presentation" not in m.split("<sortie>")[-1]
|
||||
assert "modele.typ\">" in p and "ecrire_presentation" in p.split("<sortie>")[-1]
|
||||
d = seance_temporaire()
|
||||
(d / "bosse.png").write_bytes(b"x")
|
||||
b = boite(d)
|
||||
assert "pièces refusées" in leve(b.executer_support, "ecrire_mail", {"texte": "t", "pieces_jointes": ["../x.png"]})
|
||||
leve(b.executer_support, "ecrire_mail", {"texte": "t", "pieces_jointes": ["absente.png"]})
|
||||
assert b.executer_support("ecrire_mail", {"texte": "Bonjour,", "pieces_jointes": ["bosse.png"]}).startswith("mail-v1.json")
|
||||
b.executer_support("ecrire_mail", {"texte": "Bonjour, v2", "pieces_jointes": []})
|
||||
assert json.loads((d / "mail-v2.json").read_text()) == {"texte": "Bonjour, v2", "pieces_jointes": []}
|
||||
import seance
|
||||
seance.CASES, avant = d, seance.CASES
|
||||
try:
|
||||
s = Seance("mail", [], "", DONNEES, lambda e: None, client=FauxClient(), sortie="mail")
|
||||
assert [o["name"] for o in s.support.outils][-1] == "ecrire_mail" and s.derniere_version() is None
|
||||
for i in (1, 2, 10):
|
||||
(s.dossier / f"mail-v{i}.json").write_text("{}")
|
||||
assert s.derniere_version().name == "mail-v10.json"
|
||||
finally:
|
||||
seance.CASES = avant
|
||||
|
||||
|
||||
CHECKS = [check_sortie_mail, check_lire_document, check_cartes, check_stabilite, check_image_proche, check_max_tokens, check_sans_repli, check_capture_reduite, check_stations_dans_la_seance, check_boucle, check_erreur, check_cout, check_source, check_outil_qui_leve, check_lecture_refusee,
|
||||
check_chemin, check_station_absente, check_detecteurs, check_plafond, check_image, check_compiler]
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
Reference in new issue
Block a user