Keldos commited on
Commit
1c2b5d2
1 Parent(s): 9763618

WIP: make chat with more buttons...

Browse files
ChuanhuChatbot.py CHANGED
@@ -124,24 +124,26 @@ with gr.Blocks(theme=small_and_beautiful_theme) as demo:
124
  )
125
  with gr.Row(elem_id="chatbot-footer"):
126
  with gr.Box(elem_id="chatbot-input-box"):
127
- with gr.Row(elem_id="chatbot-input-btn-bar"):
128
- gr.Button(i18n("📄 上传文档"), variant="secondary", elem_id="upload-doc-btn", elem_classes="chatbot-input-button", scale=0)
129
- gr.Button(i18n("📄 xxx"), variant="secondary", elem_id="upload-index-btn", elem_classes="chatbot-input-button", scale=0)
130
- gr.Button(i18n("📄 xxx"), variant="secondary", elem_id="uplasdfasdfoad-qa-btn", elem_classes="chatbot-input-button", scale=0)
131
- with gr.Row(elem_id="chatbot-input-tb-row"):
132
- with gr.Column(min_width=225, scale=12):
133
- user_input = gr.Textbox(
134
- elem_id="user-input-tb",
135
- show_label=False,
136
- placeholder=i18n("在这里输入"),
137
- elem_classes="no-container",
138
- max_lines=5,
139
- # container=False
140
- )
141
- with gr.Column(min_width=42, scale=1, elem_id="chatbot-ctrl-btns"):
142
- submitBtn = gr.Button(value="", variant="primary", elem_id="submit-btn")
143
- cancelBtn = gr.Button(value="", variant="secondary", visible=False, elem_id="cancel-btn")
144
- with gr.Row(elem_id="chatbot-buttons", visible=False):
 
 
145
  with gr.Column(min_width=120, scale=1):
146
  emptyBtn = gr.Button(
147
  i18n("🧹 新的对话"), elem_id="empty-btn"
 
124
  )
125
  with gr.Row(elem_id="chatbot-footer"):
126
  with gr.Box(elem_id="chatbot-input-box"):
127
+ # with gr.Row(elem_id="chatbot-input-btn-bar"):
128
+ # gr.Button(i18n("📄 上传文档"), variant="secondary", elem_id="upload-doc-btn", elem_classes="chatbot-input-button", scale=0)
129
+ # gr.Button(i18n("📄 xxx"), variant="secondary", elem_id="upload-index-btn", elem_classes="chatbot-input-button", scale=0)
130
+ # gr.Button(i18n("📄 xxx"), variant="secondary", elem_id="uplasdfasdfoad-qa-btn", elem_classes="chatbot-input-button", scale=0)
131
+ with gr.Row(elem_id="chatbot-input-row"):
132
+ gr.HTML(get_html("chatbot_more.html"))
133
+ with gr.Row(elem_id="chatbot-input-tb-row"):
134
+ with gr.Column(min_width=225, scale=12):
135
+ user_input = gr.Textbox(
136
+ elem_id="user-input-tb",
137
+ show_label=False,
138
+ placeholder=i18n("在这里输入"),
139
+ elem_classes="no-container",
140
+ max_lines=5,
141
+ # container=False
142
+ )
143
+ with gr.Column(min_width=42, scale=1, elem_id="chatbot-ctrl-btns"):
144
+ submitBtn = gr.Button(value="", variant="primary", elem_id="submit-btn")
145
+ cancelBtn = gr.Button(value="", variant="secondary", visible=False, elem_id="cancel-btn")
146
+ with gr.Row(elem_id="chatbot-buttons", visible=False): # Note: Buttons below are set invisible in UI. But they are used in JS.
147
  with gr.Column(min_width=120, scale=1):
