mirror of
https://github.com/Hopiu/llm.git
synced 2026-03-16 20:50:25 +00:00
Don't execute fragments/attachments in !edit sessions, closes #1074
This commit is contained in:
parent
9dace69af7
commit
a7c51e2871
2 changed files with 2 additions and 6 deletions
|
|
@ -73,7 +73,7 @@ Explain the difference between fragments and templates to me
|
|||
!end
|
||||
```
|
||||
|
||||
Additionally, any `!fragment` lines found in a prompt created with `!edit` will also be parsed.
|
||||
Any `!fragment` lines found in a prompt created with `!edit` will not be parsed.
|
||||
|
||||
(fragments-browsing)=
|
||||
## Browsing fragments
|
||||
|
|
|
|||
|
|
@ -1156,11 +1156,7 @@ def chat(
|
|||
if edited_prompt is None:
|
||||
click.echo("Editor closed without saving.", err=True)
|
||||
continue
|
||||
prompt, fragments, attachments = process_fragments_in_chat(
|
||||
db, edited_prompt.strip()
|
||||
)
|
||||
if not prompt and not fragments and not attachments:
|
||||
continue
|
||||
prompt = edited_prompt.strip()
|
||||
if prompt.strip().startswith("!fragment "):
|
||||
prompt, fragments, attachments = process_fragments_in_chat(db, prompt)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue