Spaces:
Sleeping

Magnus Persson commited on
Commit
09aba58
·
1 Parent(s): 0016651

Add Help me and Surprise me with Undo, and the real-keys flow check

Browse files

HelperService rewrites an idea (Help me) or invents one from a library theme (Surprise me). Every reply passes moderation and the workshop policy check before it is shown; a failed Surprise falls back to a curated library prompt. Limits: 2 s per device, 60 a minute overall, 8 at once, pause switch. Undo restores the previous text until the visitor types, picks an idea or uses an alternative. check_generated_text now runs the policy check and does not generate an alternative for LLM text.

scripts/check_real_flow.py drives startup validation, Create, a cached example, refusals, Help me and Surprise me with real keys and scans the logs for leaks. README gets the provider privacy note. Whole-flow safety review done; operational gate items are in todo.md. 381 tests.

17 files changed +992 -31
Files changed (17)
README.md+4
STATUS.md+4-1
app.py+5-2
locales/en.json+5
locales/sv.json+5
scripts/check_real_flow.pyAdded+155
src/services/helpers.pyAdded+195
src/services/safety.py+14-6
src/services/session.py+4
src/ui/create_tab.py+30-15
src/ui/helper_row.pyAdded+194
src/ui/ideas.py+4-1
src/ui/style.css+8-2
tests/test_app_smoke.py+29
tests/test_helpers.pyAdded+319
tests/test_safety.py+7
todo.md+10-4