| 34 | * @returns The prompt category string or undefined for default |
| 35 | */ |
| 36 | export function getQuerySourceForREPL(): QuerySource { |
| 37 | const settings = getSettings_DEPRECATED() |
| 38 | const style = settings?.outputStyle ?? DEFAULT_OUTPUT_STYLE_NAME |
| 39 | |
| 40 | if (style === DEFAULT_OUTPUT_STYLE_NAME) { |
| 41 | return 'repl_main_thread' |
| 42 | } |
| 43 | |
| 44 | // All styles in OUTPUT_STYLE_CONFIG are built-in |
| 45 | const isBuiltIn = style in OUTPUT_STYLE_CONFIG |
| 46 | return isBuiltIn |
| 47 | ? (`repl_main_thread:outputStyle:${style}` as QuerySource) |
| 48 | : 'repl_main_thread:outputStyle:custom' |
| 49 | } |