Fix deadlock on getting the focused window

This commit is contained in:
Gregory Schier
2024-08-22 05:46:09 -07:00
parent 4c6684623f
commit 503b7f1c87
7 changed files with 37 additions and 30 deletions

View File

@@ -56,15 +56,14 @@ export function TemplateFunctionDialog({ templateFunction, hide, initialTokens,
}, []);
const tokens: Tokens = useMemo(() => {
console.log('HELLO', argValues);
const argTokens: FnArg[] = Object.keys(argValues).map((name) => ({
name,
value:
argValues[name] === NULL_ARG
? { type: 'null' }
: typeof argValues[name] === 'boolean'
? { type: 'bool', value: argValues[name] }
: { type: 'str', text: argValues[name] ?? '' },
? { type: 'bool', value: argValues[name] === true }
: { type: 'str', text: String(argValues[name] ?? '') },
}));
return {