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
{{ message }}
Repository navigation
Commit bef0908
Browse filesBrowse the repository at this point in the historyBrowse files
feat(knowledge): enhance initialization output with sample search results
- Added functionality to display the sample query and retrieved content after successful initialization.
- Updated the CLI to include a complete response in JSON format, preserving existing result fields.
- Modified the output to show matched document names and a 400-character content excerpt in both English and Chinese.
- Ensured that no additional search requests are made during this process, maintaining efficiency.
- Updated documentation to reflect these changes and added tests to validate the new output format.
**Goal:** Display the sample query and retrieved content after successful initialization; expose the complete successful response as `sampleSearch: { query, response }` in JSON.
4
+
5
+
**Architecture:** Return the successful search response from the existing polling loop. Preserve existing result fields, checkpoint format, error propagation and resource handling. Text output shows the matched sample document and a bounded excerpt with English/Chinese labels. No additional search request or new flags.
User approved this design in the current task. Execute inline in the current checkout.
10
+
11
+
-[x] Extend workflow tests to assert response preservation, including request ID, and exactly one search per successful first/reuse run. Extend command tests for JSON and bilingual text, and runtime E2E for the serialized field. Run the targeted tests and observe missing-output failures.
12
+
-[x] In `init-workflow.ts`, make `waitForSample` return a successful checked value. Return `sampleSearch` alongside `sampleMatched`. In `init.ts`, render the query, document name and a 400-character content excerpt from a node matching the sample; keep full JSON response unchanged.
13
+
-[x] Document output fields in `docs/knowledge/knowledge-cli-guide.md`. Run targeted init tests and `pnpm exec vp check`, inspect the diff and record results. No new cloud resources are needed for this output-only change; historical live transcripts remain unchanged.
14
+
15
+
Validation: the initial targeted run failed on four missing-output assertions; implementation then passed 69 tests across seven init test files. `vp check --fix` passed with three unrelated pre-existing warnings. Skill assets were regenerated without changes. No new live resources were created.
0 commit comments