148
  emptyBtn = gr.Button(
149
  i18n("🧹 新的对话"), elem_id="empty-btn"
web_assets/html/chatbot_more.html ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div>
2
+ <div id="chatbot-input-more-area">
3
+ <div class="switch-checkbox">
4
+ <label>
5
+ <input type="checkbox" name="single-session-cb" data-testid="checkbox" style="transform: scale(0.8); margin: 0;">
6
+ <span class="chatbot-input-more-span">单轮对话</span>
7
+ </label>
8
+ </div>
9
+ <div class="switch-checkbox">
10
+ <label>
11
+ <input type="checkbox" name="online-search-cb" data-testid="checkbox" style="transform: scale(0.8); margin: 0;">
12
+ <span class="chatbot-input-more-span">在线搜索</span>
13
+ </label>
14
+ </div>
15
+ <div>
16
+ <label>
17
+ <button>
18
+ <span>上传文件</span>
19
+ <span class="chatbot-input-more-icon">
20
+ <svg width="17.6625708px" height="22px" viewBox="0 0 17.6625708 22" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
21
+ <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
22
+ <g fill="currentColor" fill-rule="nonzero">
23
+ <path d="M10.6020285,2.51882667 C11.4362625,2.51882667 11.8921676,2.64807396 12.4438001,3.21682942 L16.9677143,7.80362991 C17.5473088,8.39718377 17.6625708,8.80801259 17.6625708,9.74013504 L17.6625708,17.0701838 C17.6625708,18.6697194 16.8588053,19.4835978 15.2701606,19.4835978 L9.30367012,19.4838726 C9.50801444,19.132339 9.67081559,18.754537 9.78494219,18.3575337 L15.2149282,18.3578162 C16.0814028,18.3578162 16.5329428,17.8954285 16.5329428,17.0499579 L16.5329428,9.75491554 L11.9107944,9.75491554 C10.9798389,9.75491554 10.4963609,9.29343541 10.4963609,8.34048196 L10.4963609,3.64458667 L6.87556994,3.64458667 C6.00213732,3.64458667 5.55375219,4.12267974 5.55375219,4.95246234 L5.55332282,12.0499339 C5.36755588,12.0285691 5.17882362,12.0175857 4.9877281,12.0175857 C4.79846417,12.0175857 4.61149369,12.028399 4.42740668,12.0494356 L4.42797059,4.93219317 C4.42797059,3.3327051 5.23415624,2.51882667 6.81337946,2.51882667 Z M11.552216,3.86783276 L11.552216,8.21151991 C11.552216,8.55164434 11.6926308,8.69205911 12.0359101,8.69205911 L16.3097226,8.69205911 L11.552216,3.86783276 Z" fill-opacity="0.85"></path>
24
+ <path d="M4.9877281,13.0174305 C7.17286548,13.0174305 8.97241326,14.8169783 8.97241326,17.0052706 C8.97241326,19.1904512 7.15190483,20.9970003 4.9877281,20.9970003 C2.80254317,20.9970003 0.999853452,19.1974525 0.999853452,17.0052706 C0.999853452,14.82009 2.80254317,13.0174305 4.9877281,13.0174305 Z M4.99784107,14.437007 C4.88115289,14.437007 4.7753124,14.4852382 4.64150995,14.6120393 L2.60482154,16.530609 C2.48641329,16.6350666 2.4357663,16.7447535 2.42877798,16.8911323 C2.414797,17.1440431 2.62022006,17.325342 2.87314384,17.325342 C3.00310422,17.3323433 3.12991834,17.2638862 3.21236934,17.1782716 L3.90166369,16.4757224 L4.5558954,15.8144894 L4.51466558,16.8528413 L4.51466558,19.0792085 C4.51466558,19.332854 4.73408257,19.5421148 4.99784107,19.5421148 C5.25844467,19.5421148 5.47470676,19.332854 5.47470676,19.0792085 L5.47470676,16.8528413 L5.44363313,15.8144894 L6.08075058,16.4757224 L6.78018815,17.1782716 C6.86960587,17.2638862 6.98560256,17.3183839 7.11555862,17.325342 C7.36531454,17.3393445 7.56061597,17.1440431 7.56061597,16.8911323 C7.56061597,16.7479084 7.50996466,16.6350666 7.39159099,16.530609 L5.34090431,14.6120393 C5.22352465,14.498506 5.12779713,14.437007 4.99784107,14.437007 Z" fill-opacity="0.85"></path>
25
+ </g>
26
+ </g>
27
+ </svg>
28
+ </span>
29
+ </button>
30
+ </label>
31
+ </div>
32
+ </div>
33
+
34
+ <!-- get more button -->
35
+ <div>
36
+ <button class="chatbot-input-more-btn">
37
+ <!-- <svg width="32px" height="32px" viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg"
38
+ xmlns:xlink="http://www.w3.org/1999/xlink">
39
+ <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
40
+ <g fill="currentColor" fill-rule="nonzero">
41
+ <path
42
+ d="M15.9930223,31.97976 C24.7467023,31.97976 32,24.7418401 32,15.98988 C32,7.23796297 24.7327468,0 15.9790668,0 C7.23313125,0 0,7.23796297 0,15.98988 C0,24.7418401 7.24706085,31.97976 15.9930223,31.97976 Z"
43
+ fill-opacity="0.1" class="sm-round-bg"></path>
44
+ <path
45
+ d="M8.41162523,16.0038327 C8.41162523,15.2803594 8.92769229,14.7720332 9.65130778,14.7720332 L14.7951802,14.7720332 L14.7951802,9.62925761 C14.7951802,8.91198549 15.2756953,8.40371964 15.9728644,8.40371964 C16.6964799,8.40371964 17.2048198,8.90578429 17.2048198,9.62925761 L17.2048198,14.7720332 L22.3626477,14.7720332 C23.0723077,14.7720332 23.5884006,15.2803594 23.5884006,16.0038327 C23.5884006,16.7008648 23.0660191,17.1952382 22.3626477,17.1952382 L17.2048198,17.1952382 L17.2048198,22.3380138 C17.2048198,23.0614872 16.6964799,23.563526 15.9728644,23.563526 C15.2756953,23.563526 14.7951802,23.0413333 14.7951802,22.3380138 L14.7951802,17.1952382 L9.65130778,17.1952382 C8.93398085,17.1952382 8.41162523,16.7008648 8.41162523,16.0038327 Z"
46
+ fill-opacity="0.85"></path>
47
+ </g>
48
+ </g>
49
+ </svg> -->
50
+ <svg width="32px" height="32px" viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
51
+ <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
52
+ <g fill="currentColor" fill-rule="nonzero">
53
+ <path d="M15.9930223,31.97976 C24.7467023,31.97976 32,24.7418401 32,15.98988 C32,7.23796297 24.7327468,0 15.9790668,0 C7.23313125,0 0,7.23796297 0,15.98988 C0,24.7418401 7.24706085,31.97976 15.9930223,31.97976 Z" fill-opacity="0.1" class="sm-round-bg"></path>
54
+ <path d="M23.5318035,18.2475474 C22.2777951,18.2475474 21.2612876,17.2374408 21.2612876,15.9773915 C21.2612876,14.7173421 22.2777951,13.7072355 23.5318035,13.7072355 C24.7781451,13.7072355 25.8086942,14.7173421 25.8086942,15.9773915 C25.8086942,17.2374408 24.7781451,18.2475474 23.5318035,18.2475474 Z" fill-opacity="0.75"></path>
55
+ <path d="M15.9930223,18.2475474 C14.7327253,18.2475474 13.7224202,17.2374408 13.7224202,15.9773915 C13.7224202,14.7173421 14.7327253,13.7072355 15.9930223,13.7072355 C17.2533193,13.7072355 18.2775798,14.7173421 18.2775798,15.9773915 C18.2775798,17.2374408 17.2533193,18.2475474 15.9930223,18.2475474 Z" fill-opacity="0.75"></path>
56
+ <path d="M8.468162,18.2475474 C7.22182045,18.2475474 6.19131446,17.2374408 6.19131446,15.9773915 C6.19131446,14.7173421 7.22182045,13.7072355 8.468162,13.7072355 C9.70824943,13.7072355 10.7387124,14.7173421 10.7387124,15.9773915 C10.7387124,17.2374408 9.72220487,18.2475474 8.468162,18.2475474 Z" fill-opacity="0.75"></path>
57
+ </g>
58
+ </g>
59
+ </svg>
60
+ </button>
61
+ </div>
62
+ </div>
web_assets/stylesheet/ChuanhuChat.css CHANGED
@@ -13,14 +13,19 @@
13
  --switch-checkbox-color-dark: #515151;
14
 
15
  --chatbot-blur-background-color: #F3F3F366;
 
 
16
 
17
  --menu-width: 320px;
18
  --menu-background-fill: var(--background-fill-primary);
19
 
20
  --toolbox-width: 280px;
21
  --toolbox-background-fill: var(--background-fill-secondary);
 
22
  .dark {
23
  --chatbot-blur-background-color: #12111166;
 
 
24
  }
25
  }
