Skip to content

Commit

Permalink
Merge pull request #155 from nasa-petal/web-search-bug
Browse files Browse the repository at this point in the history
Web Search Undefined in Query
  • Loading branch information
bruffridge authored Jun 21, 2024
2 parents c60bfdc + 1874cae commit 8fda291
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/assistant/commonFunctions.js
Original file line number Diff line number Diff line change
Expand Up @@ -243,9 +243,13 @@ export async function webSearch(params, context) {
webParams = webParams.parameters;
}

const query = webParams.query + " " + webParams.links;
const links = webParams.links;

const query = links ?
webParams.query + " " + links
: webParams.query;


const domains = links ?
links.map((link) => {
const matches = link.match(/^(?:https?:\/\/)?(?:[^@\n]+@)?(?:www\.)?([^:\/\n?]+)/img)
Expand Down

0 comments on commit 8fda291

Please sign in to comment.