@aws/chat-client-ui-types
Advanced tools
Comparing version 0.0.6 to 0.0.7
# Changelog | ||
## [0.0.7] - 2024-10-14 | ||
### Added | ||
- `COPY_TO_CLIPBOARD` contract to send notification about copy events from the UI to destinations | ||
## [0.0.6] - 2024-06-20 | ||
@@ -4,0 +9,0 @@ |
@@ -1,2 +0,2 @@ | ||
import { InsertToCursorPositionParams, ChatOptions } from '@aws/language-server-runtimes-types'; | ||
import { InsertToCursorPositionParams, ChatOptions, CodeSelectionType, ReferenceTrackerInformation } from '@aws/language-server-runtimes-types'; | ||
export { InsertToCursorPositionParams } from '@aws/language-server-runtimes-types'; | ||
@@ -10,6 +10,7 @@ export type AuthFollowUpType = 'full-auth' | 're-auth' | 'missing_scopes' | 'use-supported-auth'; | ||
export declare const INSERT_TO_CURSOR_POSITION = "insertToCursorPosition"; | ||
export declare const COPY_TO_CLIPBOARD = "copyToClipboard"; | ||
export declare const AUTH_FOLLOW_UP_CLICKED = "authFollowUpClicked"; | ||
export declare const GENERIC_COMMAND = "genericCommand"; | ||
export declare const CHAT_OPTIONS = "chatOptions"; | ||
export type UiMessageCommand = typeof SEND_TO_PROMPT | typeof ERROR_MESSAGE | typeof INSERT_TO_CURSOR_POSITION | typeof AUTH_FOLLOW_UP_CLICKED | typeof GENERIC_COMMAND | typeof CHAT_OPTIONS; | ||
export type UiMessageCommand = typeof SEND_TO_PROMPT | typeof ERROR_MESSAGE | typeof INSERT_TO_CURSOR_POSITION | typeof AUTH_FOLLOW_UP_CLICKED | typeof GENERIC_COMMAND | typeof CHAT_OPTIONS | typeof COPY_TO_CLIPBOARD; | ||
export interface UiMessage { | ||
@@ -19,3 +20,3 @@ command: UiMessageCommand; | ||
} | ||
export type UiMessageParams = InsertToCursorPositionParams | AuthFollowUpClickedParams | GenericCommandParams | ErrorParams | SendToPromptParams | ChatOptions; | ||
export type UiMessageParams = InsertToCursorPositionParams | AuthFollowUpClickedParams | GenericCommandParams | ErrorParams | SendToPromptParams | ChatOptions | CopyCodeToClipboardParams; | ||
export interface SendToPromptParams { | ||
@@ -66,1 +67,15 @@ selection: string; | ||
} | ||
export interface CopyCodeToClipboardParams { | ||
tabId: string; | ||
messageId: string; | ||
code?: string; | ||
type?: CodeSelectionType; | ||
referenceTrackerInformation?: ReferenceTrackerInformation[]; | ||
eventId?: string; | ||
codeBlockIndex?: number; | ||
totalCodeBlocks?: number; | ||
} | ||
export interface CopyCodeToClipboardMessage { | ||
command: typeof COPY_TO_CLIPBOARD; | ||
params: CopyCodeToClipboardParams; | ||
} |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.CHAT_OPTIONS = exports.GENERIC_COMMAND = exports.AUTH_FOLLOW_UP_CLICKED = exports.INSERT_TO_CURSOR_POSITION = exports.ERROR_MESSAGE = exports.SEND_TO_PROMPT = exports.isValidAuthFollowUpType = void 0; | ||
exports.CHAT_OPTIONS = exports.GENERIC_COMMAND = exports.AUTH_FOLLOW_UP_CLICKED = exports.COPY_TO_CLIPBOARD = exports.INSERT_TO_CURSOR_POSITION = exports.ERROR_MESSAGE = exports.SEND_TO_PROMPT = void 0; | ||
exports.isValidAuthFollowUpType = isValidAuthFollowUpType; | ||
function isValidAuthFollowUpType(value) { | ||
return ['full-auth', 're-auth', 'missing_scopes', 'use-supported-auth'].includes(value); | ||
} | ||
exports.isValidAuthFollowUpType = isValidAuthFollowUpType; | ||
exports.SEND_TO_PROMPT = 'sendToPrompt'; | ||
exports.ERROR_MESSAGE = 'errorMessage'; | ||
exports.INSERT_TO_CURSOR_POSITION = 'insertToCursorPosition'; | ||
exports.COPY_TO_CLIPBOARD = 'copyToClipboard'; | ||
exports.AUTH_FOLLOW_UP_CLICKED = 'authFollowUpClicked'; | ||
@@ -12,0 +13,0 @@ exports.GENERIC_COMMAND = 'genericCommand'; |
{ | ||
"name": "@aws/chat-client-ui-types", | ||
"version": "0.0.6", | ||
"version": "0.0.7", | ||
"description": "Type definitions for Chat UIs in Language Servers and Runtimes for AWS", | ||
@@ -5,0 +5,0 @@ "main": "./out/index.js", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
17483
110