mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-02 21:19:12 +00:00
Render references after chat response is streamed for smoother render
Otherwise the Khoj's chat response is filling up in between the streamed message and already rendered references section at the bottom of the message Define OnlineContext type to simplify typing online context param across other interfaces and functions
This commit is contained in:
@@ -33,6 +33,10 @@ export interface Context {
|
||||
file: string;
|
||||
}
|
||||
|
||||
export interface OnlineContext {
|
||||
[key: string]: OnlineContextData;
|
||||
}
|
||||
|
||||
export interface WebPage {
|
||||
link: string;
|
||||
query: string;
|
||||
@@ -85,11 +89,9 @@ export interface SingleChatMessage {
|
||||
automationId: string;
|
||||
by: string;
|
||||
message: string;
|
||||
context: Context[];
|
||||
created: string;
|
||||
onlineContext: {
|
||||
[key: string]: OnlineContextData
|
||||
}
|
||||
context: Context[];
|
||||
onlineContext: OnlineContext;
|
||||
rawQuery?: string;
|
||||
intent?: Intent;
|
||||
agent?: AgentData;
|
||||
@@ -99,9 +101,7 @@ export interface StreamMessage {
|
||||
rawResponse: string;
|
||||
trainOfThought: string[];
|
||||
context: Context[];
|
||||
onlineContext: {
|
||||
[key: string]: OnlineContextData
|
||||
}
|
||||
onlineContext: OnlineContext;
|
||||
completed: boolean;
|
||||
rawQuery: string;
|
||||
timestamp: string;
|
||||
|
||||
Reference in New Issue
Block a user