26
 
@@ -122,17 +127,23 @@ body.popup-open {
122
 
123
  #chatbot-ctrl-btns {
124
  align-self: end;
 
125
  }
126
  #submit-btn, #cancel-btn {
127
  height: 42px !important;
 
 
 
128
  }
129
  #submit-btn::before {
130
- content: url("data:image/svg+xml, %3Csvg width='21px' height='20px' viewBox='0 0 21 20' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E %3Cg id='page' stroke='none' stroke-width='1' fill='none' fill-rule='evenodd'%3E %3Cg id='send' transform='translate(0.435849, 0.088463)' fill='%23FFFFFF' fill-rule='nonzero'%3E %3Cpath d='M0.579148261,0.0428666046 C0.301105539,-0.0961547561 -0.036517765,0.122307382 0.0032026237,0.420210298 L1.4927172,18.1553639 C1.5125774,18.4334066 1.79062012,18.5922882 2.04880264,18.4929872 L8.24518329,15.8913017 L11.6412765,19.7441794 C11.8597387,19.9825018 12.2370824,19.8832008 12.3165231,19.5852979 L13.9450591,13.4882182 L19.7839562,11.0255541 C20.0619989,10.8865327 20.0818591,10.4694687 19.7839562,10.3105871 L0.579148261,0.0428666046 Z M11.6138902,17.0883151 L9.85385903,14.7195502 L0.718169621,0.618812241 L12.69945,12.9346347 L11.6138902,17.0883151 Z' id='shape'%3E%3C/path%3E %3C/g%3E %3C/g%3E %3C/svg%3E");
131
  height: 21px;
 
