@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 ​
readonlyisSupported:true=true
Defined in: graphty-element/src/ai/input/TextInputAdapter.ts:14
Whether this adapter is supported in the current environment
Implementation of ​
type ​
readonlytype:"text"
Defined in: graphty-element/src/ai/input/TextInputAdapter.ts:13
Type of input this adapter handles
Implementation of ​
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 ​
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 ​
onInput() ​
onInput(
callback):void
Defined in: graphty-element/src/ai/input/TextInputAdapter.ts:45
Register a callback for input events.
Parameters ​
callback ​
Function called when input is received
Returns ​
void
Implementation of ​
start() ​
start():
void
Defined in: graphty-element/src/ai/input/TextInputAdapter.ts:30
Start accepting text input.
Returns ​
void
Implementation of ​
stop() ​
stop():
void
Defined in: graphty-element/src/ai/input/TextInputAdapter.ts:37
Stop accepting text input.
Returns ​
void
Implementation of ​
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