qqsl-agent 0.0.3 → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1,6 @@
1
- @import "highlight.js/styles/atom-one-light.css";
1
+ @import "highlight.js/styles/atom-one-light.css";
2
+
3
+ .history-list-scroll::-webkit-scrollbar { width: 6px; }
4
+ .history-list-scroll::-webkit-scrollbar-track { background: transparent; }
5
+ .history-list-scroll::-webkit-scrollbar-thumb { background: #d1d1d1; border-radius: 8px; }
6
+ .history-list-scroll::-webkit-scrollbar-thumb:hover { background: #b0b0b0; }
@@ -1,14 +1,16 @@
1
1
  import { EventEmitter, ElementRef, OnInit } from '@angular/core';
2
2
  import { IModel, IModelList } from '../models/model-list.model';
3
- import { IKnowledgeList } from '../models/knowledge-list.model';
3
+ import { IKnowledgeTag, IKnowledgeType } from '../models/knowledge-list.model';
4
4
  import { ISendMessage } from '../models/send-message.model';
5
5
  import { Message } from '../models/message.model';
6
6
  import { SseService } from '../services/sse.service';
7
+ import { NzTreeNodeOptions } from 'ng-zorro-antd/core/tree';
7
8
  import * as i0 from "@angular/core";
8
9
  export declare class ChatInputComponent implements OnInit {
9
10
  editor: ElementRef<HTMLDivElement>;
10
11
  chatInputWrapper: ElementRef<HTMLDivElement>;
11
12
  messages: Message[];
13
+ mode: 'full' | 'card';
12
14
  sendMessage: EventEmitter<{
13
15
  message: ISendMessage;
14
16
  isRegenerate: boolean;
@@ -23,13 +25,25 @@ export declare class ChatInputComponent implements OnInit {
23
25
  currentModel: IModel | null;
24
26
  currentKnowledge: string[];
25
27
  modelList: IModelList;
26
- knowledgeList: IKnowledgeList;
27
28
  modelPopoverVisible: boolean;
28
29
  knowledgePopoverVisible: boolean;
29
30
  deepThink: boolean;
31
+ knowledgeStepIndex: number;
32
+ typesData: IKnowledgeType[];
33
+ categoriesData: NzTreeNodeOptions[];
34
+ tagsData: IKnowledgeTag[];
35
+ selectedTypes: string[];
36
+ selectedCategories: string[];
37
+ selectedTags: string[];
30
38
  ngOnInit(): void;
31
39
  getModelList(): void;
32
- getKnowledgeList(): void;
40
+ onTypeChange(types: string[]): void;
41
+ onCategoryChange(categories: any[]): void;
42
+ onTagChange(tags: any[]): void;
43
+ private loadTypes;
44
+ private loadCategories;
45
+ private loadTags;
46
+ private convertToTree;
33
47
  modelVisibleChange(value: boolean): void;
34
48
  knowledgeVisibleChange(value: boolean): void;
35
49
  knowledgeSelectChange(value: string[]): void;
@@ -42,5 +56,5 @@ export declare class ChatInputComponent implements OnInit {
42
56
  regenerateSend(msg: Message): void;
43
57
  send(): void;
44
58
  static ɵfac: i0.ɵɵFactoryDeclaration<ChatInputComponent, never>;
45
- static ɵcmp: i0.ɵɵComponentDeclaration<ChatInputComponent, "ngx-chat-input", never, { "messages": "messages"; }, { "sendMessage": "sendMessage"; "messageChange": "messageChange"; "enter": "enter"; "paste": "paste"; }, never, never, false, never>;
59
+ static ɵcmp: i0.ɵɵComponentDeclaration<ChatInputComponent, "ngx-chat-input", never, { "messages": "messages"; "mode": "mode"; }, { "sendMessage": "sendMessage"; "messageChange": "messageChange"; "enter": "enter"; "paste": "paste"; }, never, never, false, never>;
46
60
  }
@@ -3,6 +3,7 @@ import { Conversation, ConversationGroup } from '../models/conversation.model';
3
3
  import { HistoryGroupComponent } from './history-group/history-group.component';
4
4
  import * as i0 from "@angular/core";
5
5
  export declare class ChatSidebarComponent implements OnInit {
6
+ mode: 'full' | 'card';
6
7
  historyGroupRef: HistoryGroupComponent;
7
8
  private http;
8
9
  private storeService;
@@ -16,5 +17,5 @@ export declare class ChatSidebarComponent implements OnInit {
16
17
  openNewChat(): void;
17
18
  groupByFriendlyTime(dataList: Conversation[]): ConversationGroup[];
18
19
  static ɵfac: i0.ɵɵFactoryDeclaration<ChatSidebarComponent, never>;
19
- static ɵcmp: i0.ɵɵComponentDeclaration<ChatSidebarComponent, "ngx-chat-sidebar", never, {}, {}, never, never, false, never>;
20
+ static ɵcmp: i0.ɵɵComponentDeclaration<ChatSidebarComponent, "ngx-chat-sidebar", never, { "mode": "mode"; }, {}, never, never, false, never>;
20
21
  }
@@ -5,24 +5,28 @@ import * as i3 from "./chat-messages/chat-messages.component";
5
5
  import * as i4 from "./chat-sidebar/chat-sidebar.component";
6
6
  import * as i5 from "./components/pagination/pagination.component";
7
7
  import * as i6 from "./chat-sidebar/history-group/history-group.component";
8
- import * as i7 from "@angular/common";
9
- import * as i8 from "ng-zorro-antd/avatar";
10
- import * as i9 from "ng-zorro-antd/spin";
11
- import * as i10 from "ng-zorro-antd/tag";
12
- import * as i11 from "ng-zorro-antd/input";
13
- import * as i12 from "ng-zorro-antd/button";
14
- import * as i13 from "ng-zorro-antd/list";
15
- import * as i14 from "ng-zorro-antd/slider";
16
- import * as i15 from "ng-zorro-antd/layout";
17
- import * as i16 from "ng-zorro-antd/popover";
18
- import * as i17 from "ng-zorro-antd/radio";
19
- import * as i18 from "ng-zorro-antd/checkbox";
20
- import * as i19 from "ng-zorro-antd/icon";
21
- import * as i20 from "ng-zorro-antd/pagination";
22
- import * as i21 from "@angular/forms";
23
- import * as i22 from "./pipes/markdown.pipe";
8
+ import * as i7 from "./floating-chat/floating-chat.component";
9
+ import * as i8 from "@angular/common";
10
+ import * as i9 from "ng-zorro-antd/avatar";
11
+ import * as i10 from "ng-zorro-antd/spin";
12
+ import * as i11 from "ng-zorro-antd/tag";
13
+ import * as i12 from "ng-zorro-antd/input";
14
+ import * as i13 from "ng-zorro-antd/button";
15
+ import * as i14 from "ng-zorro-antd/list";
16
+ import * as i15 from "ng-zorro-antd/slider";
17
+ import * as i16 from "ng-zorro-antd/layout";
18
+ import * as i17 from "ng-zorro-antd/popover";
19
+ import * as i18 from "ng-zorro-antd/radio";
20
+ import * as i19 from "ng-zorro-antd/checkbox";
21
+ import * as i20 from "ng-zorro-antd/icon";
22
+ import * as i21 from "ng-zorro-antd/pagination";
23
+ import * as i22 from "ng-zorro-antd/steps";
24
+ import * as i23 from "ng-zorro-antd/select";
25
+ import * as i24 from "ng-zorro-antd/tree-select";
26
+ import * as i25 from "@angular/forms";
27
+ import * as i26 from "./pipes/markdown.pipe";
24
28
  export declare class AgentChatModule {
25
29
  static ɵfac: i0.ɵɵFactoryDeclaration<AgentChatModule, never>;
26
- static ɵmod: i0.ɵɵNgModuleDeclaration<AgentChatModule, [typeof i1.NgxAgentChatComponent, typeof i2.ChatInputComponent, typeof i3.ChatMessagesComponent, typeof i4.ChatSidebarComponent, typeof i5.SimplePaginationComponent, typeof i6.HistoryGroupComponent], [typeof i7.CommonModule, typeof i8.NzAvatarModule, typeof i9.NzSpinModule, typeof i10.NzTagModule, typeof i11.NzInputModule, typeof i12.NzButtonModule, typeof i13.NzListModule, typeof i14.NzSliderModule, typeof i15.NzLayoutModule, typeof i16.NzPopoverModule, typeof i17.NzRadioModule, typeof i18.NzCheckboxModule, typeof i19.NzIconModule, typeof i20.NzPaginationModule, typeof i21.FormsModule, typeof i22.MarkdownPipe], [typeof i1.NgxAgentChatComponent]>;
30
+ static ɵmod: i0.ɵɵNgModuleDeclaration<AgentChatModule, [typeof i1.NgxAgentChatComponent, typeof i2.ChatInputComponent, typeof i3.ChatMessagesComponent, typeof i4.ChatSidebarComponent, typeof i5.SimplePaginationComponent, typeof i6.HistoryGroupComponent, typeof i7.FloatingChatComponent], [typeof i8.CommonModule, typeof i9.NzAvatarModule, typeof i10.NzSpinModule, typeof i11.NzTagModule, typeof i12.NzInputModule, typeof i13.NzButtonModule, typeof i14.NzListModule, typeof i15.NzSliderModule, typeof i16.NzLayoutModule, typeof i17.NzPopoverModule, typeof i18.NzRadioModule, typeof i19.NzCheckboxModule, typeof i20.NzIconModule, typeof i21.NzPaginationModule, typeof i22.NzStepsModule, typeof i23.NzSelectModule, typeof i24.NzTreeSelectModule, typeof i25.FormsModule, typeof i26.MarkdownPipe], [typeof i1.NgxAgentChatComponent, typeof i7.FloatingChatComponent]>;
27
31
  static ɵinj: i0.ɵɵInjectorDeclaration<AgentChatModule>;
28
32
  }
@@ -0,0 +1,43 @@
1
+ import { AfterViewInit, OnInit } from '@angular/core';
2
+ import { ChatSidebarComponent } from '../chat-sidebar/chat-sidebar.component';
3
+ import { ChatMessagesComponent } from '../chat-messages/chat-messages.component';
4
+ import { ChatInputComponent } from '../chat-input/chat-input.component';
5
+ import { Message } from '../models/message.model';
6
+ import { ISendMessage } from '../models/send-message.model';
7
+ import * as i0 from "@angular/core";
8
+ export declare class FloatingChatComponent implements OnInit, AfterViewInit {
9
+ isExpanded: boolean;
10
+ title: string;
11
+ /**
12
+ * 切换聊天框的展开/收起状态
13
+ */
14
+ toggleChatBox(): void;
15
+ /**
16
+ * 接口baseUrl配置
17
+ */
18
+ baseUrl: string;
19
+ token: string;
20
+ chatSidebarRef: ChatSidebarComponent;
21
+ chatMessagesRef: ChatMessagesComponent;
22
+ chatInputRef: ChatInputComponent;
23
+ private md;
24
+ private httpService;
25
+ private sseService;
26
+ private storeService;
27
+ private sanitizer;
28
+ private ngZone;
29
+ private resizeObserver;
30
+ messages: Message[];
31
+ modelPopoverVisible: boolean;
32
+ ngOnInit(): void;
33
+ ngAfterViewInit(): void;
34
+ modelVisibleChange(value: boolean): void;
35
+ openNewChat(): void;
36
+ regenerateAnswer(msg: Message): void;
37
+ onSendMessage(event: {
38
+ message: ISendMessage;
39
+ isRegenerate: boolean;
40
+ }): void;
41
+ static ɵfac: i0.ɵɵFactoryDeclaration<FloatingChatComponent, never>;
42
+ static ɵcmp: i0.ɵɵComponentDeclaration<FloatingChatComponent, "ngx-agent-floating-chat", never, { "title": "title"; "baseUrl": "baseUrl"; "token": "token"; }, {}, never, never, false, never>;
43
+ }
@@ -7,3 +7,17 @@ export interface IKnowledge {
7
7
  name: string;
8
8
  checked?: boolean;
9
9
  }
10
+ export interface IKnowledgeType {
11
+ type: string;
12
+ typeC: string;
13
+ }
14
+ export interface IKnowledgeCategory {
15
+ iCode: string;
16
+ name: string;
17
+ children: IKnowledgeCategory[];
18
+ }
19
+ export interface IKnowledgeTag {
20
+ iCode: string;
21
+ name: string;
22
+ children: IKnowledgeTag[];
23
+ }
@@ -23,11 +23,20 @@ export interface ISendMessage {
23
23
  */
24
24
  question: string;
25
25
  /**
26
- * 是否管理知识库
26
+ * 知识库选择
27
27
  */
28
- knowledge: boolean;
29
- /**
30
- * 关联的知识库
31
- */
32
- knowledgeList: string[];
28
+ parameter?: {
29
+ /**
30
+ * 资源类型
31
+ */
32
+ type: string[];
33
+ /**
34
+ * 资源目录
35
+ */
36
+ catalogs: string[];
37
+ /**
38
+ * 资源标签
39
+ */
40
+ tags: string[];
41
+ };
33
42
  }
@@ -1,2 +1,3 @@
1
1
  export * from './chat.module';
2
2
  export * from './chat.component';
3
+ export * from './floating-chat/floating-chat.component';