Skip to content

@graphty/graphty-element / ai / TextInputAdapter

Class: TextInputAdapter ​

Defined in: graphty-element/src/ai/input/TextInputAdapter.ts:12

Text input adapter that wraps text input with streaming support. Useful for "as-you-type" suggestions or preview functionality.

Implements ​

Constructors ​

Constructor ​

new TextInputAdapter(): TextInputAdapter

Returns ​

TextInputAdapter

Properties ​

isSupported ​

readonly isSupported: true = true

Defined in: graphty-element/src/ai/input/TextInputAdapter.ts:14

Whether this adapter is supported in the current environment

Implementation of ​

InputAdapter.isSupported


type ​

readonly type: "text"

Defined in: graphty-element/src/ai/input/TextInputAdapter.ts:13

Type of input this adapter handles

Implementation of ​

InputAdapter.type

Accessors ​

isActive ​

Get Signature ​

get isActive(): boolean

Defined in: graphty-element/src/ai/input/TextInputAdapter.ts:23

Get whether text input is currently active.

Returns ​

boolean

True if accepting input

Whether this adapter is currently active (listening)

Implementation of ​

InputAdapter.isActive

Methods ​

dispose() ​

dispose(): void

Defined in: graphty-element/src/ai/input/TextInputAdapter.ts:80

Clean up resources and remove all callbacks.

Returns ​

void

Implementation of ​

InputAdapter.dispose


onInput() ​

onInput(callback): void

Defined in: graphty-element/src/ai/input/TextInputAdapter.ts:45

Register a callback for input events.

Parameters ​

callback ​

InputCallback

Function called when input is received

Returns ​

void

Implementation of ​

InputAdapter.onInput


start() ​

start(): void

Defined in: graphty-element/src/ai/input/TextInputAdapter.ts:30

Start accepting text input.

Returns ​

void

Implementation of ​

InputAdapter.start


stop() ​

stop(): void

Defined in: graphty-element/src/ai/input/TextInputAdapter.ts:37

Stop accepting text input.

Returns ​

void

Implementation of ​

InputAdapter.stop


submitInput() ​

submitInput(text): void

Defined in: graphty-element/src/ai/input/TextInputAdapter.ts:53

Submit final text input.

Parameters ​

text ​

string

The complete input text

Returns ​

void


submitInterim() ​

submitInterim(text): void

Defined in: graphty-element/src/ai/input/TextInputAdapter.ts:67

Submit interim (partial) text input.

Parameters ​

text ​

string

The partial input text

Returns ​

void