123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518 |
- @import "../styles/animation.scss";
- .chat-input-actions {
- display: flex;
- flex-wrap: wrap;
- .chat-input-action {
- display: inline-flex;
- border-radius: 20px;
- font-size: 12px;
- background-color: var(--white);
- color: var(--black);
- border: var(--border-in-light);
- padding: 4px 10px;
- animation: slide-in ease 0.3s;
- box-shadow: var(--card-shadow);
- transition: width ease 0.3s;
- align-items: center;
- height: 16px;
- width: var(--icon-width);
- overflow: hidden;
- &:not(:last-child) {
- margin-right: 5px;
- }
- .text {
- white-space: nowrap;
- padding-left: 5px;
- opacity: 0;
- transform: translateX(-5px);
- transition: all ease 0.3s;
- pointer-events: none;
- }
- &:hover {
- --delay: 0.5s;
- width: var(--full-width);
- transition-delay: var(--delay);
- .text {
- transition-delay: var(--delay);
- opacity: 1;
- transform: translate(0);
- }
- }
- .text,
- .icon {
- display: flex;
- align-items: center;
- justify-content: center;
- }
- }
- }
- .prompt-toast {
- position: absolute;
- bottom: -50px;
- z-index: 999;
- display: flex;
- justify-content: center;
- width: calc(100% - 40px);
- .prompt-toast-inner {
- display: flex;
- justify-content: center;
- align-items: center;
- font-size: 12px;
- background-color: var(--white);
- color: var(--black);
- border: var(--border-in-light);
- box-shadow: var(--card-shadow);
- padding: 10px 20px;
- border-radius: 100px;
- animation: slide-in-from-top ease 0.3s;
- .prompt-toast-content {
- margin-left: 10px;
- }
- }
- }
- .section-title {
- font-size: 12px;
- font-weight: bold;
- margin-bottom: 10px;
- display: flex;
- justify-content: space-between;
- align-items: center;
- .section-title-action {
- display: flex;
- align-items: center;
- }
- }
- .context-prompt {
- .context-prompt-insert {
- display: flex;
- justify-content: center;
- padding: 4px;
- opacity: 0.2;
- transition: all ease 0.3s;
- background-color: rgba(0, 0, 0, 0);
- cursor: pointer;
- border-radius: 4px;
- margin-top: 4px;
- margin-bottom: 4px;
- &:hover {
- opacity: 1;
- background-color: rgba(0, 0, 0, 0.05);
- }
- }
- .context-prompt-row {
- display: flex;
- justify-content: center;
- width: 100%;
- &:hover {
- .context-drag {
- opacity: 1;
- }
- }
- .context-drag {
- display: flex;
- align-items: center;
- opacity: 0.5;
- transition: all ease 0.3s;
- }
- .context-role {
- margin-right: 10px;
- }
- .context-content {
- flex: 1;
- max-width: 100%;
- text-align: left;
- }
- .context-delete-button {
- margin-left: 10px;
- }
- }
- .context-prompt-button {
- flex: 1;
- }
- }
- .memory-prompt {
- margin: 20px 0;
- .memory-prompt-content {
- background-color: var(--white);
- color: var(--black);
- border: var(--border-in-light);
- border-radius: 10px;
- padding: 10px;
- font-size: 12px;
- user-select: text;
- }
- }
- .clear-context {
- margin: 20px 0 0 0;
- padding: 4px 0;
- border-top: var(--border-in-light);
- border-bottom: var(--border-in-light);
- box-shadow: var(--card-shadow) inset;
- display: flex;
- justify-content: center;
- align-items: center;
- color: var(--black);
- transition: all ease 0.3s;
- cursor: pointer;
- overflow: hidden;
- position: relative;
- font-size: 12px;
- animation: slide-in ease 0.3s;
- $linear: linear-gradient(
- to right,
- rgba(0, 0, 0, 0),
- rgba(0, 0, 0, 1),
- rgba(0, 0, 0, 0)
- );
- mask-image: $linear;
- @mixin show {
- transform: translateY(0);
- position: relative;
- transition: all ease 0.3s;
- opacity: 1;
- }
- @mixin hide {
- transform: translateY(-50%);
- position: absolute;
- transition: all ease 0.1s;
- opacity: 0;
- }
- &-tips {
- @include show;
- opacity: 0.5;
- }
- &-revert-btn {
- color: var(--primary);
- @include hide;
- }
- &:hover {
- opacity: 1;
- border-color: var(--primary);
- .clear-context-tips {
- @include hide;
- }
- .clear-context-revert-btn {
- @include show;
- }
- }
- }
- .chat {
- display: flex;
- flex-direction: column;
- position: relative;
- height: 100%;
- }
- .chat-body {
- flex: 1;
- overflow: auto;
- overflow-x: hidden;
- padding: 20px;
- padding-bottom: 40px;
- position: relative;
- overscroll-behavior: none;
- }
- .chat-body-main-title {
- cursor: pointer;
- &:hover {
- text-decoration: underline;
- }
- }
- @media only screen and (max-width: 600px) {
- .chat-body-title {
- text-align: center;
- }
- }
- .chat-message {
- display: flex;
- flex-direction: row;
- &:last-child {
- animation: slide-in ease 0.3s;
- }
- }
- .chat-message-user {
- display: flex;
- flex-direction: row-reverse;
- .chat-message-header {
- flex-direction: row-reverse;
- }
- }
- .chat-message-header {
- margin-top: 20px;
- display: flex;
- align-items: center;
- .chat-message-actions {
- display: flex;
- box-sizing: border-box;
- font-size: 12px;
- align-items: flex-end;
- justify-content: space-between;
- transition: all ease 0.3s;
- transform: scale(0.9) translateY(5px);
- margin: 0 10px;
- opacity: 0;
- pointer-events: none;
- .chat-input-actions {
- display: flex;
- flex-wrap: nowrap;
- }
- }
- }
- .chat-message-container {
- max-width: var(--message-max-width);
- display: flex;
- flex-direction: column;
- align-items: flex-start;
- &:hover {
- .chat-message-edit {
- opacity: 0.9;
- }
- .chat-message-actions {
- opacity: 1;
- pointer-events: all;
- transform: scale(1) translateY(0);
- }
- }
- }
- .chat-message-user > .chat-message-container {
- align-items: flex-end;
- }
- .chat-message-avatar {
- position: relative;
- .chat-message-edit {
- position: absolute;
- height: 100%;
- width: 100%;
- overflow: hidden;
- display: flex;
- align-items: center;
- justify-content: center;
- opacity: 0;
- transition: all ease 0.3s;
- button {
- padding: 7px;
- }
- }
- /* Specific styles for iOS devices */
- @media screen and (max-device-width: 812px) and (-webkit-min-device-pixel-ratio: 2) {
- @supports (-webkit-touch-callout: none) {
- .chat-message-edit {
- top: -8%;
- }
- }
- }
- }
- .chat-message-status {
- font-size: 12px;
- color: #aaa;
- line-height: 1.5;
- margin-top: 5px;
- }
- .chat-message-item {
- box-sizing: border-box;
- max-width: 100%;
- margin-top: 10px;
- border-radius: 10px;
- background-color: rgba(0, 0, 0, 0.05);
- padding: 10px;
- font-size: 14px;
- user-select: text;
- word-break: break-word;
- border: var(--border-in-light);
- position: relative;
- transition: all ease 0.3s;
- }
- .chat-message-action-date {
- font-size: 12px;
- opacity: 0.2;
- white-space: nowrap;
- transition: all ease 0.6s;
- color: var(--black);
- text-align: right;
- width: 100%;
- box-sizing: border-box;
- padding-right: 10px;
- pointer-events: none;
- z-index: 1;
- }
- .chat-message-user > .chat-message-container > .chat-message-item {
- background-color: var(--second);
- &:hover {
- min-width: 0;
- }
- }
- .chat-input-panel {
- position: relative;
- width: 100%;
- padding: 20px;
- padding-top: 10px;
- box-sizing: border-box;
- flex-direction: column;
- border-top: var(--border-in-light);
- box-shadow: var(--card-shadow);
- .chat-input-actions {
- .chat-input-action {
- margin-bottom: 10px;
- }
- }
- }
- @mixin single-line {
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- }
- .prompt-hints {
- min-height: 20px;
- width: 100%;
- max-height: 50vh;
- overflow: auto;
- display: flex;
- flex-direction: column-reverse;
- background-color: var(--white);
- border: var(--border-in-light);
- border-radius: 10px;
- margin-bottom: 10px;
- box-shadow: var(--shadow);
- .prompt-hint {
- color: var(--black);
- padding: 6px 10px;
- animation: slide-in ease 0.3s;
- cursor: pointer;
- transition: all ease 0.3s;
- border: transparent 1px solid;
- margin: 4px;
- border-radius: 8px;
- &:not(:last-child) {
- margin-top: 0;
- }
- .hint-title {
- font-size: 12px;
- font-weight: bolder;
- @include single-line();
- }
- .hint-content {
- font-size: 12px;
- @include single-line();
- }
- &-selected,
- &:hover {
- border-color: var(--primary);
- }
- }
- }
- .chat-input-panel-inner {
- display: flex;
- flex: 1;
- }
- .chat-input {
- height: 100%;
- width: 100%;
- border-radius: 10px;
- border: var(--border-in-light);
- box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.03);
- background-color: var(--white);
- color: var(--black);
- font-family: inherit;
- padding: 10px 90px 10px 14px;
- resize: none;
- outline: none;
- box-sizing: border-box;
- min-height: 68px;
- }
- .chat-input:focus {
- border: 1px solid var(--primary);
- }
- .chat-input-send {
- background-color: var(--primary);
- color: white;
- position: absolute;
- right: 30px;
- bottom: 32px;
- }
- @media only screen and (max-width: 600px) {
- .chat-input {
- font-size: 16px;
- }
- .chat-input-send {
- bottom: 30px;
- }
- }
|