Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

style(task): add text to dispatch agent btn (#4425)

Seamus4013ca3f5ffe
diff --git a/js/app/packages/app/component/ChatWithAgentButton.tsx b/js/app/packages/app/component/ChatWithAgentButton.tsx
index 353af71884..f22802f9f0 100644
--- a/js/app/packages/app/component/ChatWithAgentButton.tsx
+++ b/js/app/packages/app/component/ChatWithAgentButton.tsx
@@ -133,7 +133,7 @@ export function AskMacroButton(props: { entity: ChatWithAgentEntity }) {
variant="ghost"
size="sm"
depth={2}
- class="gap-1.5 rounded-full px-2 text-ink-extra-muted ring ring-edge-muted"
+ class="gap-1.5 rounded-full px-2 ring ring-edge-muted"
>
<AnimatedStarIcon triggerAnimation={hovering()} />
<span class="text-xs font-medium">Ask Macro</span>
diff --git a/js/app/packages/block-md/component/DispatchAgentMenu.tsx b/js/app/packages/block-md/component/DispatchAgentMenu.tsx
index 959708a005..5f25cfc09d 100644
--- a/js/app/packages/block-md/component/DispatchAgentMenu.tsx
+++ b/js/app/packages/block-md/component/DispatchAgentMenu.tsx
@@ -19,7 +19,7 @@ import type { CommentThread } from '@service-storage/generated/schemas/commentTh
import { createCallback } from '@solid-primitives/rootless';
import { makePersisted } from '@solid-primitives/storage';
import { Button, ButtonGroup, Dropdown } from '@ui';
-import { type Component, createSignal, For, type JSX } from 'solid-js';
+import { type Component, createSignal, For, type JSX, Show } from 'solid-js';
import { Dynamic } from 'solid-js/web';
import {
discussionThreads,
@@ -198,7 +198,9 @@ export function useDispatchAgentAction() {
};
}
-export function DispatchAgentButton() {
+export function DispatchAgentButton(
+ props: { showPrimaryLabel?: boolean } = {}
+) {
const [open, setOpen] = createSignal(false);
const { blockId, lastUsed, executeAction, executeLastUsed } =
useDispatchAgentAction();
@@ -207,9 +209,9 @@ export function DispatchAgentButton() {
<Dropdown open={open()} onOpenChange={setOpen}>
<ButtonGroup
variant="ghost"
- size="icon-sm"
+ size={props.showPrimaryLabel ? 'sm' : 'icon-sm'}
depth={2}
- class="rounded-full text-ink-extra-muted ring ring-edge-muted"
+ class="rounded-full ring ring-edge-muted"
>
<Button
onClick={executeLastUsed}
@@ -220,6 +222,11 @@ export function DispatchAgentButton() {
component={lastUsed().buttonIcon ?? lastUsed().icon}
class="size-3!"
/>
+ <Show when={props.showPrimaryLabel}>
+ <span class="max-w-36 truncate text-xs font-medium">
+ {lastUsed().name}
+ </span>
+ </Show>
</Button>
<ButtonGroup.Divider />
<Dropdown.Trigger
diff --git a/js/app/packages/block-md/component/Notebook.tsx b/js/app/packages/block-md/component/Notebook.tsx
index 15b8e4c7ee..b8f64c62fe 100644
--- a/js/app/packages/block-md/component/Notebook.tsx
+++ b/js/app/packages/block-md/component/Notebook.tsx
@@ -308,7 +308,7 @@ export function Notebook(props: { loroManager: LoroManager }) {
}}
/>
<Show when={blockAliasedName === 'task' && !isMobile()}>
- <DispatchAgentButton />
+ <DispatchAgentButton showPrimaryLabel />
</Show>
</div>
</SidePanel.Section>