mirror of
https://github.com/Kaelio/ktx.git
synced 2026-06-22 08:38:08 +02:00
feat(setup): wizard prompt tweaks and quieter query-history filter output (#259)
Setup wizard flow tweaks: - Add a reveal-tail password prompt (reveal-password-prompt.ts) that unmasks the last few characters of a typed/pasted secret, and wire it into the setup prompt adapter in place of clack's password(); adds the @clack/core dep. - Reorder wizard select options: surface "Paste a key" before the environment-variable option across embeddings/models/sources, promote Metabase/Notion in the source list, put Git URL before Local path, reorder the Notion crawl-mode choices, and relabel the sources "Done" action. Query-history filter picker output: - Collapse the per-template parse-failure lines into a single count in the setup output and route the full template-id list to --debug stderr. - Model parse failures as a structured parseFailedTemplateIds field instead of warning strings. - Add a privacy-safe query_history_filter_completed telemetry event (counts/enums only), mirrored into the Python daemon schema.
This commit is contained in:
parent
8eb1cd3e79
commit
c2beaf7d55
22 changed files with 494 additions and 34 deletions
|
|
@ -119,11 +119,11 @@ export interface KtxSetupSourcesDeps {
|
|||
|
||||
const SOURCE_OPTIONS: Array<{ value: KtxSetupSourceType; label: string }> = [
|
||||
{ value: 'dbt', label: 'dbt' },
|
||||
{ value: 'metricflow', label: 'MetricFlow' },
|
||||
{ value: 'metabase', label: 'Metabase' },
|
||||
{ value: 'notion', label: 'Notion' },
|
||||
{ value: 'metricflow', label: 'MetricFlow' },
|
||||
{ value: 'looker', label: 'Looker' },
|
||||
{ value: 'lookml', label: 'LookML' },
|
||||
{ value: 'notion', label: 'Notion' },
|
||||
];
|
||||
|
||||
const SOURCE_LABELS = Object.fromEntries(SOURCE_OPTIONS.map((option) => [option.value, option.label])) as Record<
|
||||
|
|
@ -269,8 +269,8 @@ async function chooseSourceCredentialRef(input: {
|
|||
message: `How should KTX find your ${input.label}?`,
|
||||
options: [
|
||||
...(input.existingRef ? [{ value: 'keep', label: 'Keep existing credential' }] : []),
|
||||
{ value: 'env', label: `Use ${input.envName} from the environment` },
|
||||
{ value: 'paste', label: 'Paste a key and save it as a local secret file' },
|
||||
{ value: 'env', label: `Use ${input.envName} from the environment` },
|
||||
{ value: 'back', label: 'Back' },
|
||||
],
|
||||
});
|
||||
|
|
@ -307,8 +307,8 @@ async function chooseGitAuthCredentialRef(input: {
|
|||
message: `${label} repo requires authentication.`,
|
||||
options: [
|
||||
...(input.existingRef ? [{ value: 'keep', label: 'Keep existing credential' }] : []),
|
||||
{ value: 'env', label: 'Use GITHUB_TOKEN from the environment' },
|
||||
{ value: 'paste', label: 'Paste a token and save it as a local secret file' },
|
||||
{ value: 'env', label: 'Use GITHUB_TOKEN from the environment' },
|
||||
{ value: 'skip', label: 'Skip — try without authentication' },
|
||||
{ value: 'back', label: 'Back' },
|
||||
],
|
||||
|
|
@ -1063,8 +1063,8 @@ async function promptForInteractiveSource(
|
|||
const selectedLocation = await prompts.select({
|
||||
message: `${source} source location`,
|
||||
options: [
|
||||
{ value: 'path', label: 'Local path' },
|
||||
{ value: 'git', label: 'Git URL' },
|
||||
{ value: 'path', label: 'Local path' },
|
||||
{ value: 'back', label: 'Back' },
|
||||
],
|
||||
});
|
||||
|
|
@ -1343,8 +1343,8 @@ async function promptForInteractiveSource(
|
|||
const crawlMode = await prompts.select({
|
||||
message: 'Which Notion pages should KTX ingest?',
|
||||
options: [
|
||||
{ value: 'selected_roots', label: 'Specific pages and their subpages (choose them in a picker)' },
|
||||
{ value: 'all_accessible', label: 'All pages the integration can access' },
|
||||
{ value: 'selected_roots', label: 'Specific pages and their subpages (choose them in a picker)' },
|
||||
{ value: 'back', label: 'Back' },
|
||||
],
|
||||
});
|
||||
|
|
@ -2064,7 +2064,7 @@ export async function runKtxSetupSourcesStep(
|
|||
const addMore = await prompts.select({
|
||||
message: `${readyConnectionIds.length} context source${readyConnectionIds.length > 1 ? 's' : ''} configured (${readyConnectionIds.join(', ')}). Add another?`,
|
||||
options: [
|
||||
{ value: 'done', label: 'Done — continue to context build' },
|
||||
{ value: 'done', label: 'Done adding context sources' },
|
||||
{ value: 'edit', label: 'Edit an existing context source' },
|
||||
{ value: 'add', label: 'Add another context source' },
|
||||
],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue