You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
re_pattern:str='', # Optional regex to search for (re.DOTALL+re.MULTILINE is used)
413
412
msg_type:str=None, # optional limit by message type ('code', 'note', or 'prompt')
414
413
before:int=0, # Include additional n msgs before matches
415
-
after:int=0, # Include additional n msgs before matches
416
-
context:int=0, # Include additional n msgs around matches (recommended: set `context=2` when searching to see ipynb context)
414
+
after:int=0, # Include additional n msgs after matches
415
+
context:int=None, # Include additional n msgs around matches (default 1, or 0 when `headers_only`)
417
416
use_case:bool=False, # Use case-sensitive matching?
418
417
use_regex:bool=True, # Use regex matching?
419
418
only_err:bool=False, # Only return messages that have errors?
@@ -437,6 +436,7 @@ async def find_msgs(
437
436
Message ids are identical to those in LLM chat history, so do NOT call this to view a specific message if it's in the chat history--instead use `view_msg`.
438
437
Do NOT use find_msgs to view message content in the current dialog above the current prompt -- these are *already* provided in LLM context, so just read the content there directly. (NB: LLM context only includes messages *above* the current prompt, whereas `find_msgs` can access *all* messages.)
439
438
To refer to a found message from code, use its `id` field."""
Copy file name to clipboardExpand all lines: dialoghelper/solveitskill.py
+7-7Lines changed: 7 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -23,8 +23,8 @@
23
23
- `add_msg` — placement can be `add_after`/`add_before` (relative to current) or `at_start`/`at_end` (absolute)
24
24
- **NB** When not passing a message id, it defaults to the *current* message. So if you call it multiple times with no message id, the messages will be added in REVERSE! Instead, get the return value of `add_msg` after each call, and use that for the next call
25
25
- `update_msg` — partial updates; only pass fields to change
26
-
- `del_msg` — use sparingly, only when explicitly requested
27
-
`copy_msg` → `paste_msg` — for moving/duplicating messages within running dialogs.
26
+
- `del_msgs` — use sparingly, only when explicitly requested
27
+
`copy_msgs` → `paste_msgs` — for moving/duplicating messages within running dialogs.
28
28
29
29
## Non-decorated Functions Worth Knowing
30
30
@@ -49,7 +49,7 @@
49
49
0. Find message id in dynamic contenxt, or using `view_dlg` or `find_msgs`
50
50
1. lnhashview_msg(id)
51
51
2. Identify lines to change
52
-
3. exhash_msg(...)
52
+
3. msg_exhash(...)
53
53
4. If more edits needed: re-read, then repeat from step 2
0 commit comments