Wire up `replace.diff` stream results
Created by: courier-new
The scope of this ticket involves adding a second connection between the frontend search component and the search streaming endpoint, except this connection sends the full search query with the replace.diff(...)
command appended to the end. For example, given the inputs:
Input | Value |
---|---|
Search | repo:^github.com\/sourcegraph(-testing)?\/ -file:README.md -file:^doc/CHANGELOG.md$ |
"Find" term | the |
"Replace term | THE |
We should stream compute results for the following full query:
repo:^github.com\/sourcegraph(-testing)?\/ -file:README.md -file:^doc/CHANGELOG.md$ content:replace.diff(the -> THE)
(there might need to be escaping involved for Regex mode, but I'm not sure)
Other requirements:
- As soon as the user has input a value for the "find" term, the normal search results stream results should be replaced with
replace.diff
results.- Result node implementation is not in scope, separate issue here
- If user changes their search, the "find" term, the "replace" term, or any mode, the stream should update to match.
I don't know how exactly search's existing streaming endpoint is wired up but we should try to follow their lead as much as possible.