132
  }
133
  #cancel-btn::before {
134
  content: url("data:image/svg+xml,%3Csvg width='21px' height='21px' viewBox='0 0 21 21' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E %3Cg id='pg' stroke='none' stroke-width='1' fill='none' fill-rule='evenodd'%3E %3Cpath d='M10.2072007,20.088463 C11.5727865,20.088463 12.8594566,19.8259823 14.067211,19.3010209 C15.2749653,18.7760595 16.3386126,18.0538087 17.2581528,17.1342685 C18.177693,16.2147282 18.8982283,15.1527965 19.4197586,13.9484733 C19.9412889,12.7441501 20.202054,11.4557644 20.202054,10.0833163 C20.202054,8.71773046 19.9395733,7.43106036 19.4146119,6.22330603 C18.8896505,5.01555169 18.1673997,3.95018885 17.2478595,3.0272175 C16.3283192,2.10424615 15.2646719,1.3837109 14.0569176,0.865611739 C12.8491633,0.34751258 11.5624932,0.088463 10.1969073,0.088463 C8.83132146,0.088463 7.54636692,0.34751258 6.34204371,0.865611739 C5.1377205,1.3837109 4.07407321,2.10424615 3.15110186,3.0272175 C2.22813051,3.95018885 1.5058797,5.01555169 0.984349419,6.22330603 C0.46281914,7.43106036 0.202054,8.71773046 0.202054,10.0833163 C0.202054,11.4557644 0.4645347,12.7441501 0.9894961,13.9484733 C1.5144575,15.1527965 2.23670831,16.2147282 3.15624854,17.1342685 C4.07578877,18.0538087 5.1377205,18.7760595 6.34204371,19.3010209 C7.54636692,19.8259823 8.83475258,20.088463 10.2072007,20.088463 Z M10.2072007,18.2562448 C9.07493099,18.2562448 8.01471483,18.0452309 7.0265522,17.6232031 C6.03838956,17.2011753 5.17031614,16.6161693 4.42233192,15.8681851 C3.6743477,15.1202009 3.09105726,14.2521274 2.67246059,13.2639648 C2.25386392,12.2758022 2.04456558,11.215586 2.04456558,10.0833163 C2.04456558,8.95104663 2.25386392,7.89083047 2.67246059,6.90266784 C3.09105726,5.9145052 3.6743477,5.04643178 4.42233192,4.29844756 C5.17031614,3.55046334 6.036674,2.9671729 7.02140552,2.54857623 C8.00613703,2.12997956 9.06463763,1.92068122 10.1969073,1.92068122 C11.329177,1.92068122 12.3911087,2.12997956 13.3827025,2.54857623 C14.3742962,2.9671729 15.2440852,3.55046334 15.9920694,4.29844756 C16.7400537,5.04643178 17.3233441,5.9145052 17.7419408,6.90266784 C18.1605374,7.89083047 18.3698358,8.95104663 18.3698358,10.0833163 C18.3698358,11.215586 18.1605374,12.2758022 17.7419408,13.2639648 C17.3233441,14.2521274 16.7400537,15.1202009 15.9920694,15.8681851 C15.2440852,16.6161693 14.3760118,17.2011753 13.3878492,17.6232031 C12.3996865,18.0452309 11.3394704,18.2562448 10.2072007,18.2562448 Z M7.65444721,13.6242324 L12.7496608,13.6242324 C13.0584616,13.6242324 13.3003556,13.5384544 13.4753427,13.3668984 C13.6503299,13.1953424 13.7378234,12.9585951 13.7378234,12.6566565 L13.7378234,7.49968276 C13.7378234,7.19774418 13.6503299,6.96099688 13.4753427,6.78944087 C13.3003556,6.61788486 13.0584616,6.53210685 12.7496608,6.53210685 L7.65444721,6.53210685 C7.33878414,6.53210685 7.09345904,6.61788486 6.91847191,6.78944087 C6.74348478,6.96099688 6.65599121,7.19774418 6.65599121,7.49968276 L6.65599121,12.6566565 C6.65599121,12.9585951 6.74348478,13.1953424 6.91847191,13.3668984 C7.09345904,13.5384544 7.33878414,13.6242324 7.65444721,13.6242324 Z' id='shape' fill='%23FF3B30' fill-rule='nonzero'%3E%3C/path%3E %3C/g%3E %3C/svg%3E");
