* @brief Returns the fs.* virtual-tool catalog exposed to assistant providers. */
| 520 | * @brief Returns the fs.* virtual-tool catalog exposed to assistant providers. |
| 521 | */ |
| 522 | static QVector<detail::AssistantToolDef> fsToolDefs() |
| 523 | { |
| 524 | return { |
| 525 | { QStringLiteral("fs.list"), |
| 526 | QStringLiteral("List files and folders in the Serial Studio workspace folder (or a " |
| 527 | "dragged-in directory). Read-only."), |
| 528 | fsListInputSchema() }, |
| 529 | { QStringLiteral("fs.read"), |
| 530 | QStringLiteral("Read a text file from the workspace folder (or a dragged-in path). " |
| 531 | "Paged: pass offset/limit and follow nextOffset for large files. Refuses " |
| 532 | "binary files."), |
| 533 | fsReadInputSchema() }, |
| 534 | {QStringLiteral("fs.search"), |
| 535 | QStringLiteral("Search file contents across the workspace folder and dragged-in paths " |
| 536 | "(grep-like, literal or regex). Read-only."), |
| 537 | fsSearchInputSchema()}, |
| 538 | { QStringLiteral("fs.write"), |
| 539 | QStringLiteral("Write a UTF-8 text file inside the workspace 'AI/' subfolder, replacing " |
| 540 | "it. Use for notes, summaries, generated configs/exports. Cannot write " |
| 541 | "outside AI/."), |
| 542 | fsWriteInputSchema() }, |
| 543 | {QStringLiteral("fs.append"), |
| 544 | QStringLiteral("Append UTF-8 text to a file inside the workspace 'AI/' subfolder, " |
| 545 | "creating it if needed. Cannot write outside AI/."), |
| 546 | fsWriteInputSchema() }, |
| 547 | {QStringLiteral("fs.delete"), |
| 548 | QStringLiteral("Delete a file or empty directory inside the workspace 'AI/' subfolder. " |
| 549 | "Always asks the user first."), |
| 550 | fsDeleteInputSchema()}, |
| 551 | }; |
| 552 | } |
| 553 | |
| 554 | /** |
| 555 | * @brief Returns true when `name` targets an fs.* sandboxed filesystem tool. |
no test coverage detected