@knime/product-features 2.0.1 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/dist/ai.css +151 -52
  3. package/dist/ai.js +480 -32
  4. package/dist/ai.js.map +1 -1
  5. package/dist/dataTransfer.js +2 -2
  6. package/dist/{dist-BrNh9vG-.js → dist-D6REgugT.js} +104 -15
  7. package/dist/dist-D6REgugT.js.map +1 -0
  8. package/dist/{rfcErrors-Dw7NLSDp.js → rfcErrors-DZsECPcA.js} +2 -2
  9. package/dist/{rfcErrors-Dw7NLSDp.js.map → rfcErrors-DZsECPcA.js.map} +1 -1
  10. package/dist/rfcErrors.js +1 -1
  11. package/dist/src/ai/KdsPromptInput/AttachableSurface.vue.d.ts +29 -0
  12. package/dist/src/ai/KdsPromptInput/AttachableSurface.vue.d.ts.map +1 -0
  13. package/dist/src/ai/KdsPromptInput/InlineStatusBanner.vue.d.ts.map +1 -1
  14. package/dist/src/ai/KdsPromptInput/KdsPromptInput.vue.d.ts +3 -1
  15. package/dist/src/ai/KdsPromptInput/KdsPromptInput.vue.d.ts.map +1 -1
  16. package/dist/src/ai/KdsPromptInput/enums.d.ts +5 -0
  17. package/dist/src/ai/KdsPromptInput/enums.d.ts.map +1 -1
  18. package/dist/src/ai/KdsPromptInput/inquiries/InquiryStack.vue.d.ts +27 -0
  19. package/dist/src/ai/KdsPromptInput/inquiries/InquiryStack.vue.d.ts.map +1 -0
  20. package/dist/src/ai/KdsPromptInput/inquiries/PermissionCard.vue.d.ts +12 -0
  21. package/dist/src/ai/KdsPromptInput/inquiries/PermissionCard.vue.d.ts.map +1 -0
  22. package/dist/src/ai/KdsPromptInput/inquiries/QuestionCard.vue.d.ts +32 -0
  23. package/dist/src/ai/KdsPromptInput/inquiries/QuestionCard.vue.d.ts.map +1 -0
  24. package/dist/src/ai/KdsPromptInput/inquiries/index.d.ts +2 -0
  25. package/dist/src/ai/KdsPromptInput/inquiries/index.d.ts.map +1 -0
  26. package/dist/src/ai/KdsPromptInput/inquiries/usePermissionPhase.d.ts +20 -0
  27. package/dist/src/ai/KdsPromptInput/inquiries/usePermissionPhase.d.ts.map +1 -0
  28. package/dist/src/ai/KdsPromptInput/inquiries/useQuestionPhase.d.ts +26 -0
  29. package/dist/src/ai/KdsPromptInput/inquiries/useQuestionPhase.d.ts.map +1 -0
  30. package/dist/src/ai/KdsPromptInput/types.d.ts +96 -1
  31. package/dist/src/ai/KdsPromptInput/types.d.ts.map +1 -1
  32. package/dist/src/versions/VersionHistory/VersionHistory.vue.d.ts +2 -2
  33. package/dist/toasts.js +1 -1
  34. package/dist/versions.js +1 -1
  35. package/package.json +7 -4
  36. package/dist/dist-BrNh9vG-.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"rfcErrors-Dw7NLSDp.js","names":[],"sources":["../src/rfcErrors/serializeRFCErrorData.ts","../src/rfcErrors/RFCErrorToastTemplate.vue","../src/rfcErrors/RFCErrorToastTemplate.vue","../src/rfcErrors/types.ts","../src/rfcErrors/index.ts"],"sourcesContent":["import type { RFCErrorData } from \"./types\";\n\nexport const serializeErrorForClipboard = (\n error: RFCErrorData,\n headline: string,\n formatDate: (date: Date) => string,\n): string => {\n let details = \"\";\n if (error.details?.length) {\n if (error.details.length > 1) {\n const detailLines = error.details\n .map((item) => `\\u2022 ${item}`)\n .join(\"\\n\");\n details = `\\n${detailLines}`;\n } else {\n details = error.details[0];\n }\n }\n\n let errorText = `${headline}\\n\\n`;\n errorText += `${error.title}\\n\\n`;\n errorText += details ? `Details: ${details}\\n\\n` : \"\";\n\n if (error.status !== undefined) {\n errorText += `Status: ${error.status}\\n`;\n }\n\n if (error.date) {\n errorText += `Date: ${formatDate(error.date)}\\n`;\n }\n\n if (error.requestId) {\n errorText += `Request Id: ${error.requestId}\\n`;\n }\n\n if (error.errorId) {\n errorText += `Error Id: ${error.errorId}\\n`;\n }\n\n if (error.stacktrace) {\n errorText += \"------\\n\"; // separator\n errorText += `Stacktrace:\\n\\n${error.stacktrace}\\n`;\n }\n\n return errorText;\n};\n","<script setup lang=\"ts\">\nimport { ref } from \"vue\";\nimport { useClipboard } from \"@vueuse/core\";\n\nimport { KdsButton } from \"@knime/kds-components\";\nimport { formatDateTimeString } from \"@knime/utils\";\n\nimport { serializeErrorForClipboard as defaultSerializeRFCErrorData } from \"./serializeRFCErrorData\";\nimport type { RFCErrorData } from \"./types\";\n\ntype Props = {\n /**\n * Toast headline shown in the toast title bar. Not rendered inside this\n * template, but included when serializing the error to the clipboard.\n */\n headline: string;\n /** Whether to show the \"Copy error to clipboard\" button. */\n canCopyToClipboard?: boolean;\n /**\n * Custom serializer for the clipboard payload. Defaults to\n * `serializeRFCErrorData` which formats the full error as text.\n */\n serializeErrorForClipboard?: (\n error: RFCErrorData,\n headline: string,\n formatDate: (date: Date) => string,\n ) => string;\n} & RFCErrorData;\n\nconst {\n headline,\n canCopyToClipboard = true,\n serializeErrorForClipboard = defaultSerializeRFCErrorData,\n ...rfcError\n} = defineProps<Props>();\n\nconst emits = defineEmits([\"showMore\"]);\n\nconst { copy, copied } = useClipboard({\n copiedDuring: 3000,\n});\n\nconst hasDetails =\n rfcError.details?.length ||\n rfcError.status !== undefined ||\n rfcError.date !== undefined ||\n rfcError.requestId !== undefined ||\n rfcError.errorId !== undefined;\n// don't show 'Show details' button if there are no details to show\nconst showDetails = ref(!hasDetails);\n\nconst formatDate = (date: Date): string =>\n date ? formatDateTimeString(date.getTime()) : \"\";\n\nconst copyToClipboard = () => {\n if (copied.value) {\n return;\n }\n copy(serializeErrorForClipboard(rfcError, headline, formatDate)).catch(\n (error) => {\n consola.error(\"Failed to copy to clipboard\", { error });\n },\n );\n};\n\nconst onShowDetailsClicked = () => {\n showDetails.value = true;\n emits(\"showMore\");\n};\n</script>\n\n<template>\n <div class=\"wrapper\">\n <div class=\"title\">\n {{ title }}\n </div>\n <div v-if=\"showDetails\">\n <div v-if=\"details?.length\">\n <strong>Details: </strong>\n <template v-if=\"details.length === 1\">\n {{ details[0] }}\n </template>\n <template v-else>\n <ul class=\"details-list\">\n <li v-for=\"(item, index) in details\" :key=\"index\">{{ item }}</li>\n </ul>\n </template>\n </div>\n\n <div v-if=\"status !== undefined\">\n <strong>Status: </strong>{{ status }}\n </div>\n <div v-if=\"date\"><strong>Date: </strong>{{ formatDate(date) }}</div>\n <div v-if=\"requestId\"><strong>Request id: </strong>{{ requestId }}</div>\n <div v-if=\"errorId\"><strong>Error id: </strong>{{ errorId }}</div>\n <div v-if=\"stacktrace && canCopyToClipboard\">\n <strong>Stacktrace: </strong>Part of clipboard text\n </div>\n </div>\n <div class=\"actions-wrapper\">\n <KdsButton\n v-if=\"!showDetails\"\n data-testid=\"show-details\"\n variant=\"transparent\"\n label=\"Show details\"\n size=\"xsmall\"\n @click=\"onShowDetailsClicked\"\n />\n <KdsButton\n v-if=\"canCopyToClipboard\"\n data-testid=\"copy-to-clipboard\"\n :label=\"copied ? 'Error was copied' : 'Copy error to clipboard'\"\n :leading-icon=\"copied ? 'checkmark' : 'copy'\"\n variant=\"transparent\"\n size=\"xsmall\"\n @click=\"copyToClipboard\"\n />\n </div>\n </div>\n</template>\n\n<style scoped>\n.wrapper {\n display: flex;\n flex-direction: column;\n gap: var(--kds-spacing-container-0-25x);\n font: var(--kds-font-base-body-small);\n color: var(--kds-color-text-and-icon-neutral);\n}\n\n.details-list {\n padding-left: var(--kds-spacing-container-1-5x);\n margin-top: var(--kds-spacing-container-0-37x);\n margin-bottom: var(--kds-spacing-container-0-37x);\n}\n\n.actions-wrapper {\n display: flex;\n gap: var(--kds-spacing-container-0-5x);\n align-items: center;\n}\n</style>\n","<script setup lang=\"ts\">\nimport { ref } from \"vue\";\nimport { useClipboard } from \"@vueuse/core\";\n\nimport { KdsButton } from \"@knime/kds-components\";\nimport { formatDateTimeString } from \"@knime/utils\";\n\nimport { serializeErrorForClipboard as defaultSerializeRFCErrorData } from \"./serializeRFCErrorData\";\nimport type { RFCErrorData } from \"./types\";\n\ntype Props = {\n /**\n * Toast headline shown in the toast title bar. Not rendered inside this\n * template, but included when serializing the error to the clipboard.\n */\n headline: string;\n /** Whether to show the \"Copy error to clipboard\" button. */\n canCopyToClipboard?: boolean;\n /**\n * Custom serializer for the clipboard payload. Defaults to\n * `serializeRFCErrorData` which formats the full error as text.\n */\n serializeErrorForClipboard?: (\n error: RFCErrorData,\n headline: string,\n formatDate: (date: Date) => string,\n ) => string;\n} & RFCErrorData;\n\nconst {\n headline,\n canCopyToClipboard = true,\n serializeErrorForClipboard = defaultSerializeRFCErrorData,\n ...rfcError\n} = defineProps<Props>();\n\nconst emits = defineEmits([\"showMore\"]);\n\nconst { copy, copied } = useClipboard({\n copiedDuring: 3000,\n});\n\nconst hasDetails =\n rfcError.details?.length ||\n rfcError.status !== undefined ||\n rfcError.date !== undefined ||\n rfcError.requestId !== undefined ||\n rfcError.errorId !== undefined;\n// don't show 'Show details' button if there are no details to show\nconst showDetails = ref(!hasDetails);\n\nconst formatDate = (date: Date): string =>\n date ? formatDateTimeString(date.getTime()) : \"\";\n\nconst copyToClipboard = () => {\n if (copied.value) {\n return;\n }\n copy(serializeErrorForClipboard(rfcError, headline, formatDate)).catch(\n (error) => {\n consola.error(\"Failed to copy to clipboard\", { error });\n },\n );\n};\n\nconst onShowDetailsClicked = () => {\n showDetails.value = true;\n emits(\"showMore\");\n};\n</script>\n\n<template>\n <div class=\"wrapper\">\n <div class=\"title\">\n {{ title }}\n </div>\n <div v-if=\"showDetails\">\n <div v-if=\"details?.length\">\n <strong>Details: </strong>\n <template v-if=\"details.length === 1\">\n {{ details[0] }}\n </template>\n <template v-else>\n <ul class=\"details-list\">\n <li v-for=\"(item, index) in details\" :key=\"index\">{{ item }}</li>\n </ul>\n </template>\n </div>\n\n <div v-if=\"status !== undefined\">\n <strong>Status: </strong>{{ status }}\n </div>\n <div v-if=\"date\"><strong>Date: </strong>{{ formatDate(date) }}</div>\n <div v-if=\"requestId\"><strong>Request id: </strong>{{ requestId }}</div>\n <div v-if=\"errorId\"><strong>Error id: </strong>{{ errorId }}</div>\n <div v-if=\"stacktrace && canCopyToClipboard\">\n <strong>Stacktrace: </strong>Part of clipboard text\n </div>\n </div>\n <div class=\"actions-wrapper\">\n <KdsButton\n v-if=\"!showDetails\"\n data-testid=\"show-details\"\n variant=\"transparent\"\n label=\"Show details\"\n size=\"xsmall\"\n @click=\"onShowDetailsClicked\"\n />\n <KdsButton\n v-if=\"canCopyToClipboard\"\n data-testid=\"copy-to-clipboard\"\n :label=\"copied ? 'Error was copied' : 'Copy error to clipboard'\"\n :leading-icon=\"copied ? 'checkmark' : 'copy'\"\n variant=\"transparent\"\n size=\"xsmall\"\n @click=\"copyToClipboard\"\n />\n </div>\n </div>\n</template>\n\n<style scoped>\n.wrapper {\n display: flex;\n flex-direction: column;\n gap: var(--kds-spacing-container-0-25x);\n font: var(--kds-font-base-body-small);\n color: var(--kds-color-text-and-icon-neutral);\n}\n\n.details-list {\n padding-left: var(--kds-spacing-container-1-5x);\n margin-top: var(--kds-spacing-container-0-37x);\n margin-bottom: var(--kds-spacing-container-0-37x);\n}\n\n.actions-wrapper {\n display: flex;\n gap: var(--kds-spacing-container-0-5x);\n align-items: center;\n}\n</style>\n","/**\n * Type based on an RFC-9457 error standard (https://www.rfc-editor.org/rfc/rfc9457)\n * Also see:\n * https://knime-com.atlassian.net/wiki/spaces/SPECS/pages/4126769212/API+Errors+Problem+Details\n */\nexport type RFCErrorData = {\n /** Short human-readable summary of the error. */\n title: string;\n /** HTTP status code associated with the error. */\n status?: number;\n /** Date/time when the error occurred. */\n date?: Date;\n /** Additional human-readable detail messages. */\n details?: string[];\n /** Correlation id for the request that triggered the error. */\n requestId?: string;\n /**\n * Id used to find an error in the Hub logs. Specially relevant\n * when details of the error are not wanted to be exposed to the user.\n */\n errorId?: string;\n /**\n * Relevant only for the Analytics Platform, since the Hub does not expose\n * stack traces.\n */\n stacktrace?: string;\n};\n\nexport class RFCError extends Error {\n data: RFCErrorData;\n\n constructor(data: RFCErrorData) {\n super(data.title);\n this.data = data;\n }\n}\n\nexport type FetchError = {\n response: {\n headers: Headers;\n };\n statusCode: number;\n data: {\n title: string;\n details: string[];\n };\n};\n","import { h } from \"vue\";\n\nimport type { Toast } from \"../toasts\";\n\nimport RFCErrorToastTemplate from \"./RFCErrorToastTemplate.vue\";\nimport { type FetchError, RFCError, type RFCErrorData } from \"./types\";\n\n/**\n * Map to a toast template component compatible with an RFCError format\n */\nconst toToast = ({\n headline,\n rfcError,\n canCopyToClipboard = true,\n serializeErrorForClipboard = undefined,\n}: {\n headline: string;\n rfcError: RFCError;\n canCopyToClipboard?: boolean;\n serializeErrorForClipboard?: (\n error: RFCErrorData,\n headline: string,\n formatDate: (date: Date) => string,\n ) => string;\n}): Toast => {\n const { data } = rfcError;\n\n const rfcErrorToastContent = h(RFCErrorToastTemplate, {\n headline,\n ...data,\n canCopyToClipboard,\n serializeErrorForClipboard,\n });\n\n return {\n type: \"error\",\n headline,\n component: rfcErrorToastContent,\n autoRemove: false,\n };\n};\n\nconst isFetchError = (error: unknown): error is FetchError => {\n return (\n error !== null &&\n typeof error === \"object\" &&\n \"response\" in error &&\n \"statusCode\" in error &&\n \"data\" in error\n );\n};\n\n/**\n * Parse a generic request error to an `RFCError`.\n * When parsing is not possible it returns undefined.\n */\nconst tryParse = (error: unknown): RFCError | undefined => {\n if (!isFetchError(error)) {\n return undefined;\n }\n\n if (!error.response) {\n return undefined;\n }\n\n const responseDate = error.response.headers.get(\"date\")\n ? new Date(error.response.headers.get(\"date\")!)\n : undefined;\n\n const title =\n typeof error.data === \"string\" ? error.data : (error.data?.title ?? \"\");\n\n const rfcErrorData: RFCErrorData = {\n title: title as string,\n details: error.data?.details as string[] | undefined,\n status: error.statusCode as number,\n date: responseDate,\n requestId: error.response.headers.get(\"x-request-id\") ?? undefined,\n errorId: error.response.headers.get(\"x-error-id\") ?? undefined,\n };\n\n return new RFCError(rfcErrorData);\n};\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,SAChB,UAAU;AAEd;;;;;AAMA,IAAM,YAAY,UAAyC;CACzD,IAAI,CAAC,aAAa,KAAK,GACrB;CAGF,IAAI,CAAC,MAAM,UACT;CAGF,MAAM,eAAe,MAAM,SAAS,QAAQ,IAAI,MAAM,IAClD,IAAI,KAAK,MAAM,SAAS,QAAQ,IAAI,MAAM,CAAE,IAC5C,KAAA;CAcJ,OAAO,IAAI,SAAS;EARX,OAHP,OAAO,MAAM,SAAS,WAAW,MAAM,OAAQ,MAAM,MAAM,SAAS;EAIpE,SAAS,MAAM,MAAM;EACrB,QAAQ,MAAM;EACd,MAAM;EACN,WAAW,MAAM,SAAS,QAAQ,IAAI,cAAc,KAAK,KAAA;EACzD,SAAS,MAAM,SAAS,QAAQ,IAAI,YAAY,KAAK,KAAA;CAGnC,CAAY;AAClC;AAEA,IAAa,YAAY;CACvB;CACA;CACA;AACF"}