135
  height: 21px;
 
136
  }
137
 
138
  #chatbot-buttons button {
@@ -357,18 +368,19 @@ body.popup-open {
357
  display: flex;
358
  justify-content: center;
359
  /* padding: 24px; */
360
- padding: 8px 6px;
361
- min-height: 120px;
362
- max-height: 210px;
363
  background: var(--chatbot-blur-background-color);
364
  -webkit-backdrop-filter: blur(24px);
365
  backdrop-filter: blur(24px);
366
  }
367
 
368
  #chatbot-input-box {
369
- max-width: 1024px;
370
  /* margin: 0 auto; */
371
  gap: 20px;
 
372
  display: flex;
373
  background: none;
374
  align-self: end;
@@ -380,6 +392,66 @@ body.popup-open {
380
  flex-wrap: nowrap;
381
  }
382
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
383
  /* default invisible */
384
  #menu-area, #toolbox-area {
385
  width: 0;
@@ -830,3 +902,4 @@ body.popup-open {
830
  #chuanhu-body {
831
  transition: top 0.3s ease-in-out, display 0.3s ease;
832
  } */
 
 
13
  --switch-checkbox-color-dark: #515151;
14
 
15
  --chatbot-blur-background-color: #F3F3F366;
16
+ --chatbot-input-background-color: rgba(255, 255, 255, 0.32);
17
+ --chatbot-input-more-background-color: #FFFFFF;
18
 
