From 95363a5b52f3bf73531ac76b00178fa79ca97661 Mon Sep 17 00:00:00 2001 From: Nate Sesti <33237525+sestinj@users.noreply.github.com> Date: Thu, 28 Sep 2023 01:02:52 -0700 Subject: Past input (#513) * feat: :construction: use ComboBox in place of UserInputContainer * feat: :construction: adding context to previous inputs steps * feat: :sparkles: preview context items on click * feat: :construction: more work on context items ui * style: :construction: working out the details of ctx item buttons * feat: :sparkles: getting the final details * fix: :bug: fix height of ctx items bar * fix: :bug: last couple of details * fix: :bug: pass model param through to hf inference api * fix: :loud_sound: better logging for timeout * feat: :sparkles: option to set the meilisearch url * fix: :bug: fix height of past inputs --- extension/schema/History.d.ts | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) (limited to 'extension/schema/History.d.ts') diff --git a/extension/schema/History.d.ts b/extension/schema/History.d.ts index b00a1505..9b7db18a 100644 --- a/extension/schema/History.d.ts +++ b/extension/schema/History.d.ts @@ -23,6 +23,14 @@ export type Depth = number; export type Deleted = boolean; export type Active = boolean; export type Logs = string[]; +export type Name3 = string; +export type Description1 = string; +export type ProviderTitle = string; +export type ItemId = string; +export type Content1 = string; +export type Editing = boolean; +export type Editable = boolean; +export type ContextUsed = ContextItem[]; export type Timeline = HistoryNode[]; export type CurrentIndex = number; @@ -44,6 +52,7 @@ export interface HistoryNode { deleted?: Deleted; active?: Active; logs?: Logs; + context_used?: ContextUsed; [k: string]: unknown; } export interface Step { @@ -72,3 +81,32 @@ export interface FunctionCall { export interface Observation { [k: string]: unknown; } +/** + * A ContextItem is a single item that is stored in the ContextManager. + */ +export interface ContextItem { + description: ContextItemDescription; + content: Content1; + editing?: Editing; + editable?: Editable; + [k: string]: unknown; +} +/** + * A ContextItemDescription is a description of a ContextItem that is displayed to the user when they type '@'. + * + * The id can be used to retrieve the ContextItem from the ContextManager. + */ +export interface ContextItemDescription { + name: Name3; + description: Description1; + id: ContextItemId; + [k: string]: unknown; +} +/** + * A ContextItemId is a unique identifier for a ContextItem. + */ +export interface ContextItemId { + provider_title: ProviderTitle; + item_id: ItemId; + [k: string]: unknown; +} -- cgit v1.2.3-70-g09d2