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