chat.module.scss 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204
  1. @import "../styles/animation.scss";
  2. .chat-input-actions {
  3. display: flex;
  4. flex-wrap: wrap;
  5. .chat-input-action {
  6. display: inline-flex;
  7. border-radius: 20px;
  8. font-size: 12px;
  9. background-color: var(--white);
  10. color: var(--black);
  11. border: var(--border-in-light);
  12. padding: 4px 10px;
  13. animation: slide-in ease 0.3s;
  14. box-shadow: var(--card-shadow);
  15. transition: all ease 0.3s;
  16. margin-bottom: 10px;
  17. align-items: center;
  18. height: 16px;
  19. width: var(--icon-width);
  20. &:not(:last-child) {
  21. margin-right: 5px;
  22. }
  23. .text {
  24. white-space: nowrap;
  25. padding-left: 5px;
  26. opacity: 0;
  27. transform: translateX(-5px);
  28. transition: all ease 0.3s;
  29. transition-delay: 0.1s;
  30. pointer-events: none;
  31. }
  32. &:hover {
  33. width: var(--full-width);
  34. .text {
  35. opacity: 1;
  36. transform: translate(0);
  37. }
  38. }
  39. .text,
  40. .icon {
  41. display: flex;
  42. align-items: center;
  43. justify-content: center;
  44. }
  45. }
  46. }
  47. .prompt-toast {
  48. position: absolute;
  49. bottom: -50px;
  50. z-index: 999;
  51. display: flex;
  52. justify-content: center;
  53. width: calc(100% - 40px);
  54. .prompt-toast-inner {
  55. display: flex;
  56. justify-content: center;
  57. align-items: center;
  58. font-size: 12px;
  59. background-color: var(--white);
  60. color: var(--black);
  61. border: var(--border-in-light);
  62. box-shadow: var(--card-shadow);
  63. padding: 10px 20px;
  64. border-radius: 100px;
  65. animation: slide-in-from-top ease 0.3s;
  66. .prompt-toast-content {
  67. margin-left: 10px;
  68. }
  69. }
  70. }
  71. .section-title {
  72. font-size: 12px;
  73. font-weight: bold;
  74. margin-bottom: 10px;
  75. display: flex;
  76. justify-content: space-between;
  77. align-items: center;
  78. .section-title-action {
  79. display: flex;
  80. align-items: center;
  81. }
  82. }
  83. .context-prompt {
  84. .context-prompt-row {
  85. display: flex;
  86. justify-content: center;
  87. width: 100%;
  88. margin-bottom: 10px;
  89. .context-role {
  90. margin-right: 10px;
  91. }
  92. .context-content {
  93. flex: 1;
  94. max-width: 100%;
  95. text-align: left;
  96. }
  97. .context-delete-button {
  98. margin-left: 10px;
  99. }
  100. }
  101. .context-prompt-button {
  102. flex: 1;
  103. }
  104. }
  105. .memory-prompt {
  106. margin: 20px 0;
  107. .memory-prompt-content {
  108. background-color: var(--white);
  109. color: var(--black);
  110. border: var(--border-in-light);
  111. border-radius: 10px;
  112. padding: 10px;
  113. font-size: 12px;
  114. user-select: text;
  115. }
  116. }
  117. .clear-context {
  118. margin: 20px 0 0 0;
  119. padding: 4px 0;
  120. border-top: var(--border-in-light);
  121. border-bottom: var(--border-in-light);
  122. box-shadow: var(--card-shadow) inset;
  123. display: flex;
  124. justify-content: center;
  125. align-items: center;
  126. color: var(--black);
  127. transition: all ease 0.3s;
  128. cursor: pointer;
  129. overflow: hidden;
  130. position: relative;
  131. font-size: 12px;
  132. animation: slide-in ease 0.3s;
  133. $linear: linear-gradient(
  134. to right,
  135. rgba(0, 0, 0, 0),
  136. rgba(0, 0, 0, 1),
  137. rgba(0, 0, 0, 0)
  138. );
  139. mask-image: $linear;
  140. @mixin show {
  141. transform: translateY(0);
  142. position: relative;
  143. transition: all ease 0.3s;
  144. opacity: 1;
  145. }
  146. @mixin hide {
  147. transform: translateY(-50%);
  148. position: absolute;
  149. transition: all ease 0.1s;
  150. opacity: 0;
  151. }
  152. &-tips {
  153. @include show;
  154. opacity: 0.5;
  155. }
  156. &-revert-btn {
  157. color: var(--primary);
  158. @include hide;
  159. }
  160. &:hover {
  161. opacity: 1;
  162. border-color: var(--primary);
  163. .clear-context-tips {
  164. @include hide;
  165. }
  166. .clear-context-revert-btn {
  167. @include show;
  168. }
  169. }
  170. }