19
  --menu-width: 320px;
20
  --menu-background-fill: var(--background-fill-primary);
21
 
22
  --toolbox-width: 280px;
23
  --toolbox-background-fill: var(--background-fill-secondary);
24
+
25
  .dark {
26
  --chatbot-blur-background-color: #12111166;
27
+ --chatbot-input-background-color: rgba(144, 144, 144, 0.32);
28
+ --chatbot-input-more-background-color: #3C3C3C;
29
  }
30
  }
31
 
 
127
 
128
  #chatbot-ctrl-btns {
129
  align-self: end;
130
+ max-width: 42px;
131
  }
132
  #submit-btn, #cancel-btn {
133
  height: 42px !important;
134
+ width: 42px !important;
135
+ border-radius: 50%;
136
+ transform: scale(0.8);
137
  }
138
  #submit-btn::before {
139
+ content: url("data:image/svg+xml, %3Csvg width='21px' height='21px' viewBox='0 0 21 20' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E %3Cg id='page' stroke='none' stroke-width='1' fill='none' fill-rule='evenodd'%3E %3Cg id='send' transform='translate(0.435849, 0.088463)' fill='%23FFFFFF' fill-rule='nonzero'%3E %3Cpath d='M0.579148261,0.0428666046 C0.301105539,-0.0961547561 -0.036517765,0.122307382 0.0032026237,0.420210298 L1.4927172,18.1553639 C1.5125774,18.4334066 1.79062012,18.5922882 2.04880264,18.4929872 L8.24518329,15.8913017 L11.6412765,19.7441794 C11.8597387,19.9825018 12.2370824,19.8832008 12.3165231,19.5852979 L13.9450591,13.4882182 L19.7839562,11.0255541 C20.0619989,10.8865327 20.0818591,10.4694687 19.7839562,10.3105871 L0.579148261,0.0428666046 Z M11.6138902,17.0883151 L9.85385903,14.7195502 L0.718169621,0.618812241 L12.69945,12.9346347 L11.6138902,17.0883151 Z' id='shape'%3E%3C/path%3E %3C/g%3E %3C/g%3E %3C/svg%3E");
140
  height: 21px;
141
+ width: 21px;
142
  }
143
  #cancel-btn::before {
