diff --git a/internal/loki/parity_turn_test.go b/internal/loki/parity_turn_test.go index 1312487..9a83a36 100644 --- a/internal/loki/parity_turn_test.go +++ b/internal/loki/parity_turn_test.go @@ -9,6 +9,7 @@ import ( "net/http/httptest" "net/url" "os" + "os/exec" "path/filepath" "regexp" "strings" @@ -126,6 +127,22 @@ func runParityTurn(t *testing.T, sc parityTurnScenario) parityTurnFixture { t.Helper() testHome(t) t.Setenv(internalTokenEnv, jetonTest) + // Playwright installé ou non selon la machine : web_screenshot entrerait ou + // non dans les outils du mode Code. Hors du PATH, le journal ne dépend plus + // de la machine qui le tire. + for { + p, err := exec.LookPath("playwright") + if err != nil { + break + } + var keep []string + for _, d := range filepath.SplitList(os.Getenv("PATH")) { + if filepath.Clean(d) != filepath.Dir(p) { + keep = append(keep, d) + } + } + t.Setenv("PATH", strings.Join(keep, string(os.PathListSeparator))) + } var ( mu sync.Mutex requests []any diff --git a/rust/loki-rs/tests/parity_turn/code_contrat_abandonne.json b/rust/loki-rs/tests/parity_turn/code_contrat_abandonne.json index c83a08c..4bb701e 100644 --- a/rust/loki-rs/tests/parity_turn/code_contrat_abandonne.json +++ b/rust/loki-rs/tests/parity_turn/code_contrat_abandonne.json @@ -617,29 +617,6 @@ } }, "type": "function" - }, - { - "function": { - "description": "Photographie une page web (JS exécuté) pour la MONTRER. La réponse donne la ligne markdown à recopier. Tu ne vois pas l'image.", - "name": "web_screenshot", - "parameters": { - "properties": { - "full_page": { - "description": "Page entière (lourd). Défaut false.", - "type": "boolean" - }, - "url": { - "description": "URL complète", - "type": "string" - } - }, - "required": [ - "url" - ], - "type": "object" - } - }, - "type": "function" } ] }, @@ -1362,29 +1339,6 @@ } }, "type": "function" - }, - { - "function": { - "description": "Photographie une page web (JS exécuté) pour la MONTRER. La réponse donne la ligne markdown à recopier. Tu ne vois pas l'image.", - "name": "web_screenshot", - "parameters": { - "properties": { - "full_page": { - "description": "Page entière (lourd). Défaut false.", - "type": "boolean" - }, - "url": { - "description": "URL complète", - "type": "string" - } - }, - "required": [ - "url" - ], - "type": "object" - } - }, - "type": "function" } ] }, @@ -1920,29 +1874,6 @@ } }, "type": "function" - }, - { - "function": { - "description": "Photographie une page web (JS exécuté) pour la MONTRER. La réponse donne la ligne markdown à recopier. Tu ne vois pas l'image.", - "name": "web_screenshot", - "parameters": { - "properties": { - "full_page": { - "description": "Page entière (lourd). Défaut false.", - "type": "boolean" - }, - "url": { - "description": "URL complète", - "type": "string" - } - }, - "required": [ - "url" - ], - "type": "object" - } - }, - "type": "function" } ] }, @@ -2486,29 +2417,6 @@ } }, "type": "function" - }, - { - "function": { - "description": "Photographie une page web (JS exécuté) pour la MONTRER. La réponse donne la ligne markdown à recopier. Tu ne vois pas l'image.", - "name": "web_screenshot", - "parameters": { - "properties": { - "full_page": { - "description": "Page entière (lourd). Défaut false.", - "type": "boolean" - }, - "url": { - "description": "URL complète", - "type": "string" - } - }, - "required": [ - "url" - ], - "type": "object" - } - }, - "type": "function" } ] }, @@ -3261,29 +3169,6 @@ } }, "type": "function" - }, - { - "function": { - "description": "Photographie une page web (JS exécuté) pour la MONTRER. La réponse donne la ligne markdown à recopier. Tu ne vois pas l'image.", - "name": "web_screenshot", - "parameters": { - "properties": { - "full_page": { - "description": "Page entière (lourd). Défaut false.", - "type": "boolean" - }, - "url": { - "description": "URL complète", - "type": "string" - } - }, - "required": [ - "url" - ], - "type": "object" - } - }, - "type": "function" } ] }, @@ -4044,29 +3929,6 @@ } }, "type": "function" - }, - { - "function": { - "description": "Photographie une page web (JS exécuté) pour la MONTRER. La réponse donne la ligne markdown à recopier. Tu ne vois pas l'image.", - "name": "web_screenshot", - "parameters": { - "properties": { - "full_page": { - "description": "Page entière (lourd). Défaut false.", - "type": "boolean" - }, - "url": { - "description": "URL complète", - "type": "string" - } - }, - "required": [ - "url" - ], - "type": "object" - } - }, - "type": "function" } ] }, diff --git a/rust/loki-rs/tests/parity_turn/code_contrat_deja_tenu.json b/rust/loki-rs/tests/parity_turn/code_contrat_deja_tenu.json index 13f8087..9078d75 100644 --- a/rust/loki-rs/tests/parity_turn/code_contrat_deja_tenu.json +++ b/rust/loki-rs/tests/parity_turn/code_contrat_deja_tenu.json @@ -561,29 +561,6 @@ } }, "type": "function" - }, - { - "function": { - "description": "Photographie une page web (JS exécuté) pour la MONTRER. La réponse donne la ligne markdown à recopier. Tu ne vois pas l'image.", - "name": "web_screenshot", - "parameters": { - "properties": { - "full_page": { - "description": "Page entière (lourd). Défaut false.", - "type": "boolean" - }, - "url": { - "description": "URL complète", - "type": "string" - } - }, - "required": [ - "url" - ], - "type": "object" - } - }, - "type": "function" } ] }, @@ -1306,29 +1283,6 @@ } }, "type": "function" - }, - { - "function": { - "description": "Photographie une page web (JS exécuté) pour la MONTRER. La réponse donne la ligne markdown à recopier. Tu ne vois pas l'image.", - "name": "web_screenshot", - "parameters": { - "properties": { - "full_page": { - "description": "Page entière (lourd). Défaut false.", - "type": "boolean" - }, - "url": { - "description": "URL complète", - "type": "string" - } - }, - "required": [ - "url" - ], - "type": "object" - } - }, - "type": "function" } ] }