Commit bd9aa64
committed
fix: implement chat mode tools filtering and session marker cleanup
Chat mode now properly limits tools to: file_operations, memory_operations,
web_operations, todo_operations, interact (tools 1, 4, 5, 6, 8).
Changes:
- SimpleAIAgent: added todo_operations to chat_mode_tools list
- PromptBuilder: fixed caching logic - cache now only used when no enable_tools
filter is set. Previously filtering was applied but cached result returned
anyway, causing all 11 tools to still appear.
- Chat.pm: strip session markers from final_response before displaying.
Both code paths (messages_saved_during_workflow and else branch) now
clean the marker before add_to_buffer.
- StreamingController: strip simple session marker format (<!--session:name-->)
in addition to structured format (<!--session:{...}-->) in all buffer flush
locations. Previously only structured format was stripped, leaving simple
markers visible in output.
Testing: --chat mode now shows only 5 tools and no session data in output.1 parent 694a0bb commit bd9aa64
4 files changed
Lines changed: 23 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
166 | 166 | | |
167 | 167 | | |
168 | 168 | | |
169 | | - | |
170 | | - | |
171 | | - | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
172 | 173 | | |
173 | 174 | | |
174 | 175 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
765 | 765 | | |
766 | 766 | | |
767 | 767 | | |
768 | | - | |
| 768 | + | |
| 769 | + | |
769 | 770 | | |
770 | 771 | | |
771 | 772 | | |
772 | 773 | | |
773 | | - | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
774 | 778 | | |
775 | 779 | | |
776 | 780 | | |
777 | 781 | | |
778 | | - | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
779 | 786 | | |
780 | 787 | | |
781 | 788 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
238 | 238 | | |
239 | 239 | | |
240 | 240 | | |
241 | | - | |
| 241 | + | |
| 242 | + | |
242 | 243 | | |
243 | 244 | | |
244 | 245 | | |
| |||
256 | 257 | | |
257 | 258 | | |
258 | 259 | | |
259 | | - | |
| 260 | + | |
| 261 | + | |
260 | 262 | | |
261 | 263 | | |
262 | 264 | | |
| |||
291 | 293 | | |
292 | 294 | | |
293 | 295 | | |
| 296 | + | |
| 297 | + | |
294 | 298 | | |
295 | 299 | | |
296 | 300 | | |
| |||
304 | 308 | | |
305 | 309 | | |
306 | 310 | | |
307 | | - | |
| 311 | + | |
| 312 | + | |
308 | 313 | | |
309 | 314 | | |
310 | 315 | | |
| |||
0 commit comments