test: add web tool output formatting
This commit is contained in:
@@ -737,7 +737,7 @@ git -C /home/alex/dotfiles commit -m "test: add exa web provider adapter"
|
||||
- Create: `/home/alex/dotfiles/.pi/agent/extensions/web-search/src/format.ts`
|
||||
- Test: `/home/alex/dotfiles/.pi/agent/extensions/web-search/src/format.test.ts`
|
||||
|
||||
- [ ] **Step 1: Write the failing formatter tests**
|
||||
- [x] **Step 1: Write the failing formatter tests**
|
||||
|
||||
Create `/home/alex/dotfiles/.pi/agent/extensions/web-search/src/format.test.ts` with this content:
|
||||
|
||||
@@ -797,7 +797,7 @@ test("formatFetchOutput includes both successful and failed URLs", () => {
|
||||
});
|
||||
```
|
||||
|
||||
- [ ] **Step 2: Run the formatter tests to verify they fail**
|
||||
- [x] **Step 2: Run the formatter tests to verify they fail**
|
||||
|
||||
Run:
|
||||
|
||||
@@ -808,7 +808,7 @@ npx tsx --test src/format.test.ts
|
||||
|
||||
Expected: `FAIL` with an `ERR_MODULE_NOT_FOUND` error for `./format.ts`.
|
||||
|
||||
- [ ] **Step 3: Write the minimal formatter implementation**
|
||||
- [x] **Step 3: Write the minimal formatter implementation**
|
||||
|
||||
Create `/home/alex/dotfiles/.pi/agent/extensions/web-search/src/format.ts` with this content:
|
||||
|
||||
@@ -891,7 +891,7 @@ export function formatFetchOutput(response: NormalizedFetchResponse, options: Fe
|
||||
}
|
||||
```
|
||||
|
||||
- [ ] **Step 4: Run the formatter tests to verify they pass**
|
||||
- [x] **Step 4: Run the formatter tests to verify they pass**
|
||||
|
||||
Run:
|
||||
|
||||
@@ -902,7 +902,7 @@ npx tsx --test src/format.test.ts
|
||||
|
||||
Expected: `PASS` for all three tests.
|
||||
|
||||
- [ ] **Step 5: Commit the formatter layer**
|
||||
- [x] **Step 5: Commit the formatter layer**
|
||||
|
||||
Run:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user