-
Notifications
You must be signed in to change notification settings - Fork 93
Add --valuable-results to search feedback #164
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,9 +4,11 @@ import { getConfig, isCustomApiUrl, validateConfig } from '../utils/config'; | |
| import { getClient } from '../utils/client'; | ||
| import { | ||
| parseMissingContentArg, | ||
| parseValuableResultsArg, | ||
| parseValuableSourcesArg, | ||
| type MissingContentInput, | ||
| type SearchFeedbackRating, | ||
| type ValuableResultInput, | ||
| type ValuableSourceInput, | ||
| } from './search-feedback'; | ||
|
|
||
|
|
@@ -20,6 +22,7 @@ export interface EndpointFeedbackOptions { | |
| tags?: string[]; | ||
| note?: string; | ||
| valuableSources?: ValuableSourceInput[]; | ||
| valuableResults?: ValuableResultInput[]; | ||
| missingContent?: MissingContentInput[]; | ||
| querySuggestions?: string; | ||
| url?: string; | ||
|
|
@@ -207,6 +210,7 @@ export function parseEndpointFeedbackCliOptions(options: { | |
| metadata?: string; | ||
| metadataFile?: string; | ||
| valuableSources?: string; | ||
| valuableResults?: string; | ||
| missingContent?: string | string[]; | ||
| rating?: string; | ||
| }) { | ||
|
|
@@ -217,6 +221,7 @@ export function parseEndpointFeedbackCliOptions(options: { | |
| pageNumbers: parsePageNumbersArg(options.pageNumbers), | ||
| metadata: parseMetadataArg(options.metadata, options.metadataFile), | ||
| valuableSources: parseValuableSourcesArg(options.valuableSources), | ||
| valuableResults: parseValuableResultsArg(options.valuableResults), | ||
| missingContent: parseMissingContentArg(options.missingContent), | ||
| }; | ||
| } | ||
|
|
@@ -261,6 +266,7 @@ export async function executeEndpointFeedback( | |
| ['tags', normalizeList(options.tags)], | ||
| ['note', options.note], | ||
| ['valuableSources', options.valuableSources], | ||
| ['valuableResults', options.valuableResults], | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P2: The Prompt for AI agents |
||
| ['missingContent', options.missingContent], | ||
| ['querySuggestions', options.querySuggestions], | ||
| ['url', options.url], | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P1: The PR goal is to forward the API's
valuableResultPositionsfield by raising a new--valuable-result-positionsflag that accepts bare 1-indexed positions ("1,3" or [1,3]), parsed like--page-numbers. This change instead reuses the existing--valuable-resultsflag andparseValuableResultsArg, which only acceptssource:positionobjects (e.g.web:1) and rejects bare positions, then forwards them as the fieldvaluableResults. As a result the stated capability is not delivered: bare-position input errors out and the intendedvaluableResultPositionsfield is never sent. Note this does match the in-repo README/help text (which documentsource:position), so the code and the PR description conflict; confirm which contract the API expects and align the flag, parser, and forwarded field name.Prompt for AI agents