Move to single click audio chat UX on Obsidian client

- Capabillity
  New default UX has 1 long-press to send transcribed audio message

  - Removes the previous default of 3 clicks required to send audio message
    - The record > stop > send process to send audio messages was unclear
  - Still allows stopping message from being sent, if users want to make
    correction to transcribed audio
  - Removes inadvertent long audio transcriptions if user forgets to
    press stop when recording

- Changes
  - Record audio while microphone button pressed
  - Show auto-send 3s countdown timer UI for audio chat message
    Provide a visual cue around send button for how long before audio
    message is automatically sent to Khoj for response
  - Auto-send msg in 3s unless stop send message button clicked
This commit is contained in:
Debanjum Singh Solanky
2024-01-20 15:12:06 +05:30
parent 29a581d2b0
commit f0daa45ae0
2 changed files with 69 additions and 5 deletions

View File

@@ -254,11 +254,35 @@ img {
height: 32px;
width: 32px;
}
#khoj-chat-send .svg-icon {
#khoj-chat-send {
padding: 0;
position: relative;
}
#khoj-chat-send .lucide-arrow-up-circle {
background: var(--khoj-sun);
border-radius: 50%;
color: #222;
}
#khoj-chat-send .lucide-stop-circle {
transform: rotateY(-180deg) rotateZ(-90deg);
}
#khoj-chat-send .lucide-stop-circle circle {
stroke-dasharray: 62px; /* The circumference of the circle with 7px radius */
stroke-dashoffset: 0px;
stroke-linecap: round;
stroke-width: 2px;
stroke: var(--main-text-color);
fill: none;
}
@keyframes countdown {
from {
stroke-dashoffset: 0px;
}
to {
stroke-dashoffset: -62px; /* The circumference of the circle with 7px radius */
}
}
@media (pointer: coarse), (hover: none) {
#khoj-chat-body.abbr[title] {