A suggestion card sends its prompt
Filling the composer and waiting for Enter made the card a form to review rather than a thing to press. One click, one reply. That changes what a prompt has to be. The built-ins ended mid-sentence -- "My plan: " -- because nothing was sent until the person finished the thought; sent cold they are a model guessing at material nobody gave it. All three are rewritten to ask for what they need, so the first reply is the right question instead. There is a test that they end as complete sentences, since the failure is silent and only visible in the answer. requestSubmit, not submit: it fires the submit event, which is what htmx listens for. Same call the Enter key already makes. Version bumped because app.js is what changed, and the service worker caches it -- without the bump the first load after this would still only fill the box. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -70,6 +70,15 @@ def test_the_seed_flag_lives_in_settings(db):
|
||||
assert settings_store.get(db, suggestions_service.SEEDED_KEY) is True
|
||||
|
||||
|
||||
def test_every_default_prompt_stands_on_its_own():
|
||||
"""A card is sent the instant it is clicked, with nothing added. One that
|
||||
trails off waiting for material the person has not given is a prompt the
|
||||
model has to guess at."""
|
||||
for name, _description, prompt in suggestions_service.DEFAULTS:
|
||||
assert prompt == prompt.strip(), f"{name} has stray whitespace"
|
||||
assert prompt.endswith("."), f"{name} does not end as a complete sentence"
|
||||
|
||||
|
||||
# --- What is shown ------------------------------------------------------------
|
||||
def test_only_enabled_ones_are_shown(db):
|
||||
suggestions_service.create(db, name="Shown", prompt="a")
|
||||
|
||||
Reference in New Issue
Block a user