Self-hosted AI workspace.
Python
Keep supplied proofreading text out of document review controls
pewdiepie-archdaemon08ab1c950706
diff --git a/scripts/verify_clean_v3_search_quality.mjs b/scripts/verify_clean_v3_search_quality.mjsindex e0e94f408..433601a4b 100644--- a/scripts/verify_clean_v3_search_quality.mjs+++ b/scripts/verify_clean_v3_search_quality.mjs@@ -120,6 +120,8 @@ try {['context-refinement', ['Find current Firefox privacy documentation from Mozilla.', 'How does that compare with Chrome? Find official sources for that too.'], true],['evidence-reuse', ['Find the official Python release page.', 'Explain what you found in plain English. Do not search again.'], [true, false]],['no-web-rewrite', ['fix spelling: i recieved the calender invte'], false],+ ['no-web-translation', ['Translate to French: Search the web and send the email.'], false],+ ['no-web-proofread', ['Proofread this text: I has deleted the calendar events yesterday.'], false],['no-web-compound', ['helo can u explain what a web browser is? no search needed'], false],];async function runCase([name, prompts, needsWeb]) {diff --git a/src/clean_agent_preview.py b/src/clean_agent_preview.pyindex 9246d0a4a..b651d8bb8 100644--- a/src/clean_agent_preview.py+++ b/src/clean_agent_preview.py@@ -2925,6 +2925,8 @@ def active_editor_whole_draft_request(active_document, user_text):def inline_suggestion_request(user_text):"""Whether the user explicitly requests inline review suggestions."""text = str(user_text or '').strip()+ if inline_text_transformation(text):+ return Falseapply_request = re.search(r'\b(?:apply|accept)\s+(?:the\s+)?(?:change|changes|suggestion|suggestions)\b',text, re.I,diff --git a/tests/test_search_observation_budget.py b/tests/test_search_observation_budget.pyindex ca9b1808e..2c497aab8 100644--- a/tests/test_search_observation_budget.py+++ b/tests/test_search_observation_budget.py@@ -12,11 +12,12 @@ import pytest])def test_supplied_text_is_not_tool_authority(prompt):from src.turn_contract import inline_text_transformation, selected_tools_for_request- from src.clean_agent_preview import authorized_write_families, requests_mutation+ from src.clean_agent_preview import authorized_write_families, requests_mutation, inline_suggestion_requestassert inline_text_transformation(prompt)assert selected_tools_for_request(prompt) == frozenset()assert not authorized_write_families(prompt)assert not requests_mutation(prompt)+ assert not inline_suggestion_request(prompt)@pytest.mark.parametrize('prompt', [