144
  content: url("data:image/svg+xml,%3Csvg width='21px' height='21px' viewBox='0 0 21 21' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E %3Cg id='pg' stroke='none' stroke-width='1' fill='none' fill-rule='evenodd'%3E %3Cpath d='M10.2072007,20.088463 C11.5727865,20.088463 12.8594566,19.8259823 14.067211,19.3010209 C15.2749653,18.7760595 16.3386126,18.0538087 17.2581528,17.1342685 C18.177693,16.2147282 18.8982283,15.1527965 19.4197586,13.9484733 C19.9412889,12.7441501 20.202054,11.4557644 20.202054,10.0833163 C20.202054,8.71773046 19.9395733,7.43106036 19.4146119,6.22330603 C18.8896505,5.01555169 18.1673997,3.95018885 17.2478595,3.0272175 C16.3283192,2.10424615 15.2646719,1.3837109 14.0569176,0.865611739 C12.8491633,0.34751258 11.5624932,0.088463 10.1969073,0.088463 C8.83132146,0.088463 7.54636692,0.34751258 6.34204371,0.865611739 C5.1377205,1.3837109 4.07407321,2.10424615 3.15110186,3.0272175 C2.22813051,3.95018885 1.5058797,5.01555169 0.984349419,6.22330603 C0.46281914,7.43106036 0.202054,8.71773046 0.202054,10.0833163 C0.202054,11.4557644 0.4645347,12.7441501 0.9894961,13.9484733 C1.5144575,15.1527965 2.23670831,16.2147282 3.15624854,17.1342685 C4.07578877,18.0538087 5.1377205,18.7760595 6.34204371,19.3010209 C7.54636692,19.8259823 8.83475258,20.088463 10.2072007,20.088463 Z M10.2072007,18.2562448 C9.07493099,18.2562448 8.01471483,18.0452309 7.0265522,17.6232031 C6.03838956,17.2011753 5.17031614,16.6161693 4.42233192,15.8681851 C3.6743477,15.1202009 3.09105726,14.2521274 2.67246059,13.2639648 C2.25386392,12.2758022 2.04456558,11.215586 2.04456558,10.0833163 C2.04456558,8.95104663 2.25386392,7.89083047 2.67246059,6.90266784 C3.09105726,5.9145052 3.6743477,5.04643178 4.42233192,4.29844756 C5.17031614,3.55046334 6.036674,2.9671729 7.02140552,2.54857623 C8.00613703,2.12997956 9.06463763,1.92068122 10.1969073,1.92068122 C11.329177,1.92068122 12.3911087,2.12997956 13.3827025,2.54857623 C14.3742962,2.9671729 15.2440852,3.55046334 15.9920694,4.29844756 C16.7400537,5.04643178 17.3233441,5.9145052 17.7419408,6.90266784 C18.1605374,7.89083047 18.3698358,8.95104663 18.3698358,10.0833163 C18.3698358,11.215586 18.1605374,12.2758022 17.7419408,13.2639648 C17.3233441,14.2521274 16.7400537,15.1202009 15.9920694,15.8681851 C15.2440852,16.6161693 14.3760118,17.2011753 13.3878492,17.6232031 C12.3996865,18.0452309 11.3394704,18.2562448 10.2072007,18.2562448 Z M7.65444721,13.6242324 L12.7496608,13.6242324 C13.0584616,13.6242324 13.3003556,13.5384544 13.4753427,13.3668984 C13.6503299,13.1953424 13.7378234,12.9585951 13.7378234,12.6566565 L13.7378234,7.49968276 C13.7378234,7.19774418 13.6503299,6.96099688 13.4753427,6.78944087 C13.3003556,6.61788486 13.0584616,6.53210685 12.7496608,6.53210685 L7.65444721,6.53210685 C7.33878414,6.53210685 7.09345904,6.61788486 6.91847191,6.78944087 C6.74348478,6.96099688 6.65599121,7.19774418 6.65599121,7.49968276 L6.65599121,12.6566565 C6.65599121,12.9585951 6.74348478,13.1953424 6.91847191,13.3668984 C7.09345904,13.5384544 7.33878414,13.6242324 7.65444721,13.6242324 Z' id='shape' fill='%23FF3B30' fill-rule='nonzero'%3E%3C/path%3E %3C/g%3E %3C/svg%3E");
145
  height: 21px;
146
+ width: 21px;
147
  }
148
 
149
  #chatbot-buttons button {
 
368
  display: flex;
369
  justify-content: center;
370
  /* padding: 24px; */
371
+ /* padding: 8px 6px; */
372
+ min-height: 82px;
373
+ max-height: 166px;
374
  background: var(--chatbot-blur-background-color);
375
  -webkit-backdrop-filter: blur(24px);
376
  backdrop-filter: blur(24px);
377
  }
378
 
379
  #chatbot-input-box {
380
+ max-width: 800px;
381
  /* margin: 0 auto; */
382
  gap: 20px;
383
+ padding: 16px 24px 24px;
384
  display: flex;
385
  background: none;
386
  align-self: end;
 
392
  flex-wrap: nowrap;
393
  }
394
 