1
+ {"version":3,"file":"rfcErrors-DZsECPcA.js","names":[],"sources":["../src/rfcErrors/serializeRFCErrorData.ts","../src/rfcErrors/RFCErrorToastTemplate.vue","../src/rfcErrors/RFCErrorToastTemplate.vue","../src/rfcErrors/types.ts","../src/rfcErrors/index.ts"],"sourcesContent":["import type { RFCErrorData } from \"./types\";\n\nexport const serializeErrorForClipboard = (\n error: RFCErrorData,\n headline: string,\n formatDate: (date: Date) => string,\n): string => {\n let details = \"\";\n if (error.details?.length) {\n if (error.details.length > 1) {\n const detailLines = error.details\n .map((item) => `\\u2022 ${item}`)\n .join(\"\\n\");\n details = `\\n${detailLines}`;\n } else {\n details = error.details[0];\n }\n }\n\n let errorText = `${headline}\\n\\n`;\n errorText += `${error.title}\\n\\n`;\n errorText += details ? `Details: ${details}\\n\\n` : \"\";\n\n if (error.status !== undefined) {\n errorText += `Status: ${error.status}\\n`;\n }\n\n if (error.date) {\n errorText += `Date: ${formatDate(error.date)}\\n`;\n }\n\n if (error.requestId) {\n errorText += `Request Id: ${error.requestId}\\n`;\n }\n\n if (error.errorId) {\n errorText += `Error Id: ${error.errorId}\\n`;\n }\n\n if (error.stacktrace) {\n errorText += \"------\\n\"; // separator\n errorText += `Stacktrace:\\n\\n${error.stacktrace}\\n`;\n }\n\n return errorText;\n};\n","<script setup lang=\"ts\">\nimport { ref } from \"vue\";\nimport { useClipboard } from \"@vueuse/core\";\n\nimport { KdsButton } from \"@knime/kds-components\";\nimport { formatDateTimeString } from \"@knime/utils\";\n\nimport { serializeErrorForClipboard as defaultSerializeRFCErrorData } from \"./serializeRFCErrorData\";\nimport type { RFCErrorData } from \"./types\";\n\ntype Props = {\n /**\n * Toast headline shown in the toast title bar. Not rendered inside this\n * template, but included when serializing the error to the clipboard.\n */\n headline: string;\n /** Whether to show the \"Copy error to clipboard\" button. */\n canCopyToClipboard?: boolean;\n /**\n * Custom serializer for the clipboard payload. Defaults to\n * `serializeRFCErrorData` which formats the full error as text.\n */\n serializeErrorForClipboard?: (\n error: RFCErrorData,\n headline: string,\n formatDate: (date: Date) => string,\n ) => string;\n} & RFCErrorData;\n\nconst {\n headline,\n canCopyToClipboard = true,\n serializeErrorForClipboard = defaultSerializeRFCErrorData,\n ...rfcError\n} = defineProps<Props>();\n\nconst emits = defineEmits([\"showMore\"]);\n\nconst { copy, copied } = useClipboard({\n copiedDuring: 3000,\n});\n\nconst hasDetails =\n rfcError.details?.length ||\n rfcError.status !== undefined ||\n rfcError.date !== undefined ||\n rfcError.requestId !== undefined ||\n rfcError.errorId !== undefined;\n// don't show 'Show details' button if there are no details to show\nconst showDetails = ref(!hasDetails);\n\nconst formatDate = (date: Date): string =>\n date ? formatDateTimeString(date.getTime()) : \"\";\n\nconst copyToClipboard = () => {\n if (copied.value) {\n return;\n }\n copy(serializeErrorForClipboard(rfcError, headline, formatDate)).catch(\n (error) => {\n consola.error(\"Failed to copy to clipboard\", { error });\n },\n );\n};\n\nconst onShowDetailsClicked = () => {\n showDetails.value = true;\n emits(\"showMore\");\n};\n</script>\n\n<template>\n <div class=\"wrapper\">\n <div class=\"title\">\n {{ title }}\n </div>\n <div v-if=\"showDetails\">\n <div v-if=\"details?.length\">\n <strong>Details: </strong>\n <template v-if=\"details.length === 1\">\n {{ details[0] }}\n </template>\n <template v-else>\n <ul class=\"details-list\">\n <li v-for=\"(item, index) in details\" :key=\"index\">{{ item }}</li>\n </ul>\n </template>\n </div>\n\n <div v-if=\"status !== undefined\">\n <strong>Status: </strong>{{ status }}\n </div>\n <div v-if=\"date\"><strong>Date: </strong>{{ formatDate(date) }}</div>\n <div v-if=\"requestId\"><strong>Request id: </strong>{{ requestId }}</div>\n <div v-if=\"errorId\"><strong>Error id: </strong>{{ errorId }}</div>\n <div v-if=\"stacktrace && canCopyToClipboard\">\n <strong>Stacktrace: </strong>Part of clipboard text\n </div>\n </div>\n <div class=\"actions-wrapper\">\n <KdsButton\n v-if=\"!showDetails\"\n data-testid=\"show-details\"\n variant=\"transparent\"\n label=\"Show details\"\n size=\"xsmall\"\n @click=\"onShowDetailsClicked\"\n />\n <KdsButton\n v-if=\"canCopyToClipboard\"\n data-testid=\"copy-to-clipboard\"\n :label=\"copied ? 'Error was copied' : 'Copy error to clipboard'\"\n :leading-icon=\"copied ? 'checkmark' : 'copy'\"\n variant=\"transparent\"\n size=\"xsmall\"\n @click=\"copyToClipboard\"\n />\n </div>\n </div>\n</template>\n\n<style scoped>\n.wrapper {\n display: flex;\n flex-direction: column;\n gap: var(--kds-spacing-container-0-25x);\n font: var(--kds-font-base-body-small);\n color: var(--kds-color-text-and-icon-neutral);\n}\n\n.details-list {\n padding-left: var(--kds-spacing-container-1-5x);\n margin-top: var(--kds-spacing-container-0-37x);\n margin-bottom: var(--kds-spacing-container-0-37x);\n}\n\n.actions-wrapper {\n display: flex;\n gap: var(--kds-spacing-container-0-5x);\n align-items: center;\n}\n</style>\n","<script setup lang=\"ts\">\nimport { ref } from \"vue\";\nimport { useClipboard } from \"@vueuse/core\";\n\nimport { KdsButton } from \"@knime/kds-components\";\nimport { formatDateTimeString } from \"@knime/utils\";\n\nimport { serializeErrorForClipboard as defaultSerializeRFCErrorData } from \"./serializeRFCErrorData\";\nimport type { RFCErrorData } from \"./types\";\n\ntype Props = {\n /**\n * Toast headline shown in the toast title bar. Not rendered inside this\n * template, but included when serializing the error to the clipboard.\n */\n headline: string;\n /** Whether to show the \"Copy error to clipboard\" button. */\n canCopyToClipboard?: boolean;\n /**\n * Custom serializer for the clipboard payload. Defaults to\n * `serializeRFCErrorData` which formats the full error as text.\n */\n serializeErrorForClipboard?: (\n error: RFCErrorData,\n headline: string,\n formatDate: (date: Date) => string,\n ) => string;\n} & RFCErrorData;\n\nconst {\n headline,\n canCopyToClipboard = true,\n serializeErrorForClipboard = defaultSerializeRFCErrorData,\n ...rfcError\n} = defineProps<Props>();\n\nconst emits = defineEmits([\"showMore\"]);\n\nconst { copy, copied } = useClipboard({\n copiedDuring: 3000,\n});\n\nconst hasDetails =\n rfcError.details?.length ||\n rfcError.status !== undefined ||\n rfcError.date !== undefined ||\n rfcError.requestId !== undefined ||\n rfcError.errorId !== undefined;\n// don't show 'Show details' button if there are no details to show\nconst showDetails = ref(!hasDetails);\n\nconst formatDate = (date: Date): string =>\n date ? formatDateTimeString(date.getTime()) : \"\";\n\nconst copyToClipboard = () => {\n if (copied.value) {\n return;\n }\n copy(serializeErrorForClipboard(rfcError, headline, formatDate)).catch(\n (error) => {\n consola.error(\"Failed to copy to clipboard\", { error });\n },\n );\n};\n\nconst onShowDetailsClicked = () => {\n showDetails.value = true;\n emits(\"showMore\");\n};\n</script>\n\n<template>\n <div class=\"wrapper\">\n <div class=\"title\">\n {{ title }}\n </div>\n <div v-if=\"showDetails\">\n <div v-if=\"details?.length\">\n <strong>Details: </strong>\n <template v-if=\"details.length === 1\">\n {{ details[0] }}\n </template>\n <template v-else>\n <ul class=\"details-list\">\n <li v-for=\"(item, index) in details\" :key=\"index\">{{ item }}</li>\n </ul>\n </template>\n </div>\n\n <div v-if=\"status !== undefined\">\n <strong>Status: </strong>{{ status }}\n </div>\n <div v-if=\"date\"><strong>Date: </strong>{{ formatDate(date) }}</div>\n <div v-if=\"requestId\"><strong>Request id: </strong>{{ requestId }}</div>\n <div v-if=\"errorId\"><strong>Error id: </strong>{{ errorId }}</div>\n <div v-if=\"stacktrace && canCopyToClipboard\">\n <strong>Stacktrace: </strong>Part of clipboard text\n </div>\n </div>\n <div class=\"actions-wrapper\">\n <KdsButton\n v-if=\"!showDetails\"\n data-testid=\"show-details\"\n variant=\"transparent\"\n label=\"Show details\"\n size=\"xsmall\"\n @click=\"onShowDetailsClicked\"\n />\n <KdsButton\n v-if=\"canCopyToClipboard\"\n data-testid=\"copy-to-clipboard\"\n :label=\"copied ? 'Error was copied' : 'Copy error to clipboard'\"\n :leading-icon=\"copied ? 'checkmark' : 'copy'\"\n variant=\"transparent\"\n size=\"xsmall\"\n @click=\"copyToClipboard\"\n />\n </div>\n </div>\n</template>\n\n<style scoped>\n.wrapper {\n display: flex;\n flex-direction: column;\n gap: var(--kds-spacing-container-0-25x);\n font: var(--kds-font-base-body-small);\n color: var(--kds-color-text-and-icon-neutral);\n}\n\n.details-list {\n padding-left: var(--kds-spacing-container-1-5x);\n margin-top: var(--kds-spacing-container-0-37x);\n margin-bottom: var(--kds-spacing-container-0-37x);\n}\n\n.actions-wrapper {\n display: flex;\n gap: var(--kds-spacing-container-0-5x);\n align-items: center;\n}\n</style>\n","/**\n * Type based on an RFC-9457 error standard (https://www.rfc-editor.org/rfc/rfc9457)\n * Also see:\n * https://knime-com.atlassian.net/wiki/spaces/SPECS/pages/4126769212/API+Errors+Problem+Details\n */\nexport type RFCErrorData = {\n /** Short human-readable summary of the error. */\n title: string;\n /** HTTP status code associated with the error. */\n status?: number;\n /** Date/time when the error occurred. */\n date?: Date;\n /** Additional human-readable detail messages. */\n details?: string[];\n /** Correlation id for the request that triggered the error. */\n requestId?: string;\n /**\n * Id used to find an error in the Hub logs. Specially relevant\n * when details of the error are not wanted to be exposed to the user.\n */\n errorId?: string;\n /**\n * Relevant only for the Analytics Platform, since the Hub does not expose\n * stack traces.\n */\n stacktrace?: string;\n};\n\nexport class RFCError extends Error {\n data: RFCErrorData;\n\n constructor(data: RFCErrorData) {\n super(data.title);\n this.data = data;\n }\n}\n\nexport type FetchError = {\n response: {\n headers: Headers;\n };\n statusCode: number;\n data: {\n title: string;\n details: string[];\n };\n};\n","import { h } from \"vue\";\n\nimport type { Toast } from \"../toasts\";\n\nimport RFCErrorToastTemplate from \"./RFCErrorToastTemplate.vue\";\nimport { type FetchError, RFCError, type RFCErrorData } from \"./types\";\n\n/**\n * Map to a toast template component compatible with an RFCError format\n */\nconst toToast = ({\n headline,\n rfcError,\n canCopyToClipboard = true,\n serializeErrorForClipboard = undefined,\n}: {\n headline: string;\n rfcError: RFCError;\n canCopyToClipboard?: boolean;\n serializeErrorForClipboard?: (\n error: RFCErrorData,\n headline: string,\n formatDate: (date: Date) => string,\n ) => string;\n}): Toast => {\n const { data } = rfcError;\n\n const rfcErrorToastContent = h(RFCErrorToastTemplate, {\n headline,\n ...data,\n canCopyToClipboard,\n serializeErrorForClipboard,\n });\n\n return {\n type: \"error\",\n headline,\n component: rfcErrorToastContent,\n autoRemove: false,\n };\n};\n\nconst isFetchError = (error: unknown): error is FetchError => {\n return (\n error !== null &&\n typeof error === \"object\" &&\n \"response\" in error &&\n \"statusCode\" in error &&\n \"data\" in error\n );\n};\n\n/**\n * Parse a generic request error to an `RFCError`.\n * When parsing is not possible it returns undefined.\n */\nconst tryParse = (error: unknown): RFCError | undefined => {\n if (!isFetchError(error)) {\n return undefined;\n }\n\n if (!error.response) {\n return undefined;\n }\n\n const responseDate = error.response.headers.get(\"date\")\n ? new Date(error.response.headers.get(\"date\")!)\n : undefined;\n\n const title =\n typeof error.data === \"string\" ? error.data : (error.data?.title ?? \"\");\n\n const rfcErrorData: RFCErrorData = {\n title: title as string,\n details: error.data?.details as string[] | undefined,\n status: error.statusCode as number,\n date: responseDate,\n requestId: error.response.headers.get(\"x-request-id\") ?? undefined,\n errorId: error.response.headers.get(\"x-error-id\") ?? undef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AO,UAAU,YACjB,cAAc,SACd,gBAAgB,SAChB,UAAU;AAEd;;;;;AAMA,IAAM,YAAY,UAAyC;CACzD,IAAI,CAAC,aAAa,KAAK,GACrB;CAGF,IAAI,CAAC,MAAM,UACT;CAGF,MAAM,eAAe,MAAM,SAAS,QAAQ,IAAI,MAAM,IAClD,IAAI,KAAK,MAAM,SAAS,QAAQ,IAAI,MAAM,CAAE,IAC5C,KAAA;CAcJ,OAAO,IAAI,SAAS;EARX,OAHP,OAAO,MAAM,SAAS,WAAW,MAAM,OAAQ,MAAM,MAAM,SAAS;EAIpE,SAAS,MAAM,MAAM;EACrB,QAAQ,MAAM;EACd,MAAM;EACN,WAAW,MAAM,SAAS,QAAQ,IAAI,cAAc,KAAK,KAAA;EACzD,SAAS,MAAM,SAAS,QAAQ,IAAI,YAAY,KAAK,KAAA;CAGnC,CAAY;AAClC;AAEA,IAAa,YAAY;CACvB;CACA;CACA;AACF"}
package/dist/rfcErrors.js CHANGED
@@ -1,2 +1,2 @@
1
- import { t as rfcErrors } from "./rfcErrors-Dw7NLSDp.js";
1
+ import { t as rfcErrors } from "./rfcErrors-DZsECPcA.js";
2
2
  export { rfcErrors };
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Wrapper for a surface that attaches directly above the prompt input
3
+ * (or above another attachable surface).
4
+ *
5
+ * Used by the status banner and inquiry cards.
6
+ */
7
+ type __VLS_Props = {
8
+ /**
9
+ * Palette of the surface:
10
+ * - `neutral` — default surface with a neutral border (inquiry cards).
11
+ * - `danger` — danger-muted background (error status).
12
+ * - `info` — info-muted background (note status).
13
+ */
14
+ tone?: "neutral" | "danger" | "info";
15
+ };
16
+ declare var __VLS_1: {};
17
+ type __VLS_Slots = {} & {
18
+ default?: (props: typeof __VLS_1) => any;
19
+ };
20
+ declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
21
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
22
+ declare const _default: typeof __VLS_export;
23
+ export default _default;
24
+ type __VLS_WithSlots<T, S> = T & {
25
+ new (): {
26
+ $slots: S;
27
+ };
28
+ };
29
+ //# sourceMappingURL=AttachableSurface.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AttachableSurface.vue.d.ts","sourceRoot":"","sources":["../../../../src/ai/KdsPromptInput/AttachableSurface.vue"],"names":[],"mappings":"AAoDA;;;;;GAKG;AACH,KAAK,WAAW,GAAG;IACjB;;;;;OAKG;IACH,IAAI,CAAC,EAAE,SAAS,GAAG,QAAQ,GAAG,MAAM,CAAC;CACtC,CAAC;AA6BF,QAAA,IAAI,OAAO,IAAW,CAAE;AACxB,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AAG/C,QAAA,MAAM,UAAU,kSAEd,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AACzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"InlineStatusBanner.vue.d.ts","sourceRoot":"","sources":["../../../../src/ai/KdsPromptInput/InlineStatusBanner.vue"],"names":[],"mappings":"AAoHA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAEpD,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,oBAAoB,CAAC;CAC9B,CAAC;AAsGF,QAAA,MAAM,YAAY;;;;kFAGhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
1
+ {"version":3,"file":"InlineStatusBanner.vue.d.ts","sourceRoot":"","sources":["../../../../src/ai/KdsPromptInput/InlineStatusBanner.vue"],"names":[],"mappings":"AAoGA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAEpD,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,oBAAoB,CAAC;CAC9B,CAAC;AAmHF,QAAA,MAAM,YAAY;;;;kFAGhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
@@ -1,4 +1,4 @@
1
- import { KdsPromptInputProps } from './types';
1
+ import { KdsPromptInputInquiryResponse, KdsPromptInputProps } from './types';
2
2
  type __VLS_Props = KdsPromptInputProps;
3
3
  type __VLS_ModelProps = {
4
4
  modelValue?: string;
@@ -9,11 +9,13 @@ declare const __VLS_export: import('vue').DefineComponent<__VLS_PublicProps, {
9
9
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
10
10
  stop: () => any;
11
11
  submit: (value: string) => any;
12
+ respond: (response: KdsPromptInputInquiryResponse) => any;
12
13
  statusButtonClick: () => any;
13
14
  "update:modelValue": (value: string) => any;
14
15
  }, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
15
16
  onStop?: (() => any) | undefined;
16
17
  onSubmit?: ((value: string) => any) | undefined;
18
+ onRespond?: ((response: KdsPromptInputInquiryResponse) => any) | undefined;
17
19
  onStatusButtonClick?: (() => any) | undefined;
18
20
  "onUpdate:modelValue"?: ((value: string) => any) | undefined;
19
21
  }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
@@ -1 +1 @@
1
- {"version":3,"file":"KdsPromptInput.vue.d.ts","sourceRoot":"","sources":["../../../../src/ai/KdsPromptInput/KdsPromptInput.vue"],"names":[],"mappings":"AA6RA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAEnD,KAAK,WAAW,GAAG,mBAAmB,CAAC;AAgFvC,KAAK,gBAAgB,GAAG;IACxB,UAAU,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAKF,KAAK,iBAAiB,GAAG,WAAW,GAAG,gBAAgB,CAAC;AAwNxD,QAAA,MAAM,YAAY;;;;;;;;;;;;kFAIhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
1
+ {"version":3,"file":"KdsPromptInput.vue.d.ts","sourceRoot":"","sources":["../../../../src/ai/KdsPromptInput/KdsPromptInput.vue"],"names":[],"mappings":"AAqTA,OAAO,KAAK,EACV,6BAA6B,EAC7B,mBAAmB,EACpB,MAAM,SAAS,CAAC;AAEjB,KAAK,WAAW,GAAG,mBAAmB,CAAC;AA4FvC,KAAK,gBAAgB,GAAG;IACxB,UAAU,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAKF,KAAK,iBAAiB,GAAG,WAAW,GAAG,gBAAgB,CAAC;AAuPxD,QAAA,MAAM,YAAY;;;;;;;;;;;;;;kFAIhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
@@ -3,4 +3,9 @@ export declare const kdsPromptInputStatusType: {
3
3
  readonly NOTE: "note";
4
4
  };
5
5
  export declare const kdsPromptInputStatusTypes: ("error" | "note")[];
6
+ export declare const kdsPromptInputPermissionDecision: {
7
+ readonly ALLOW: "allow";
8
+ readonly DENY: "deny";
9
+ };
10
+ export declare const kdsPromptInputPermissionDecisions: ("allow" | "deny")[];
6
11
  //# sourceMappingURL=enums.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"enums.d.ts","sourceRoot":"","sources":["../../../../src/ai/KdsPromptInput/enums.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,wBAAwB;;;CAG3B,CAAC;AAEX,eAAO,MAAM,yBAAyB,sBAErC,CAAC"}
1
+ {"version":3,"file":"enums.d.ts","sourceRoot":"","sources":["../../../../src/ai/KdsPromptInput/enums.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,wBAAwB;;;CAG3B,CAAC;AAEX,eAAO,MAAM,yBAAyB,sBAErC,CAAC;AAEF,eAAO,MAAM,gCAAgC;;;CAGnC,CAAC;AAEX,eAAO,MAAM,iCAAiC,sBAE7C,CAAC"}
@@ -0,0 +1,27 @@
1
+ import { KdsPromptInputInquiryResponse, KdsPromptInputPermission, KdsPromptInputQuestion } from '../types';
2
+ /**
3
+ * The pending permissions and questions, attached as a surface above the
4
+ * input. The two are resolved in distinct, sequential phases, see
5
+ * the corresponding composables:
6
+ *
7
+ * - {@link usePermissionPhase} is first. Deciding one permission pops it off and reveals the next.
8
+ * - {@link useQuestionPhase} follows once every permission is addressed: a stack
9
+ * the user moves through with "Next" / "Skip" and "Back".
10
+ *
11
+ * This component only sequences the two phases and, once both are complete,
12
+ * emits a single `respond` carrying every decision (all-or-nothing per turn).
13
+ * For the common single-inquiry case this degenerates to one card that responds
14
+ * immediately.
15
+ */
16
+ type __VLS_Props = {
17
+ permissions: KdsPromptInputPermission[];
18
+ questions: KdsPromptInputQuestion[];
19
+ };
20
+ declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
21
+ respond: (response: KdsPromptInputInquiryResponse) => any;
22
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
23
+ onRespond?: ((response: KdsPromptInputInquiryResponse) => any) | undefined;
24
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
25
+ declare const _default: typeof __VLS_export;
26
+ export default _default;
27
+ //# sourceMappingURL=InquiryStack.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InquiryStack.vue.d.ts","sourceRoot":"","sources":["../../../../../src/ai/KdsPromptInput/inquiries/InquiryStack.vue"],"names":[],"mappings":"AAqKA,OAAO,KAAK,EACV,6BAA6B,EAC7B,wBAAwB,EAExB,sBAAsB,EAEvB,MAAM,UAAU,CAAC;AAOlB;;;;;;;;;;;;;GAaG;AACH,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,wBAAwB,EAAE,CAAC;IACxC,SAAS,EAAE,sBAAsB,EAAE,CAAC;CACrC,CAAC;AAiOF,QAAA,MAAM,YAAY;;;;kFAGhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
@@ -0,0 +1,12 @@
1
+ import { KdsPromptInputPermission, KdsPromptInputPermissionDecision } from '../types';
2
+ type __VLS_Props = {
3
+ permission: KdsPromptInputPermission;
4
+ };
5
+ declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
6
+ decide: (decision: Omit<KdsPromptInputPermissionDecision, "id">) => any;
7
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
8
+ onDecide?: ((decision: Omit<KdsPromptInputPermissionDecision, "id">) => any) | undefined;
9
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
10
+ declare const _default: typeof __VLS_export;
11
+ export default _default;
12
+ //# sourceMappingURL=PermissionCard.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PermissionCard.vue.d.ts","sourceRoot":"","sources":["../../../../../src/ai/KdsPromptInput/inquiries/PermissionCard.vue"],"names":[],"mappings":"AA0HA,OAAO,KAAK,EACV,wBAAwB,EACxB,gCAAgC,EACjC,MAAM,UAAU,CAAC;AAElB,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,wBAAwB,CAAC;CACtC,CAAC;AA6KF,QAAA,MAAM,YAAY;;;;kFAGhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
@@ -0,0 +1,32 @@
1
+ import { KdsPromptInputQuestion, KdsPromptInputQuestionAnswer } from '../types';
2
+ /**
3
+ * A single pending question, shown one at a time and paginated by the parent
4
+ * stack.
5
+ */
6
+ type __VLS_Props = {
7
+ question: KdsPromptInputQuestion;
8
+ /** Zero-based position of this question within the stack. */
9
+ pageIndex: number;
10
+ /** Total number of questions in the stack. */
11
+ pageCount: number;
12
+ /**
13
+ * True when every *other* question in the stack has already been resolved
14
+ * (answered or skipped). Combined with this card's own selection it decides
15
+ * whether "Submit" is enabled on the last page.
16
+ */
17
+ othersAnswered: boolean;
18
+ };
19
+ declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
20
+ back: () => any;
21
+ skip: () => any;
22
+ next: (answer: Omit<KdsPromptInputQuestionAnswer, "id">) => any;
23
+ submit: (answer: Omit<KdsPromptInputQuestionAnswer, "id">) => any;
24
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
25
+ onBack?: (() => any) | undefined;
26
+ onSkip?: (() => any) | undefined;
27
+ onNext?: ((answer: Omit<KdsPromptInputQuestionAnswer, "id">) => any) | undefined;
28
+ onSubmit?: ((answer: Omit<KdsPromptInputQuestionAnswer, "id">) => any) | undefined;
29
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
30
+ declare const _default: typeof __VLS_export;
31
+ export default _default;
32
+ //# sourceMappingURL=QuestionCard.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"QuestionCard.vue.d.ts","sourceRoot":"","sources":["../../../../../src/ai/KdsPromptInput/inquiries/QuestionCard.vue"],"names":[],"mappings":"AA4SA,OAAO,KAAK,EACV,sBAAsB,EACtB,4BAA4B,EAC7B,MAAM,UAAU,CAAC;AAElB;;;GAGG;AACH,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,sBAAsB,CAAC;IACjC,6DAA6D;IAC7D,SAAS,EAAE,MAAM,CAAC;IAClB,8CAA8C;IAC9C,SAAS,EAAE,MAAM,CAAC;IAClB;;;;OAIG;IACH,cAAc,EAAE,OAAO,CAAC;CACzB,CAAC;AA0WF,QAAA,MAAM,YAAY;;;;;;;;;;kFAGhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
@@ -0,0 +1,2 @@
1
+ export { default as InquiryStack } from './InquiryStack.vue';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/ai/KdsPromptInput/inquiries/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,oBAAoB,CAAC"}
@@ -0,0 +1,20 @@
1
+ import { KdsPromptInputPermission, KdsPromptInputPermissionDecision } from '../types';
2
+ type PermissionDecision = Omit<KdsPromptInputPermissionDecision, "id">;
3
+ /**
4
+ * The permission phase: pending permissions resolved like a stack, with no
5
+ * pager. The current permission is always the first still-undecided one;
6
+ * deciding it pops it off and reveals the next. Buffered decisions persist
7
+ * until {@link reset} so the parent can gather them into a single `respond`
8
+ * once every phase is complete.
9
+ *
10
+ * @param permissions Getter for the pending permissions (kept reactive).
11
+ */
12
+ export declare function usePermissionPhase(permissions: () => KdsPromptInputPermission[]): {
13
+ current: import('vue').ComputedRef<KdsPromptInputPermission | undefined>;
14
+ isComplete: import('vue').ComputedRef<boolean>;
15
+ decide: (permission: KdsPromptInputPermission, value: PermissionDecision) => boolean;
16
+ toOrderedDecisions: () => KdsPromptInputPermissionDecision[];
17
+ reset: () => void;
18
+ };
19
+ export {};
20
+ //# sourceMappingURL=usePermissionPhase.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usePermissionPhase.d.ts","sourceRoot":"","sources":["../../../../../src/ai/KdsPromptInput/inquiries/usePermissionPhase.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,wBAAwB,EACxB,gCAAgC,EACjC,MAAM,UAAU,CAAC;AAElB,KAAK,kBAAkB,GAAG,IAAI,CAAC,gCAAgC,EAAE,IAAI,CAAC,CAAC;AAEvE;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAChC,WAAW,EAAE,MAAM,wBAAwB,EAAE;;;yBAyB/B,wBAAwB,SAC7B,kBAAkB,KACxB,OAAO;8BAkBqB,gCAAgC,EAAE;;EASlE"}
@@ -0,0 +1,26 @@
1
+ import { KdsPromptInputQuestion, KdsPromptInputQuestionAnswer } from '../types';
2
+ type QuestionAnswer = Omit<KdsPromptInputQuestionAnswer, "id">;
3
+ /**
4
+ * The question phase: pending questions paginated one at a time. The user moves
5
+ * forward with {@link answer} + {@link advance} (or {@link skip}) and back with
6
+ * {@link back}, changing earlier selections freely. Buffered answers persist
7
+ * until {@link reset} so the parent can gather them into a single `respond`
8
+ * once every phase is complete.
9
+ *
10
+ * @param questions Getter for the pending questions (kept reactive).
11
+ */
12
+ export declare function useQuestionPhase(questions: () => KdsPromptInputQuestion[]): {
13
+ current: import('vue').ComputedRef<KdsPromptInputQuestion>;
14
+ index: import('vue').Ref<number, number>;
15
+ pageCount: import('vue').ComputedRef<number>;
16
+ isComplete: import('vue').ComputedRef<boolean>;
17
+ othersAnswered: import('vue').ComputedRef<boolean>;
18
+ advance: () => void;
19
+ back: () => void;
20
+ answer: (question: KdsPromptInputQuestion, value: QuestionAnswer) => void;
21
+ skip: (question: KdsPromptInputQuestion) => void;
22
+ toOrderedAnswers: () => KdsPromptInputQuestionAnswer[];
23
+ reset: () => void;
24
+ };
25
+ export {};
26
+ //# sourceMappingURL=useQuestionPhase.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useQuestionPhase.d.ts","sourceRoot":"","sources":["../../../../../src/ai/KdsPromptInput/inquiries/useQuestionPhase.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,sBAAsB,EACtB,4BAA4B,EAC7B,MAAM,UAAU,CAAC;AAElB,KAAK,cAAc,GAAG,IAAI,CAAC,4BAA4B,EAAE,IAAI,CAAC,CAAC;AAE/D;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,MAAM,sBAAsB,EAAE;;;;;;;;uBAiC9C,sBAAsB,SAAS,cAAc;qBAI/C,sBAAsB;4BAKjB,4BAA4B,EAAE;;EAwB5D"}
@@ -1,5 +1,6 @@
1
- import { kdsPromptInputStatusType } from './enums';
1
+ import { kdsPromptInputPermissionDecision, kdsPromptInputStatusType } from './enums';
2
2
  export type KdsPromptInputStatusType = (typeof kdsPromptInputStatusType)[keyof typeof kdsPromptInputStatusType];
3
+ export type KdsPromptInputPermissionDecisionType = (typeof kdsPromptInputPermissionDecision)[keyof typeof kdsPromptInputPermissionDecision];
3
4
  export type KdsPromptInputStatus = {
4
5
  /**
5
6
  * Visual variant of the inline status banner. Purely presentational —
@@ -20,6 +21,90 @@ export type KdsPromptInputLink = {
20
21
  /** Destination passed through to the underlying `KdsLink`'s `to` prop. */
21
22
  to: string;
22
23
  };
24
+ export type KdsPromptInputPermission = {
25
+ /** Stable identifier, echoed back in the `respond` event. */
26
+ id: string;
27
+ /** Card headline (e.g. a humanized tool name). Wraps onto multiple lines. */
28
+ headline: string;
29
+ /**
30
+ * Human-readable explanation of what the assistant wants to do
31
+ * (e.g. "K-AI wants to inspect the output port at index 1 of node
32
+ * Table Creator 3:1.").
33
+ */
34
+ description?: string;
35
+ /**
36
+ * Configuration for the "remember this choice" checkbox. Omit to hide
37
+ * the checkbox; the corresponding decision then carries no `remember`
38
+ * flag.
39
+ */
40
+ remember?: {
41
+ /** Label of the checkbox (e.g. "Remember choice"). */
42
+ label: string;
43
+ /** Subtext below the label (e.g. where the choice is saved). */
44
+ subtext?: string;
45
+ /**
46
+ * Permissions sharing the same group are remembered together: when
47
+ * the user decides one with the checkbox checked, every other
48
+ * pending permission of the group is auto-decided the same way
49
+ * (e.g. pass the tool name so repeated calls of one tool ask only
50
+ * once).
51
+ */
52
+ group?: string;
53
+ };
54
+ };
55
+ export type KdsPromptInputPermissionDecision = {
56
+ /** `id` of the permission this decision belongs to. */
57
+ id: string;
58
+ decision: KdsPromptInputPermissionDecisionType;
59
+ /**
60
+ * State of the "remember this choice" checkbox. Only present when the
61
+ * permission was configured with `remember`.
62
+ */
63
+ remember?: boolean;
64
+ };
65
+ export type KdsPromptInputQuestionOption = {
66
+ /** Stable identifier, echoed back in `selectedOptionIds`. */
67
+ id: string;
68
+ /** Visible label of the option. */
69
+ label: string;
70
+ /** Sub text displayed below the option label. */
71
+ subText?: string;
72
+ };
73
+ export type KdsPromptInputQuestion = {
74
+ /** Stable identifier, echoed back in the `respond` event. */
75
+ id: string;
76
+ /** Question shown as the card headline. */
77
+ headline: string;
78
+ /** Optional description below the headline. */
79
+ description?: string;
80
+ /**
81
+ * Choices offered for the question. A freeform "Type your own answer"
82
+ * option is always shown in addition; omit the options for a
83
+ * freeform-only question.
84
+ */
85
+ options?: KdsPromptInputQuestionOption[];
86
+ /**
87
+ * Allow selecting multiple options (checkboxes) instead of a single one
88
+ * (radio buttons).
89
+ */
90
+ multiple?: boolean;
91
+ };
92
+ export type KdsPromptInputQuestionAnswer = {
93
+ /** `id` of the question this answer belongs to. */
94
+ id: string;
95
+ /** `id`s of the selected options. Empty when skipped or freeform-only. */
96
+ selectedOptionIds: string[];
97
+ /** Trimmed freeform text, present when the user typed an own answer. */
98
+ freeformInput?: string;
99
+ /** Present and `true` when the user skipped the question. */
100
+ skipped?: boolean;
101
+ };
102
+ export type KdsPromptInputInquiryResponse = {
103
+ /** One decision per entry of the `permissions` prop, in prop order. */
104
+ permissions: KdsPromptInputPermissionDecision[];
105
+ /** One answer per entry of the `questions` prop, in prop order. */
106
+ questions: KdsPromptInputQuestionAnswer[];
107
+ };
23
108
  export type KdsPromptInputProps = {
24
109
  /** Placeholder shown when the input is empty. */
25
110
  placeholder?: string;
@@ -55,5 +140,15 @@ export type KdsPromptInputProps = {
55
140
  * provided on its own.
56
141
  */
57
142
  link?: KdsPromptInputLink;
143
+ /**
144
+ * Pending permission requests rendered as cards attached above the
145
+ * input. Permissions are shown before questions.
146
+ */
147
+ permissions?: KdsPromptInputPermission[];
148
+ /**
149
+ * Pending questions rendered as cards attached above the input, after
150
+ * all permissions have been addressed.
151
+ */
152
+ questions?: KdsPromptInputQuestion[];
58
153
  };
59
154
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/ai/KdsPromptInput/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAEnD,MAAM,MAAM,wBAAwB,GAClC,CAAC,OAAO,wBAAwB,CAAC,CAAC,MAAM,OAAO,wBAAwB,CAAC,CAAC;AAE3E,MAAM,MAAM,oBAAoB,GAAG;IACjC;;;;;;OAMG;IACH,IAAI,EAAE,wBAAwB,CAAC;IAC/B,wDAAwD;IACxD,OAAO,EAAE,MAAM,CAAC;IAChB,yEAAyE;IACzE,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,iCAAiC;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,0EAA0E;IAC1E,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC,iDAAiD;IACjD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,8CAA8C;IAC9C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;OAGG;IACH,MAAM,CAAC,EAAE,oBAAoB,CAAC;IAC9B,gDAAgD;IAChD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;;OAIG;IACH,IAAI,CAAC,EAAE,kBAAkB,CAAC;CAC3B,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/ai/KdsPromptInput/types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gCAAgC,EAChC,wBAAwB,EACzB,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wB,EAAE,CAAC;IACzC;;;OAGG;IACH,SAAS,CAAC,EAAE,sBAAsB,EAAE,CAAC;CACtC,CAAC"}
@@ -1,16 +1,16 @@
1
1
  import { VersionHistoryProps } from './types';
2
2
  declare const __VLS_export: import('vue').DefineComponent<VersionHistoryProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
3
3
  select: (version: number | "current-state" | "most-recent") => any;
4
- close: () => any;
5
4
  delete: (version: number | "current-state" | "most-recent") => any;
5
+ close: () => any;
6
6
  restore: (version: number | "current-state" | "most-recent") => any;
7
7
  loadAll: () => any;
8
8
  create: () => any;
9
9
  discardCurrentState: () => any;
10
10
  }, string, import('vue').PublicProps, Readonly<VersionHistoryProps> & Readonly<{
11
11
  onSelect?: ((version: number | "current-state" | "most-recent") => any) | undefined;
12
- onClose?: (() => any) | undefined;
13
12
  onDelete?: ((version: number | "current-state" | "most-recent") => any) | undefined;
13
+ onClose?: (() => any) | undefined;
14
14
  onRestore?: ((version: number | "current-state" | "most-recent") => any) | undefined;
15
15
  onLoadAll?: (() => any) | undefined;
16
16
  onCreate?: (() => any) | undefined;
package/dist/toasts.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { t as _plugin_vue_export_helper_default } from "./_plugin-vue_export-helper-BOaGB7Aw.js";
2
- import { t as capitalize, u as truncateString_default } from "./dist-BrNh9vG-.js";
2
+ import { t as capitalize, u as truncateString_default } from "./dist-D6REgugT.js";
3
3
  import { Fragment, TransitionGroup, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, getCurrentInstance, inject, mergeProps, normalizeClass, onMounted, openBlock, provide, ref, renderList, resolveDynamicComponent, toDisplayString, unref, useCssVars, vShow, watch, withCtx, withDirectives } from "vue";
4
4
  import { useEventBus, useMouseInElement, useRafFn, useWindowFocus } from "@vueuse/core";
5
5
  import { KdsButton, KdsIcon, KdsLinkButton, KdsProgressBar } from "@knime/kds-components";
package/dist/versions.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { t as _plugin_vue_export_helper_default } from "./_plugin-vue_export-helper-BOaGB7Aw.js";
2
- import { i as formatLocalDateTimeString, n as formatDateTimeString } from "./dist-BrNh9vG-.js";
2
+ import { i as formatLocalDateTimeString, n as formatDateTimeString } from "./dist-D6REgugT.js";
3
3
  import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, createTextVNode, createVNode, defineComponent, mergeModels, nextTick, normalizeClass, normalizeStyle, onMounted, openBlock, ref, renderList, renderSlot, toDisplayString, unref, useModel, useTemplateRef, withCtx, withDirectives, withModifiers } from "vue";
4
4
  import { KdsAvatar, KdsButton, KdsCard, KdsDescription, KdsIcon, KdsLinkButton, KdsMenuButton, KdsPanel, KdsPopover, KdsSelectableCard, KdsTextInput, KdsTextarea, KdsToggleButton, vKdsTooltip } from "@knime/kds-components";
5
5
  import './versions.css';//#region src/versions/VersionHistory/HistoryEvent.vue?vue&type=script&setup=true&lang.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@knime/product-features",
3
- "version": "2.0.1",
3
+ "version": "2.1.0",
4
4
  "description": "Package containing composition patterns of KDS Components and KNIME business logic",
5
5
  "repository": {
6
6
  "type": "git",
@@ -54,14 +54,14 @@
54
54
  },
55
55
  "dependencies": {
56
56
  "consola": "^3.4.2",
57
- "@knime/kds-components": "^2.7.0",
58
- "@knime/kds-styles": "^2.7.0",
57
+ "@knime/kds-components": "^3.0.0",
58
+ "@knime/kds-styles": "^3.0.0",
59
59
  "@knime/utils": "^2.0.0"
60
60
  },
61
61
  "devDependencies": {
62
62
  "@storybook/addon-docs": "^10.4.6",
63
63
  "@storybook/vue3-vite": "^10.4.6",
64
- "@vitejs/plugin-vue": "^6.0.7",
64
+ "@vitejs/plugin-vue": "^6.0.8",
65
65
  "@vue/test-utils": "^2.4.11",
66
66
  "@vue/tsconfig": "^0.9.1",
67
67
  "@vueuse/core": "~14.3.0",
@@ -83,6 +83,9 @@
83
83
  "engines": {
84
84
  "node": ">=24"
85
85
  },
86
+ "sideEffects": [
87
+ "dist/*.css"
88
+ ],
86
89
  "scripts": {
87
90
  "build": "vite build",
88
91
  "type-check": "vue-tsc --build"