-
-
Notifications
You must be signed in to change notification settings - Fork 120
Handle remote thread archive notifications #187
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -262,7 +262,16 @@ | |
| </a> | ||
| </div> | ||
|
|
||
| <article v-if="message.text.length > 0" class="message-card" :data-role="message.role"> | ||
| <div | ||
| v-if="isContextCompactionMessage(message)" | ||
| class="context-compaction-separator" | ||
| :data-state="message.messageType === 'contextCompaction.live' ? 'live' : 'done'" | ||
| aria-live="polite" | ||
| > | ||
| <span class="context-compaction-text">{{ message.text }}</span> | ||
| </div> | ||
|
|
||
| <article v-else-if="message.text.length > 0" class="message-card" :data-role="message.role"> | ||
| <div v-if="message.isAutomationRun" class="automation-message-label"> | ||
| <span>Sent via automation</span> | ||
| <code v-if="message.automationDisplayName">{{ message.automationDisplayName }}</code> | ||
|
|
@@ -1021,6 +1030,10 @@ function isPlanMessage(message: UiMessage): boolean { | |
| return message.messageType === 'plan' || message.messageType === 'plan.live' | ||
| } | ||
|
|
||
| function isContextCompactionMessage(message: UiMessage): boolean { | ||
| return message.messageType === 'contextCompaction' || message.messageType === 'contextCompaction.live' | ||
| } | ||
|
|
||
| function isTurnErrorMessage(message: UiMessage): boolean { | ||
| return message.messageType === 'turnError' | ||
| } | ||
|
|
@@ -4589,6 +4602,33 @@ onBeforeUnmount(() => { | |
| @apply flex flex-col w-full min-w-0; | ||
| } | ||
|
|
||
| .context-compaction-separator { | ||
| @apply relative my-2 flex w-full max-w-full items-center justify-center text-xs font-medium text-zinc-500 dark:text-zinc-400; | ||
| background: | ||
| linear-gradient( | ||
| to bottom, | ||
| transparent calc(50% - 0.5px), | ||
| rgb(228 228 231) calc(50% - 0.5px), | ||
| rgb(228 228 231) calc(50% + 0.5px), | ||
| transparent calc(50% + 0.5px) | ||
| ); | ||
| } | ||
|
|
||
| .context-compaction-text { | ||
| @apply relative shrink-0 whitespace-nowrap bg-white px-3 dark:bg-zinc-950; | ||
| } | ||
|
|
||
| :global(.dark) .context-compaction-separator { | ||
| background: | ||
| linear-gradient( | ||
| to bottom, | ||
| transparent calc(50% - 0.5px), | ||
| rgb(63 63 70) calc(50% - 0.5px), | ||
| rgb(63 63 70) calc(50% + 0.5px), | ||
| transparent calc(50% + 0.5px) | ||
| ); | ||
| } | ||
|
Comment on lines
+4621
to
+4630
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion | 🟠 Major | ⚡ Quick win Move dark-theme override for context compaction separator to Line 4621 adds a decisive dark-mode surface rule in a component-scoped stylesheet. For this shared conversation surface, keep dark-theme override wiring in Proposed change-:global(.dark) .context-compaction-separator {
- background:
- linear-gradient(
- to bottom,
- transparent calc(50% - 0.5px),
- rgb(63 63 70) calc(50% - 0.5px),
- rgb(63 63 70) calc(50% + 0.5px),
- transparent calc(50% + 0.5px)
- );
-}/* add in src/style.css */
.dark .context-compaction-separator {
background:
linear-gradient(
to bottom,
transparent calc(50% - 0.5px),
rgb(63 63 70) calc(50% - 0.5px),
rgb(63 63 70) calc(50% + 0.5px),
transparent calc(50% + 0.5px)
);
}As per coding guidelines: “ 🤖 Prompt for AI Agents |
||
|
|
||
| .request-card { | ||
| @apply w-full max-w-[min(var(--chat-column-max,45rem),100%)] rounded-xl border border-amber-300 bg-amber-50 px-4 py-3 flex flex-col gap-2; | ||
| } | ||
|
|
@@ -5184,6 +5224,13 @@ onBeforeUnmount(() => { | |
| @apply w-full max-w-full; | ||
| } | ||
|
|
||
| .conversation-item[data-message-type='contextCompaction'] .message-stack, | ||
| .conversation-item[data-message-type='contextCompaction'] .message-body, | ||
| .conversation-item[data-message-type='contextCompaction.live'] .message-stack, | ||
| .conversation-item[data-message-type='contextCompaction.live'] .message-body { | ||
| @apply w-full max-w-full; | ||
| } | ||
|
|
||
| .worked-separator-wrap { | ||
| @apply w-full flex flex-col gap-0; | ||
| } | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Localize newly added context-compaction copy.
Line 796 and Line 1007 introduce new user-facing text as hardcoded English, while this component otherwise uses
t(...). This will bypass localization.💡 Suggested fix
Also applies to: 1007-1013
🤖 Prompt for AI Agents