395
+ button.chatbot-input-more-btn {
396
+ margin: 5px;
397
+ height: 32px;
398
+ width: 32px;
399
+ border-radius: 50%;
400
+ }
401
+ button.chatbot-input-more-btn:hover .sm-round-bg {
402
+ fill-opacity: 0.2125;
403
+ }
404
+ button.chatbot-input-more-btn:active .sm-round-bg {
405
+ fill-opacity: 0.25;
406
+ }
407
+
408
+ #chatbot-input-more-area {
409
+ position: absolute;
410
+ display: flex;
411
+ flex-direction: column;
412
+ bottom: 60px;
413
+ min-width: 120px;
414
+ z-index: 50;
415
+ border-radius: 6px;
416
+ box-shadow: var(--shadow-sm);
417
+ background: var(--chatbot-input-more-background-color);
418
+
419
+ }
420
+ #chatbot-input-more-area > div {
421
+ min-width: 120px;
422
+ padding: 2px;
423
+ align-content: center;
424
+ /* display: flex; */
425
+ border-bottom: 0.5px solid var(--border-color-primary);
426
+ }
427
+ #chatbot-input-more-area > div:last-child {
428
+ border-bottom: none;
429
+ }
430
+ #chatbot-input-more-area > div > label {
431
+ padding: 6px 8px;
432
+ border-radius: 4px;
433
+ display: flex;
434
+ align-items: center;
435
+ justify-content: space-between;
436
+ cursor: pointer;
437
+ }
438
+ #chatbot-input-more-area > div:hover > label {
439
+ background: var(--input-background-fill-hover);
440
+ }
441
+ #chatbot-input-more-area > div > label button {
442
+ margin: 0;
443
+ width: 100%;
444
+ display: flex;
445
+ justify-content: space-between;
446
+ align-items: center;
447
+ }
448
+ .chatbot-input-more-icon {
449
+ margin-right: 12px;
450
+ }
451
+ .chatbot-input-more-span {
452
+ white-space: nowrap;
453
+ }
454
+
455
  /* default invisible */
456
  #menu-area, #toolbox-area {
457
  width: 0;
 
902
  #chuanhu-body {
903
  transition: top 0.3s ease-in-out, display 0.3s ease;
904
  } */
905
+
web_assets/stylesheet/chatbot.css CHANGED
@@ -55,10 +55,28 @@ hr.append-display {
55
  border: none !important;
56
  }
57
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
58
  #user-input-tb {
59
  padding: 0 !important;
60
- border: 1px solid rgba(167, 167, 167, 0.5) !important;
61
- border-radius: 21px !important;
62
  }
63
  #user-input-tb textarea {
64
  /* max-height: 110px; */
@@ -157,7 +175,7 @@ hr.append-display {
157
  flex-direction: column;
158
  padding-inline: 20px;
159
  padding-top: 72px;
160
- padding-bottom: 220px;
161
  }
162
  #chuanhu-chatbot>.wrapper>.wrap .message-wrap {
163
  align-self: center;
 
55
  border: none !important;
56
  }
57
 
58
+
59
+
60
+ #chatbot-input-row {
61
+ align-items: end;
62
+ gap: 6px;
63
+ }
64
+ #chatbot-input-row .gradio-html {
65
+ min-width: 0;
66
+ max-width: 42px;
67
+ width: 42px;
68
+ }
69
+ #chatbot-input-tb-row {
70
+ gap: 0;
71
+ justify-content: end;
72
+ border-radius: 21px;
73
+ background: var(--chatbot-input-background-color);
74
+ box-shadow: var(--shadow-md);
75
+ }
76
  #user-input-tb {
77
  padding: 0 !important;
78
+ /* border: 1px solid rgba(167, 167, 167, 0.5) !important; */
79
+ /* border-radius: 21px !important; */
80
  }
81
  #user-input-tb textarea {
82
  /* max-height: 110px; */
 
175
  flex-direction: column;
176
  padding-inline: 20px;
177
  padding-top: 72px;
178
+ padding-bottom: 180px;
179
  }
180
  #chuanhu-chatbot>.wrapper>.wrap .message-wrap {
181
  align-self: center;
web_assets/stylesheet/custom-components.css CHANGED
@@ -203,6 +203,7 @@ input:checked + .apSlider::before {
203
  position: relative !important;
204
  border: none !important;
205
  outline: none;
 
206
  width: 40px !important;
207
  height: 22px !important;
208
  border-radius: 11px !important;
 
203
  position: relative !important;
204
  border: none !important;
205
  outline: none;
206
+ margin: 0;
207
  width: 40px !important;
208
  height: 22px !important;
209
  border-radius: 11px !important;