MCPcopy Create free account
hub / github.com/hydro-dev/Hydro / writeSelectionToInput

Function writeSelectionToInput

packages/ui-default/pages/problem_main.page.tsx:45–54  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

43};
44
45function writeSelectionToInput() {
46 const currentValue = $('[name="q"]').val() as string;
47 const parsedCurrentValue = parser.parse(currentValue, parserOptions) as SearchParserResult;
48 const q = parser.stringify({
49 ...parsedCurrentValue,
50 ...keywords.reduce((acc, keyword) => ({ ...acc, [keyword]: selectedTags[keyword] }), {}),
51 text: parsedCurrentValue.text,
52 }, parserOptions);
53 $('[name="q"]').val(q);
54}
55
56function updateSelection() {
57 selectedTags.category = _.uniq(selectedTags.category);

Callers 1

handleTagSelectedFunction · 0.85

Calls 1

valMethod · 0.80

Tested by

no test coverage detected