mirror of
https://github.com/block/buzz.git
synced 2026-10-31 22:41:12 +00:00
chore(desktop): satisfy composer file size ratchet
Co-authored-by: Taylor Ho <taylorkmho@gmail.com> Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
This commit is contained in:
parent
7c705123ea
commit
db07f35525
@@ -707,7 +707,6 @@ function MessageComposerImpl({
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
// Escape in edit mode
|
||||
if (
|
||||
event.key === "Escape" &&
|
||||
@@ -733,14 +732,11 @@ function MessageComposerImpl({
|
||||
onCancelEdit,
|
||||
],
|
||||
);
|
||||
|
||||
// ── Media paste + ⌘K link shortcut via Tiptap editorProps ──────────
|
||||
const uploadFileRef = React.useRef(media.uploadFile);
|
||||
uploadFileRef.current = media.uploadFile;
|
||||
|
||||
React.useEffect(() => {
|
||||
if (!richText.editor) return;
|
||||
|
||||
richText.editor.setOptions({
|
||||
editorProps: {
|
||||
...richText.editor.options.editorProps,
|
||||
@@ -758,7 +754,6 @@ function MessageComposerImpl({
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
// --- Buzz code-block paste ---
|
||||
// The code block copy button writes a small Buzz marker alongside
|
||||
// plain text. Use it to paste back as a literal code block so Markdown
|
||||
@@ -785,7 +780,6 @@ function MessageComposerImpl({
|
||||
scrollComposerToBottom();
|
||||
return true;
|
||||
}
|
||||
|
||||
// Restore Buzz snapshots before normal styled-HTML normalization.
|
||||
if (handleAgentSnapshotPaste(event, media.setPendingImeta))
|
||||
return true;
|
||||
@@ -797,18 +791,15 @@ function MessageComposerImpl({
|
||||
_view.pasteHTML(cleanHtml);
|
||||
return true;
|
||||
}
|
||||
|
||||
const plainText = event.clipboardData?.getData("text/plain") ?? "";
|
||||
if (plainText.includes("\n")) {
|
||||
scrollComposerToBottom();
|
||||
}
|
||||
|
||||
return false;
|
||||
},
|
||||
},
|
||||
});
|
||||
}, [media.setPendingImeta, richText.editor, scrollComposerToBottom]);
|
||||
|
||||
// ── Send button state ───────────────────────────────────────────────
|
||||
const sendDisabled = React.useMemo(
|
||||
() =>
|
||||
@@ -828,7 +819,6 @@ function MessageComposerImpl({
|
||||
media.queuedAttachments.length,
|
||||
],
|
||||
);
|
||||
|
||||
const handleCaptureSelection = React.useCallback(() => {}, []);
|
||||
|
||||
const handlePaperclipClick = React.useCallback(() => {
|
||||
|
||||
@@ -185,7 +185,6 @@ export function useMentionSendFlow({
|
||||
pubkeys: [] as string[],
|
||||
};
|
||||
}
|
||||
|
||||
const managedAgentsByPubkey = await getManagedAgentsByPubkey();
|
||||
for (const agent of preparedManagedAgents) {
|
||||
managedAgentsByPubkey.set(normalizePubkey(agent.pubkey), agent);
|
||||
@@ -196,13 +195,11 @@ export function useMentionSendFlow({
|
||||
]);
|
||||
const errors: string[] = [];
|
||||
const pubkeys: string[] = [];
|
||||
|
||||
for (const pubkey of uniqueNormalizedPubkeys(mentionPubkeys)) {
|
||||
const agent = managedAgentsByPubkey.get(pubkey);
|
||||
if (!agent) {
|
||||
continue;
|
||||
}
|
||||
|
||||
try {
|
||||
if (participantPubkeys.has(pubkey)) {
|
||||
if (isProviderBackedAgent(agent)) {
|
||||
@@ -229,7 +226,6 @@ export function useMentionSendFlow({
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
errors,
|
||||
pubkeys: uniqueNormalizedPubkeys(pubkeys),
|
||||
|
||||
Reference in New Issue
Block a user