Skip to content

🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.

✨ feat(messenger): send resource files to linked chat platforms (#18511)

Rdmclin2dd2cf41a2648
diff --git a/apps/server/src/routers/lambda/__tests__/messenger.test.ts b/apps/server/src/routers/lambda/__tests__/messenger.test.ts
index 62de0f98734..51e5ac73e5b 100644
--- a/apps/server/src/routers/lambda/__tests__/messenger.test.ts
+++ b/apps/server/src/routers/lambda/__tests__/messenger.test.ts
@@ -21,7 +21,9 @@ const {
mockFindLinkById,
mockFindLinkByIdWithCredentials,
mockFindByPlatformUser,
+ mockFindFileById,
mockGetBotRuntimeStatus,
+ mockGetFileAccessUrl,
mockGetBuiltinAgent,
mockGetAgentRuntimeRedisClient,
mockGetServerDB,
@@ -40,6 +42,7 @@ const {
mockPeekLinkToken,
mockPollQrStatus,
mockReleaseWechatQrFinalizeLock,
+ mockSendMessengerPush,
mockSlackAuthTest,
mockUpsertForPlatform,
} = vi.hoisted(() => ({
@@ -56,7 +59,9 @@ const {
mockFindLinkById: vi.fn(),
mockFindLinkByIdWithCredentials: vi.fn(),
mockFindByPlatformUser: vi.fn(),
+ mockFindFileById: vi.fn(),
mockGetBotRuntimeStatus: vi.fn(),
+ mockGetFileAccessUrl: vi.fn(),
mockGetBuiltinAgent: vi.fn(),
mockGetAgentRuntimeRedisClient: vi.fn(),
mockGetServerDB: vi.fn(),
@@ -75,6 +80,7 @@ const {
mockPeekLinkToken: vi.fn(),
mockPollQrStatus: vi.fn(),
mockReleaseWechatQrFinalizeLock: vi.fn(),
+ mockSendMessengerPush: vi.fn(),
mockSlackAuthTest: vi.fn(),
mockUpsertForPlatform: vi.fn(),
}));
@@ -200,6 +206,24 @@ vi.mock('@/server/services/bot/platforms/slack/api', () => ({
})),
}));
+vi.mock('@/database/models/file', () => ({
+ FileModel: class {
+ findById = mockFindFileById;
+ },
+}));
+
+vi.mock('@/server/services/file', () => ({
+ FileService: class {
+ getFileAccessUrl = mockGetFileAccessUrl;
+ },
+}));
+
+vi.mock('@/server/services/messenger/push', () => ({
+ getMessengerPushWindow: vi.fn(),
+ MESSENGER_PUSH_PLATFORMS: ['telegram', 'slack', 'discord', 'wechat'],
+ sendMessengerPush: mockSendMessengerPush,
+}));
+
const createCaller = createCallerFactory(messengerRouter);
const buildSlackInstall = () => ({
@@ -861,3 +885,89 @@ describe('messengerRouter.listAgentsForBinding', () => {
expect(mockListUserWorkspaces).not.toHaveBeenCalled();
});
});
+
+describe('messengerRouter.sendMessengerPush', () => {
+ beforeEach(() => {
+ vi.clearAllMocks();
+ mockSendMessengerPush.mockResolvedValue({ status: 'sent' });
+ mockGetFileAccessUrl.mockResolvedValue('https://app.lobehub.com/f/file-1');
+ mockFindFileById.mockResolvedValue({
+ fileType: 'application/pdf',
+ id: 'file-1',
+ name: 'report.pdf',
+ url: 's3://bucket/report.pdf',
+ });
+ });
+
+ const caller = async () => createCaller(await createContextInner({ userId: 'user-1' }));
+
+ it('resolves an attachment to the stable access URL of the owned file row', async () => {
+ await (
+ await caller()
+ ).sendMessengerPush({
+ attachments: [{ fileId: 'file-1', type: 'file' }],
+ content: 'here you go',
+ platform: 'telegram',
+ });
+
+ expect(mockFindFileById).toHaveBeenCalledWith('file-1');
+ expect(mockSendMessengerPush).toHaveBeenCalledWith(
+ expect.objectContaining({
+ attachments: [
+ {
+ fetchUrl: 'https://app.lobehub.com/f/file-1',
+ mimeType: 'application/pdf',
+ name: 'report.pdf',
+ type: 'file',
+ },
+ ],
+ content: 'here you go',
+ platform: 'telegram',
+ userId: 'user-1',
+ }),
+ );
+ });
+
+ // The platform senders materialize `fetchUrl` with a server-side `fetch`, so
+ // a caller-supplied URL would be an SSRF primitive. The schema must reject
+ // the field outright rather than relying on the resolver to overwrite it.
+ it('rejects a caller-supplied fetchUrl or inline data', async () => {
+ const call = await caller();
+
+ await expect(
+ call.sendMessengerPush({
+ attachments: [
+ { fetchUrl: 'http://169.254.169.254/latest/meta-data/', type: 'file' } as never,
+ ],
+ platform: 'telegram',
+ }),
+ ).rejects.toThrow();
+
+ await expect(
+ call.sendMessengerPush({
+ attachments: [{ data: 'ZmFrZQ==', type: 'file' } as never],
+ platform: 'telegram',
+ }),
+ ).rejects.toThrow();
+
+ expect(mockSendMessengerPush).not.toHaveBeenCalled();
+ });
+
+ it('refuses to attach a file the caller does not own', async () => {
+ mockFindFileById.mockResolvedValue(undefined);
+
+ await expect(
+ (await caller()).sendMessengerPush({
+ attachments: [{ fileId: 'someone-elses-file', type: 'image' }],
+ platform: 'slack',
+ }),
+ ).rejects.toThrow('File not found');
+
+ expect(mockSendMessengerPush).not.toHaveBeenCalled();
+ });
+
+ it('requires either content or attachments', async () => {
+ await expect((await caller()).sendMessengerPush({ platform: 'telegram' })).rejects.toThrow();
+ expect(mockSendMessengerPush).not.toHaveBeenCalled();
+ });
+});
diff --git a/apps/server/src/routers/lambda/messenger.ts b/apps/server/src/routers/lambda/messenger.ts
index d99e2acaf33..06e9a6575d1 100644
--- a/apps/server/src/routers/lambda/messenger.ts
+++ b/apps/server/src/routers/lambda/messenger.ts
@@ -19,6 +19,7 @@ import {
type MessengerPlatform,
} from '@/config/messenger';
import { AgentModel } from '@/database/models/agent';
+import { FileModel } from '@/database/models/file';
import type { SafeMessengerAccountLink } from '@/database/models/messengerAccountLink';
import {
MessengerAccountLinkConflictError,
@@ -37,11 +38,13 @@ import { getServerFeatureFlagsStateFromRuntimeConfig } from '@/server/featureFla
import { getAgentRuntimeRedisClient } from '@/server/modules/AgentRuntime/redis';
import { KeyVaultsGateKeeper } from '@/server/modules/KeyVaultsEncrypt';
import { SlackApi } from '@/server/services/bot/platforms/slack/api';
+import type { BotMessageAttachment } from '@/server/services/bot/platforms/types';
import {
wechatLegacyTokenKey,
wechatPendingPushKey,
wechatWindowKey,
} from '@/server/services/bot/platforms/wechat/contextWindow';
+import { FileService } from '@/server/services/file';
import { GatewayService } from '@/server/services/gateway';
import { getBotRuntimeStatus } from '@/server/services/gateway/runtimeStatus';
import {
@@ -842,14 +845,68 @@ export const messengerRouter = router({
*/
sendMessengerPush: messengerProcedure
.input(
- z.object({
- content: z.string().trim().min(1).max(MESSENGER_PUSH_CONTENT_MAX_LENGTH),
- platform: z.enum(MESSENGER_PUSH_PLATFORMS),
- tenantId: z.string().optional(),
- }),
+ z
+ .object({
+ // Attachments are referenced by `fileId` only — deliberately NOT the
+ // `attachmentsInputSchema` shape from botMessage.ts, which also
+ // accepts `data` / `fetchUrl`. The platform senders materialize
+ // `fetchUrl` with a server-side `fetch`, so accepting one here would
+ // let any authenticated caller aim that fetch at an internal address
+ // and have the response uploaded into their own DM. Every field the
+ // senders need is read from the owned file row below instead.
+ attachments: z
+ .array(
+ z.object({
+ fileId: z.string().min(1),
+ type: z.enum(['image', 'file', 'video', 'audio']),
+ }),
+ )
+ .max(10)
+ .optional(),
+ content: z.string().trim().max(MESSENGER_PUSH_CONTENT_MAX_LENGTH).optional(),
+ platform: z.enum(MESSENGER_PUSH_PLATFORMS),
+ tenantId: z.string().optional(),
+ })
+ .refine((value) => !!value.content || !!value.attachments?.length, {
+ message: 'Either content or attachments is required',
+ }),
)
.mutation(async ({ input, ctx }) => {
+ let attachments: BotMessageAttachment[] | undefined;
+
+ // Resolve each `fileId` server-side. Two reasons the URL is not taken
+ // from the client: a client-held storage URL is a presigned snapshot
+ // that expires (typically 2h), so by the time the platform sender
+ // fetches it the download can 403 and the attachment silently degrades
+ // to a text-only message; and an arbitrary caller-supplied URL would
+ // turn the sender's `fetch` into an SSRF primitive. `getFileAccessUrl`
+ // returns the stable anonymous file-proxy URL in production (storage URL
+ // in dev), and the ownership-scoped lookup keeps callers from attaching
+ // other users' files. Name and MIME type come from the same owned row.
+ if (input.attachments?.length) {
+ const workspaceId = ctx.workspaceId ?? undefined;
+ const fileModel = new FileModel(ctx.serverDB, ctx.userId, workspaceId);
+ const fileService = new FileService(ctx.serverDB, ctx.userId, workspaceId);
+
+ attachments = await Promise.all(
+ input.attachments.map(async (attachment) => {
+ const file = await fileModel.findById(attachment.fileId);
+ if (!file) {
+ throw new TRPCError({ code: 'NOT_FOUND', message: 'File not found' });
+ }
+
+ return {
+ fetchUrl: await fileService.getFileAccessUrl({ id: file.id, url: file.url }),
+ mimeType: file.fileType,
+ name: file.name,
+ type: attachment.type,
+ };
+ }),
+ );
+ }
+
return sendMessengerPush({
+ attachments,
content: input.content,
platform: input.platform,
serverDB: ctx.serverDB,
diff --git a/apps/server/src/services/bot/platforms/slack/api.ts b/apps/server/src/services/bot/platforms/slack/api.ts
index cf8e54c6cad..cdea955d725 100644
--- a/apps/server/src/services/bot/platforms/slack/api.ts
+++ b/apps/server/src/services/bot/platforms/slack/api.ts
@@ -506,6 +506,21 @@ export class SlackApi {
];
}
+ /**
+ * Resolve (or lazily create) the 1:1 DM channel with a user. Unlike
+ * `chat.postMessage` — which accepts a user id as `channel` —
+ * `files.completeUploadExternal` requires a real channel id, so outbound
+ * file delivery must open the conversation first. Idempotent: Slack
+ * returns the existing DM channel when one is already open.
+ *
+ * See: https://api.slack.com/methods/conversations.open
+ */
+ async openConversation(userId: string): Promise<{ id: string }> {
+ log('openConversation: user=%s', userId);
+ const data = await this.call('conversations.open', { users: userId });
+ return { id: data.channel.id };
+ }
+
// ==================== Outbound File Upload (v2) ====================
/**
diff --git a/apps/server/src/services/messenger/outbound.test.ts b/apps/server/src/services/messenger/outbound.test.ts
index b98bb2becb8..07d00bf4597 100644
--- a/apps/server/src/services/messenger/outbound.test.ts
+++ b/apps/server/src/services/messenger/outbound.test.ts
@@ -4,9 +4,14 @@ import { beforeEach, describe, expect, it, vi } from 'vitest';
import type { InstallationCredentials } from './installations/types';
const mocks = vi.hoisted(() => ({
+ batchDiscordFiles: vi.fn(),
createDMChannel: vi.fn(),
createMessage: vi.fn(),
+ materializeAttachmentsForDiscord: vi.fn(),
+ openConversation: vi.fn(),
postMessage: vi.fn(),
+ sendSlackAttachments: vi.fn(),
+ sendTelegramAttachments: vi.fn(),
sendTelegramMessage: vi.fn(),
}));
@@ -16,6 +21,10 @@ vi.mock('@/server/services/bot/platforms/telegram/api', () => ({
},
}));
+vi.mock('@/server/services/bot/platforms/telegram/sendAttachments', () => ({
+ sendTelegramAttachments: mocks.sendTelegramAttachments,
+}));
+
vi.mock('@/server/services/bot/platforms/discord/api', () => ({
DiscordApi: class {
createDMChannel = mocks.createDMChannel;
@@ -23,12 +32,22 @@ vi.mock('@/server/services/bot/platforms/discord/api', () => ({
},
}));
+vi.mock('@/server/services/bot/platforms/discord/sendAttachments', () => ({
+ batchDiscordFiles: mocks.batchDiscordFiles,
+ materializeAttachmentsForDiscord: mocks.materializeAttachmentsForDiscord,
+}));
+
vi.mock('@/server/services/bot/platforms/slack/api', () => ({
SlackApi: class {
+ openConversation = mocks.openConversation;
postMessage = mocks.postMessage;
},
}));
+vi.mock('@/server/services/bot/platforms/slack/sendAttachments', () => ({
+ sendSlackAttachments: mocks.sendSlackAttachments,
+}));
+
const { sendOutboundDirectMessage } = await import('./outbound');
const creds = (platform: string): InstallationCredentials =>
@@ -41,10 +60,17 @@ const creds = (platform: string): InstallationCredentials =>
tenantId: '',
}) as InstallationCredentials;
+const fileAttachment = {
+ fetchUrl: 'https://cdn.example.com/report.pdf',
+ name: 'report.pdf',
+ type: 'file' as const,
+};
+
describe('sendOutboundDirectMessage', () => {
beforeEach(() => {
vi.clearAllMocks();
mocks.createDMChannel.mockResolvedValue({ id: 'dm-channel-1' });
+ mocks.openConversation.mockResolvedValue({ id: 'slack-dm-1' });
});
it('sends a Telegram message straight to the chat id', async () => {
@@ -102,4 +128,110 @@ describe('sendOutboundDirectMessage', () => {
}),
).rejects.toThrow('bot blocked by user');
});
+
+ it('rejects a message with neither content nor attachments', async () => {
+ await expect(
+ sendOutboundDirectMessage({
+ content: ' ',
+ credentials: creds('telegram'),
+ platformUserId: '12345',
+ }),
+ ).rejects.toThrow('requires content or attachments');
+ });
+
+ describe('attachments', () => {
+ it('delivers Telegram attachments with the text as caption, no extra message', async () => {
+ mocks.sendTelegramAttachments.mockResolvedValueOnce(1);
+
+ await sendOutboundDirectMessage({
+ attachments: [fileAttachment],
+ content: 'see attached',
+ credentials: creds('telegram'),
+ platformUserId: '12345',
+ });
+
+ expect(mocks.sendTelegramAttachments).toHaveBeenCalledWith(
+ expect.anything(),
+ '12345',
+ [fileAttachment],
+ 'see attached',
+ );
+ expect(mocks.sendTelegramMessage).not.toHaveBeenCalled();
+ });
+
+ it('falls back to a plain Telegram message when every attachment fails', async () => {
+ mocks.sendTelegramAttachments.mockResolvedValueOnce(0);
+
+ await sendOutboundDirectMessage({
+ attachments: [fileAttachment],
+ content: 'see attached',
+ credentials: creds('telegram'),
+ platformUserId: '12345',
+ });
+
+ expect(mocks.sendTelegramMessage).toHaveBeenCalledWith('12345', 'see attached');
+ });
+
+ it('throws when Telegram attachments fail and there is no text leg', async () => {
+ mocks.sendTelegramAttachments.mockResolvedValueOnce(0);
+
+ await expect(
+ sendOutboundDirectMessage({
+ attachments: [fileAttachment],
+ credentials: creds('telegram'),
+ platformUserId: '12345',
+ }),
+ ).rejects.toThrow('Telegram attachments failed');
+ });
+
+ it('sends Discord attachments in batches, text on the first batch only', async () => {
+ const rawFiles = [{ name: 'a' }, { name: 'b' }];
+ mocks.materializeAttachmentsForDiscord.mockResolvedValueOnce(rawFiles);
+ mocks.batchDiscordFiles.mockReturnValueOnce([[rawFiles[0]], [rawFiles[1]]]);
+
+ await sendOutboundDirectMessage({
+ attachments: [fileAttachment, fileAttachment],
+ content: 'files',
+ credentials: creds('discord'),
+ platformUserId: 'U-discord',
+ });
+
+ expect(mocks.createMessage).toHaveBeenNthCalledWith(1, 'dm-channel-1', 'files', [
+ rawFiles[0],
+ ]);
+ expect(mocks.createMessage).toHaveBeenNthCalledWith(2, 'dm-channel-1', '', [rawFiles[1]]);
+ });
+
+ it('opens the Slack DM conversation and uploads via the v2 flow', async () => {
+ mocks.sendSlackAttachments.mockResolvedValueOnce(1);
+
+ await sendOutboundDirectMessage({
+ attachments: [fileAttachment],
+ content: 'files',
+ credentials: creds('slack'),
+ platformUserId: 'U-slack',
+ });
+
+ expect(mocks.openConversation).toHaveBeenCalledWith('U-slack');
+ expect(mocks.sendSlackAttachments).toHaveBeenCalledWith(expect.anything(), {
+ attachments: [fileAttachment],
+ channelId: 'slack-dm-1',
+ initialComment: 'files',
+ });
+ expect(mocks.postMessage).not.toHaveBeenCalled();
+ });
+
+ it('falls back to a plain Slack message when every upload fails', async () => {
+ mocks.sendSlackAttachments.mockResolvedValueOnce(0);
+
+ await sendOutboundDirectMessage({
+ attachments: [fileAttachment],
+ content: 'files',
+ credentials: creds('slack'),
+ platformUserId: 'U-slack',
+ });
+
+ expect(mocks.postMessage).toHaveBeenCalledWith('U-slack', 'files');
+ });
+ });
});
diff --git a/apps/server/src/services/messenger/outbound.ts b/apps/server/src/services/messenger/outbound.ts
index 5785b6afe44..cb1542464fb 100644
--- a/apps/server/src/services/messenger/outbound.ts
+++ b/apps/server/src/services/messenger/outbound.ts
@@ -1,8 +1,15 @@
import debug from 'debug';
import { DiscordApi } from '@/server/services/bot/platforms/discord/api';
+import {
+ batchDiscordFiles,
+ materializeAttachmentsForDiscord,
+} from '@/server/services/bot/platforms/discord/sendAttachments';
import { SlackApi } from '@/server/services/bot/platforms/slack/api';
+import { sendSlackAttachments } from '@/server/services/bot/platforms/slack/sendAttachments';
import { TelegramApi } from '@/server/services/bot/platforms/telegram/api';
+import { sendTelegramAttachments } from '@/server/services/bot/platforms/telegram/sendAttachments';
+import type { BotMessageAttachment } from '@/server/services/bot/platforms/types';
import type { InstallationCredentials } from './installations/types';
@@ -17,7 +24,8 @@ const log = debug('lobe-messenger:outbound');
* merely referencing the module pulls the entire agent runtime (sharp, pdf /
* epub / office parsers, the AI SDKs, Stripe, …) into every serverless function
* that can reach it. Sending one DM needs none of that: a bot token and the
- * platform's own REST call are enough.
+ * platform's own REST call are enough. The attachment helpers imported above
+ * are plain fetch/REST utilities with the same footprint.
*
* WeChat is absent here because it already had its own direct path
* (`wechatPush.ts` → `WechatApiClient`); this brings the other three platforms
@@ -26,20 +34,34 @@ const log = debug('lobe-messenger:outbound');
* Inbound handling is unaffected and still goes through the router.
*/
export const sendOutboundDirectMessage = async (params: {
- content: string;
+ attachments?: BotMessageAttachment[];
+ content?: string;
credentials: InstallationCredentials;
/** Platform-side id of the recipient: Telegram chat id, Discord/Slack user id. */
platformUserId: string;
}): Promise<void> => {
- const { content, credentials, platformUserId } = params;
+ const { attachments, content, credentials, platformUserId } = params;
const { botToken, platform } = credentials;
+ const text = content?.trim();
+ const files = attachments?.length ? attachments : undefined;
- log('sending %s DM to %s', platform, platformUserId);
+ if (!text && !files) throw new Error('Outbound direct message requires content or attachments');
+
+ log('sending %s DM to %s (attachments=%d)', platform, platformUserId, files?.length ?? 0);
switch (platform) {
case 'telegram': {
// A Telegram private chat id *is* the user id, so no DM to open.
- await new TelegramApi(botToken).sendMessage(platformUserId, content);
+ const api = new TelegramApi(botToken);
+ if (files) {
+ // The first attachment carries the text as its caption; if every
+ // attachment fails, fall back to a plain message so the text leg
+ // still lands.
+ const delivered = await sendTelegramAttachments(api, platformUserId, files, text);
+ if (delivered > 0) return;
+ if (!text) throw new Error('All Telegram attachments failed to send');
+ }
+ await api.sendMessage(platformUserId, text!);
return;
}
case 'discord': {
@@ -47,12 +69,38 @@ export const sendOutboundDirectMessage = async (params: {
// existing channel when one is already open.
const api = new DiscordApi(botToken);
const channel = await api.createDMChannel(platformUserId);
- await api.createMessage(channel.id, content);
+ if (files) {
+ const rawFiles = await materializeAttachmentsForDiscord(files);
+ if (rawFiles.length > 0) {
+ // First batch carries the text leg; follow-up batches are text-less
+ // so the message isn't repeated once per batch.
+ const batches = batchDiscordFiles(rawFiles);
+ for (const [index, batch] of batches.entries()) {
+ await api.createMessage(channel.id, index === 0 ? (text ?? '') : '', batch);
+ }
+ return;
+ }
+ if (!text) throw new Error('All Discord attachments failed to materialize');
+ }
+ await api.createMessage(channel.id, text!);
return;
}
case 'slack': {
+ const api = new SlackApi(botToken);
+ if (files) {
+ // `files.completeUploadExternal` needs a real channel id (unlike
+ // `chat.postMessage`, which resolves a user id), so open the DM first.
+ const channel = await api.openConversation(platformUserId);
+ const uploaded = await sendSlackAttachments(api, {
+ attachments: files,
+ channelId: channel.id,
+ initialComment: text,
+ });
+ if (uploaded > 0) return;
+ if (!text) throw new Error('All Slack attachments failed to upload');
+ }
// Slack resolves a user id passed as `channel` to that user's DM.
- await new SlackApi(botToken).postMessage(platformUserId, content);
+ await api.postMessage(platformUserId, text!);
return;
}
default: {
diff --git a/apps/server/src/services/messenger/push/index.test.ts b/apps/server/src/services/messenger/push/index.test.ts
index 17f21ea4946..a9ab1df2847 100644
--- a/apps/server/src/services/messenger/push/index.test.ts
+++ b/apps/server/src/services/messenger/push/index.test.ts
@@ -103,6 +103,30 @@ describe('messenger proactive push', () => {
},
);
+ it('forwards attachments to the outbound DM and allows an empty text leg', async () => {
+ const link = buildLink('slack', 'T_ACME');
+ mocks.findByPlatform.mockResolvedValue(link);
+ const attachments = [
+ { fetchUrl: 'https://cdn.example.com/report.pdf', name: 'report.pdf', type: 'file' as const },
+ ];
+
+ const result = await sendMessengerPush({
+ attachments,
+ platform: 'slack',
+ serverDB,
+ tenantId: 'T_ACME',
+ userId: 'user-1',
+ });
+
+ expect(result).toEqual({ status: 'sent' });
+ expect(mocks.sendDirectMessage).toHaveBeenCalledWith({
+ attachments,
+ content: undefined,
+ credentials: expect.objectContaining({ installationKey: 'slack:T_ACME' }),
+ platformUserId: link.platformUserId,
+ });
+ });
+
it('uses tenantId to route a Slack push to the requested workspace link', async () => {
mocks.findByPlatform.mockResolvedValue(buildLink('slack', 'T_BETA'));
diff --git a/apps/server/src/services/messenger/push/index.ts b/apps/server/src/services/messenger/push/index.ts
index 9e455945435..ba7941755d9 100644
--- a/apps/server/src/services/messenger/push/index.ts
+++ b/apps/server/src/services/messenger/push/index.ts
@@ -2,7 +2,7 @@ import type { MessengerPlatform } from '@/config/messenger';
import type { SafeMessengerAccountLink } from '@/database/models/messengerAccountLink';
import { MessengerAccountLinkModel } from '@/database/models/messengerAccountLink';
import type { LobeChatDatabase } from '@/database/type';
-import type { WechatOutboundAttachment } from '@/server/services/bot/platforms/wechat/sendAttachments';
+import type { BotMessageAttachment } from '@/server/services/bot/platforms/types';
import { getInstallationStore } from '@/server/services/messenger/installations';
import { sendOutboundDirectMessage } from '@/server/services/messenger/outbound';
import {
@@ -65,6 +65,7 @@ const resolveAccountLink = async (params: {
};
const sendAlwaysAvailableMessage = async (params: {
+ attachments?: BotMessageAttachment[];
content?: string;
platform: Exclude<MessengerPushPlatform, 'wechat'>;
serverDB: LobeChatDatabase;
@@ -72,7 +73,7 @@ const sendAlwaysAvailableMessage = async (params: {
userId: string;
}): Promise<MessengerPushResult> => {
const content = params.content?.trim();
- if (!content) return { status: 'unavailable' };
+ if (!content && !params.attachments?.length) return { status: 'unavailable' };
const link = await resolveAccountLink(params);
if (!link) return { status: 'unlinked' };
@@ -86,6 +87,7 @@ const sendAlwaysAvailableMessage = async (params: {
try {
await sendOutboundDirectMessage({
+ attachments: params.attachments,
content,
credentials,
platformUserId: link.platformUserId,
@@ -98,7 +100,7 @@ const sendAlwaysAvailableMessage = async (params: {
};
export const sendMessengerPush = async (params: {
- attachments?: WechatOutboundAttachment[];
+ attachments?: BotMessageAttachment[];
content?: string;
platform: MessengerPushPlatform;
serverDB: LobeChatDatabase;
diff --git a/locales/ar/components.json b/locales/ar/components.json
index d7e5df4993c..b8827c394b6 100644
--- a/locales/ar/components.json
+++ b/locales/ar/components.json
@@ -47,6 +47,10 @@
"FileManager.actions.rename": "إعادة التسمية",
"FileManager.actions.renameError": "فشل في إعادة التسمية",
"FileManager.actions.renameSuccess": "تمت إعادة التسمية بنجاح",
+ "FileManager.actions.sendToMessenger": "إرسال إلى المراسلة",
+ "FileManager.actions.sendToMessengerSettings": "إعدادات المراسلة",
+ "FileManager.actions.sendToMessengerSetup": "إعداد القنوات",
+ "FileManager.actions.sendToMessengerSetupAction": "إعداد",
"FileManager.bottom": "لقد وصلت إلى النهاية.",
"FileManager.config.showFilesInLibrary": "عرض المحتوى في المكتبة",
"FileManager.emptyStatus.actions.file": "تحميل ملف",
diff --git a/locales/ar/messenger.json b/locales/ar/messenger.json
index 42942de14f9..5a6eb19c4cc 100644
--- a/locales/ar/messenger.json
+++ b/locales/ar/messenger.json
@@ -74,6 +74,8 @@
"messenger.push.placeholder": "اكتب رسالة لإرسالها إلى {{platform}}…",
"messenger.push.queued": "{{count}} رسالة (رسائل) في الانتظار سيتم تسليمها بعد أن ترسل رسالة إلى الروبوت في {{platform}}.",
"messenger.push.queuedToast": "نافذة الإرسال مغلقة — تم وضع رسالتك في الانتظار. أرسل رسالة إلى الروبوت في {{platform}} لاستلامها.",
+ "messenger.push.resource.description": "سيتم إرسال الملف كمرفق إلى حسابك المرتبط على {{platform}}.",
+ "messenger.push.resource.placeholder": "أضف رسالة (اختياري)…",
"messenger.push.retry": "حاول مرة أخرى",
"messenger.push.sectionTitle": "دفع الرسائل",
"messenger.push.send": "إرسال إلى {{platform}}",
diff --git a/locales/ar/modelRuntime.json b/locales/ar/modelRuntime.json
index 5079741fce6..03a96cfaf10 100644
--- a/locales/ar/modelRuntime.json
+++ b/locales/ar/modelRuntime.json
@@ -13,6 +13,7 @@
"ContextEnginePipelineError": "فشل تجميع سياق المحادثة لهذا الطلب. يرجى إعادة المحاولة؛ إذا استمرت المشكلة، يرجى الاتصال بالدعم.",
"DatabasePersistError": "فشلت عملية قاعدة البيانات أثناء حفظ أو تحميل هذه المحادثة. يرجى إعادة المحاولة؛ إذا استمرت المشكلة، يرجى الاتصال بالدعم.",
"ExceededContextWindow": "يتجاوز محتوى الطلب الحالي الطول الذي يمكن للنموذج التعامل معه. يرجى تقليل كمية المحتوى وإعادة المحاولة.",
+ "HarnessJsonParseError": "تعذر قراءة الحمولة الداخلية، مما أدى إلى توقف هذه العملية. إعادة المحاولة بنفس الطلب ستؤدي إلى نفس الفشل — يرجى بدء رسالة جديدة؛ وإذا استمر الأمر، يرجى الاتصال بالدعم.",
"InsufficientQuota": "عذرًا، تم الوصول إلى الحصة المخصصة لهذه المفتاح. يرجى التحقق مما إذا كان رصيد حسابك كافيًا أو إعادة المحاولة بعد زيادة حصة المفتاح.",
"InvalidBedrockCredentials": "فشل التحقق من صحة Bedrock. يرجى التحقق من AccessKeyId/SecretAccessKey وإعادة المحاولة.",
"InvalidComfyUIArgs": "إعدادات ComfyUI غير صالحة. يرجى التحقق من الإعدادات وإعادة المحاولة.",
diff --git a/locales/ar/verify.json b/locales/ar/verify.json
index a4c6c3bb0c5..ad5b7a103ee 100644
--- a/locales/ar/verify.json
+++ b/locales/ar/verify.json
@@ -273,6 +273,10 @@
"acceptance.workspace.filters.noSearchResults": "لا توجد قبولات تطابق “{{query}}”.",
"acceptance.workspace.filters.showAll": "عرض جميع القبولات",
"acceptance.workspace.filters.title": "تصفية القبولات",
+ "acceptance.workspace.groups.actions": "إجراءات المشروع",
+ "acceptance.workspace.groups.createProject": "إنشاء مشروع",
+ "acceptance.workspace.groups.ungrouped": "غير مجمّع",
+ "acceptance.workspace.groups.viewProject": "عرض المشروع",
"acceptance.workspace.listEmpty": "قم بإدخال تقرير تحقق باستخدام CLI وسيظهر قبوله هنا.",
"acceptance.workspace.listEmptyTitle": "لا توجد قبولات حتى الآن",
"acceptance.workspace.renameEmpty": "لا يمكن أن يكون العنوان فارغًا",
diff --git a/locales/bg-BG/components.json b/locales/bg-BG/components.json
index 08de1aaf605..26116c7319a 100644
--- a/locales/bg-BG/components.json
+++ b/locales/bg-BG/components.json
@@ -47,6 +47,10 @@
"FileManager.actions.rename": "Преименувай",
"FileManager.actions.renameError": "Неуспешно преименуване",
"FileManager.actions.renameSuccess": "Преименуването е успешно",
+ "FileManager.actions.sendToMessenger": "Изпрати в Messenger",
+ "FileManager.actions.sendToMessengerSettings": "Настройки на Messenger",
+ "FileManager.actions.sendToMessengerSetup": "Настройване на канали",
+ "FileManager.actions.sendToMessengerSetupAction": "Настройване",
"FileManager.bottom": "Достигнахте края.",
"FileManager.config.showFilesInLibrary": "Показване на съдържание в библиотеката",
"FileManager.emptyStatus.actions.file": "Качване на файл",
diff --git a/locales/bg-BG/messenger.json b/locales/bg-BG/messenger.json
index 267776c692c..da229dd3081 100644
--- a/locales/bg-BG/messenger.json
+++ b/locales/bg-BG/messenger.json
@@ -74,6 +74,8 @@
"messenger.push.placeholder": "Напишете съобщение за изпращане до {{platform}}…",
"messenger.push.queued": "{{count}} съобщение(я) в опашката ще бъдат доставени, след като изпратите съобщение до бота в {{platform}}.",
"messenger.push.queuedToast": "Прозорецът за изпращане е затворен — вашето съобщение е в опашката. Изпратете съобщение до бота в {{platform}}, за да го получите.",
+ "messenger.push.resource.description": "Файлът ще бъде изпратен като прикачен файл към свързания ви {{platform}} акаунт.",
+ "messenger.push.resource.placeholder": "Добавете съобщение (по избор)…",
"messenger.push.retry": "Опитайте отново",
"messenger.push.sectionTitle": "Изпращане на съобщения",
"messenger.push.send": "Изпратете до {{platform}}",
diff --git a/locales/bg-BG/modelRuntime.json b/locales/bg-BG/modelRuntime.json
index 8d92c638fb3..34281643a24 100644
--- a/locales/bg-BG/modelRuntime.json
+++ b/locales/bg-BG/modelRuntime.json
@@ -13,6 +13,7 @@
"ContextEnginePipelineError": "Неуспешно съставяне на контекста на разговора за тази заявка. Моля, опитайте отново; ако проблемът продължи, свържете се с поддръжката.",
"DatabasePersistError": "Операция с базата данни не успя при запазване или зареждане на този разговор. Моля, опитайте отново; ако проблемът продължи, свържете се с поддръжката.",
"ExceededContextWindow": "Съдържанието на текущата заявка надвишава дължината, която моделът може да обработи. Моля, намалете количеството съдържание и опитайте отново.",
+ "HarnessJsonParseError": "Вътрешен полезен товар не можа да бъде прочетен обратно, затова операцията беше спряна. Повторението на същата заявка ще доведе до същия провал — моля, започнете ново съобщение; ако проблемът продължава, свържете се с поддръжката.",
"InsufficientQuota": "Съжаляваме, квотата за този ключ е изчерпана. Моля, проверете дали балансът на вашия акаунт е достатъчен или опитайте отново след увеличаване на квотата на ключа.",
"InvalidBedrockCredentials": "Неуспешно удостоверяване в Bedrock. Моля, проверете AccessKeyId/SecretAccessKey и опитайте отново.",
"InvalidComfyUIArgs": "Невалидна конфигурация на ComfyUI. Моля, проверете настройките и опитайте отново.",
diff --git a/locales/bg-BG/verify.json b/locales/bg-BG/verify.json
index e615ff7a1f2..dbea722efd1 100644
--- a/locales/bg-BG/verify.json
+++ b/locales/bg-BG/verify.json
@@ -273,6 +273,10 @@
"acceptance.workspace.filters.noSearchResults": "Няма приемания, които съответстват на „{{query}}“.",
"acceptance.workspace.filters.showAll": "Покажи всички приемания",
"acceptance.workspace.filters.title": "Филтрирай приеманията",
+ "acceptance.workspace.groups.actions": "Действия по проекта",
+ "acceptance.workspace.groups.createProject": "Създаване на проект",
+ "acceptance.workspace.groups.ungrouped": "Негрупирани",
+ "acceptance.workspace.groups.viewProject": "Преглед на проект",
"acceptance.workspace.listEmpty": "Въведете доклад за проверка с CLI и неговото приемане ще се появи тук.",
"acceptance.workspace.listEmptyTitle": "Все още няма приемания",
"acceptance.workspace.renameEmpty": "Заглавието не може да бъде празно",
diff --git a/locales/de-DE/components.json b/locales/de-DE/components.json
index 8f571a1dddb..203bb20808e 100644
--- a/locales/de-DE/components.json
+++ b/locales/de-DE/components.json
@@ -47,6 +47,10 @@
"FileManager.actions.rename": "Umbenennen",
"FileManager.actions.renameError": "Umbenennen fehlgeschlagen",
"FileManager.actions.renameSuccess": "Erfolgreich umbenannt",
+ "FileManager.actions.sendToMessenger": "An Messenger senden",
+ "FileManager.actions.sendToMessengerSettings": "Messenger-Einstellungen",
+ "FileManager.actions.sendToMessengerSetup": "Kanäle einrichten",
+ "FileManager.actions.sendToMessengerSetupAction": "Einrichten",
"FileManager.bottom": "Sie haben das Ende erreicht.",
"FileManager.config.showFilesInLibrary": "Inhalte in der Bibliothek anzeigen",
"FileManager.emptyStatus.actions.file": "Datei hochladen",
diff --git a/locales/de-DE/messenger.json b/locales/de-DE/messenger.json
index 386e52b99f2..d56f3e8b62f 100644
--- a/locales/de-DE/messenger.json
+++ b/locales/de-DE/messenger.json
@@ -74,6 +74,8 @@
"messenger.push.placeholder": "Schreiben Sie eine Nachricht, die an {{platform}} gesendet werden soll…",
"messenger.push.queued": "{{count}} Nachricht(en) in der Warteschlange werden zugestellt, nachdem Sie den Bot in {{platform}} kontaktiert haben.",
"messenger.push.queuedToast": "Das Sendezeitfenster ist geschlossen — Ihre Nachricht ist in der Warteschlange. Kontaktieren Sie den Bot in {{platform}}, um sie zu erhalten.",
+ "messenger.push.resource.description": "Die Datei wird als Anhang an Ihr verknüpftes {{platform}}-Konto gesendet.",
+ "messenger.push.resource.placeholder": "Fügen Sie eine Nachricht hinzu (optional)…",
"messenger.push.retry": "Erneut versuchen",
"messenger.push.sectionTitle": "Nachrichten-Push",
"messenger.push.send": "Senden an {{platform}}",
diff --git a/locales/de-DE/modelRuntime.json b/locales/de-DE/modelRuntime.json
index 4676e7e08be..80e79c7a4ae 100644
--- a/locales/de-DE/modelRuntime.json
+++ b/locales/de-DE/modelRuntime.json
@@ -13,6 +13,7 @@
"ContextEnginePipelineError": "Die Konversation konnte für diese Anfrage nicht korrekt zusammengeführt werden. Bitte versuchen Sie es erneut; falls das Problem weiterhin besteht, wenden Sie sich an den Support.",
"DatabasePersistError": "Ein Datenbankvorgang ist beim Speichern oder Laden dieser Konversation fehlgeschlagen. Bitte versuchen Sie es erneut; falls das Problem weiterhin besteht, wenden Sie sich an den Support.",
"ExceededContextWindow": "Der aktuelle Anfrageinhalt überschreitet die Länge, die das Modell verarbeiten kann. Bitte reduzieren Sie die Menge des Inhalts und versuchen Sie es erneut.",
+ "HarnessJsonParseError": "Ein interner Payload konnte nicht zurückgelesen werden, daher wurde dieser Vorgang abgebrochen. Das erneute Senden derselben Anfrage führt zum gleichen Fehler — bitte starten Sie eine neue Nachricht; falls das Problem weiterhin besteht, kontaktieren Sie den Support.",
"InsufficientQuota": "Entschuldigung, das Kontingent für diesen Schlüssel wurde erreicht. Bitte überprüfen Sie, ob Ihr Kontostand ausreicht, oder versuchen Sie es erneut, nachdem Sie das Kontingent des Schlüssels erhöht haben.",
"InvalidBedrockCredentials": "Bedrock-Authentifizierung fehlgeschlagen. Bitte überprüfen Sie AccessKeyId/SecretAccessKey und versuchen Sie es erneut.",
"InvalidComfyUIArgs": "Ungültige ComfyUI-Konfiguration. Bitte überprüfen Sie die Einstellungen und versuchen Sie es erneut.",
diff --git a/locales/de-DE/verify.json b/locales/de-DE/verify.json
index fe9baddaf4f..d02749d9491 100644
--- a/locales/de-DE/verify.json
+++ b/locales/de-DE/verify.json
@@ -273,6 +273,10 @@
"acceptance.workspace.filters.noSearchResults": "Keine Akzeptanzen entsprechen „{{query}}“.",
"acceptance.workspace.filters.showAll": "Alle Akzeptanzen anzeigen",
"acceptance.workspace.filters.title": "Akzeptanzen filtern",
+ "acceptance.workspace.groups.actions": "Projektaktionen",
+ "acceptance.workspace.groups.createProject": "Projekt erstellen",
+ "acceptance.workspace.groups.ungrouped": "Nicht gruppiert",
+ "acceptance.workspace.groups.viewProject": "Projekt anzeigen",
"acceptance.workspace.listEmpty": "Importieren Sie einen Überprüfungsbericht mit der CLI, und dessen Akzeptanz wird hier angezeigt.",
"acceptance.workspace.listEmptyTitle": "Noch keine Akzeptanzen",
"acceptance.workspace.renameEmpty": "Der Titel darf nicht leer sein",
diff --git a/locales/en-US/components.json b/locales/en-US/components.json
index 4ab545b0ae3..30397bb30db 100644
--- a/locales/en-US/components.json
+++ b/locales/en-US/components.json
@@ -47,6 +47,10 @@
"FileManager.actions.rename": "Rename",
"FileManager.actions.renameError": "Rename failed",
"FileManager.actions.renameSuccess": "Rename successful",
+ "FileManager.actions.sendToMessenger": "Send to Messenger",
+ "FileManager.actions.sendToMessengerSettings": "Messenger Settings",
+ "FileManager.actions.sendToMessengerSetup": "Set Up Channels",
+ "FileManager.actions.sendToMessengerSetupAction": "Set Up",
"FileManager.bottom": "You've reached the end.",
"FileManager.config.showFilesInLibrary": "Show content in Library",
"FileManager.emptyStatus.actions.file": "Upload File",
diff --git a/locales/en-US/messenger.json b/locales/en-US/messenger.json
index f1b3bf131c6..461e004fcae 100644
--- a/locales/en-US/messenger.json
+++ b/locales/en-US/messenger.json
@@ -74,6 +74,8 @@
"messenger.push.placeholder": "Write a message to send to {{platform}}…",
"messenger.push.queued": "{{count}} queued message(s) will be delivered after you message the bot in {{platform}}.",
"messenger.push.queuedToast": "The send window is closed — your message is queued. Message the bot in {{platform}} to receive it.",
+ "messenger.push.resource.description": "The file will be sent as an attachment to your linked {{platform}} account.",
+ "messenger.push.resource.placeholder": "Add a message (optional)…",
"messenger.push.retry": "Try again",
"messenger.push.sectionTitle": "Message Push",
"messenger.push.send": "Send to {{platform}}",
diff --git a/locales/es-ES/components.json b/locales/es-ES/components.json
index e5d7c4292df..f0c412a5160 100644
--- a/locales/es-ES/components.json
+++ b/locales/es-ES/components.json
@@ -47,6 +47,10 @@
"FileManager.actions.rename": "Renombrar",
"FileManager.actions.renameError": "Error al renombrar",
"FileManager.actions.renameSuccess": "Renombrado con éxito",
+ "FileManager.actions.sendToMessenger": "Enviar a Messenger",
+ "FileManager.actions.sendToMessengerSettings": "Configuración de Messenger",
+ "FileManager.actions.sendToMessengerSetup": "Configurar canales",
+ "FileManager.actions.sendToMessengerSetupAction": "Configurar",
"FileManager.bottom": "Has llegado al final.",
"FileManager.config.showFilesInLibrary": "Mostrar contenido en la biblioteca",
"FileManager.emptyStatus.actions.file": "Subir archivo",
diff --git a/locales/es-ES/messenger.json b/locales/es-ES/messenger.json
index 82635e07295..b766e19226f 100644
--- a/locales/es-ES/messenger.json
+++ b/locales/es-ES/messenger.json
@@ -74,6 +74,8 @@
"messenger.push.placeholder": "Escribe un mensaje para enviar a {{platform}}…",
"messenger.push.queued": "{{count}} mensaje(s) en cola se entregarán después de que envíes un mensaje al bot en {{platform}}.",
"messenger.push.queuedToast": "La ventana de envío está cerrada — tu mensaje está en cola. Envía un mensaje al bot en {{platform}} para recibirlo.",
+ "messenger.push.resource.description": "El archivo se enviará como un adjunto a tu cuenta vinculada de {{platform}}.",
+ "messenger.push.resource.placeholder": "Añade un mensaje (opcional)…",
"messenger.push.retry": "Intentar de nuevo",
"messenger.push.sectionTitle": "Envío de mensajes",
"messenger.push.send": "Enviar a {{platform}}",
diff --git a/locales/es-ES/modelRuntime.json b/locales/es-ES/modelRuntime.json
index d88f836b220..775af5bb2ac 100644
--- a/locales/es-ES/modelRuntime.json
+++ b/locales/es-ES/modelRuntime.json
@@ -13,6 +13,7 @@
"ContextEnginePipelineError": "No se pudo ensamblar el contexto de la conversación para esta solicitud. Por favor, vuelve a intentarlo; si el problema persiste, contacta al soporte.",
"DatabasePersistError": "Una operación de base de datos falló al guardar o cargar esta conversación. Por favor, vuelve a intentarlo; si el problema persiste, contacta al soporte.",
"ExceededContextWindow": "El contenido de la solicitud actual excede la longitud que el modelo puede manejar. Por favor, reduce la cantidad de contenido y vuelve a intentarlo.",
+ "HarnessJsonParseError": "No se pudo leer un payload interno, por lo que esta operación se detuvo. Reintentar la misma solicitud generará el mismo error — por favor, inicie un nuevo mensaje; si el problema persiste, contacte al soporte.",
"InsufficientQuota": "Lo sentimos, se ha alcanzado la cuota para esta clave. Por favor, verifica si el saldo de tu cuenta es suficiente o vuelve a intentarlo después de aumentar la cuota de la clave.",
"InvalidBedrockCredentials": "La autenticación de Bedrock falló. Por favor, verifica el AccessKeyId/SecretAccessKey y vuelve a intentarlo.",
"InvalidComfyUIArgs": "Configuración inválida de ComfyUI. Por favor, verifica los ajustes y vuelve a intentarlo.",
diff --git a/locales/es-ES/verify.json b/locales/es-ES/verify.json
index 89ed45903bb..d301f936837 100644
--- a/locales/es-ES/verify.json
+++ b/locales/es-ES/verify.json
@@ -273,6 +273,10 @@
"acceptance.workspace.filters.noSearchResults": "No hay aceptaciones que coincidan con “{{query}}”.",
"acceptance.workspace.filters.showAll": "Mostrar todas las aceptaciones",
"acceptance.workspace.filters.title": "Filtrar aceptaciones",
+ "acceptance.workspace.groups.actions": "Acciones del proyecto",
+ "acceptance.workspace.groups.createProject": "Crear proyecto",
+ "acceptance.workspace.groups.ungrouped": "Sin agrupar",
+ "acceptance.workspace.groups.viewProject": "Ver proyecto",
"acceptance.workspace.listEmpty": "Ingresa un informe de verificación con la CLI y su aceptación aparecerá aquí.",
"acceptance.workspace.listEmptyTitle": "Aún no hay aceptaciones",
"acceptance.workspace.renameEmpty": "El título no puede estar vacío",
diff --git a/locales/fa-IR/components.json b/locales/fa-IR/components.json
index a5a00a2820e..e90be68a47b 100644
--- a/locales/fa-IR/components.json
+++ b/locales/fa-IR/components.json
@@ -47,6 +47,10 @@
"FileManager.actions.rename": "تغییر نام",
"FileManager.actions.renameError": "تغییر نام ناموفق بود",
"FileManager.actions.renameSuccess": "تغییر نام با موفقیت انجام شد",
+ "FileManager.actions.sendToMessenger": "ارسال به پیام‌رسان",
+ "FileManager.actions.sendToMessengerSettings": "تنظیمات پیام‌رسان",
+ "FileManager.actions.sendToMessengerSetup": "راه‌اندازی کانال‌ها",
+ "FileManager.actions.sendToMessengerSetupAction": "راه‌اندازی",
"FileManager.bottom": "به انتهای لیست رسیدید.",
"FileManager.config.showFilesInLibrary": "نمایش محتوا در کتابخانه",
"FileManager.emptyStatus.actions.file": "بارگذاری فایل",
diff --git a/locales/fa-IR/messenger.json b/locales/fa-IR/messenger.json
index 0ee71f4e4a5..fbba07f7af7 100644
--- a/locales/fa-IR/messenger.json
+++ b/locales/fa-IR/messenger.json
@@ -74,6 +74,8 @@
"messenger.push.placeholder": "پیامی برای ارسال به {{platform}} بنویسید…",
"messenger.push.queued": "{{count}} پیام در صف قرار دارد و پس از ارسال پیام شما به ربات در {{platform}} تحویل داده خواهد شد.",
"messenger.push.queuedToast": "پنجره ارسال بسته است — پیام شما در صف قرار گرفت. به ربات در {{platform}} پیام دهید تا آن را دریافت کنید.",
+ "messenger.push.resource.description": "فایل به‌عنوان پیوست به حساب مرتبط شما در {{platform}} ارسال خواهد شد.",
+ "messenger.push.resource.placeholder": "یک پیام اضافه کنید (اختیاری)…",
"messenger.push.retry": "دوباره تلاش کنید",
"messenger.push.sectionTitle": "ارسال پیام",
"messenger.push.send": "ارسال به {{platform}}",
diff --git a/locales/fa-IR/modelRuntime.json b/locales/fa-IR/modelRuntime.json
index 7f39f71cba0..2e0baf09cf0 100644
--- a/locales/fa-IR/modelRuntime.json
+++ b/locales/fa-IR/modelRuntime.json
@@ -13,6 +13,7 @@
"ContextEnginePipelineError": "ترکیب زمینه مکالمه برای این درخواست ناموفق بود. لطفاً دوباره تلاش کنید؛ اگر مشکل ادامه داشت، با پشتیبانی تماس بگیرید.",
"DatabasePersistError": "یک عملیات پایگاه داده در هنگام ذخیره یا بارگذاری این مکالمه ناموفق بود. لطفاً دوباره تلاش کنید؛ اگر مشکل ادامه داشت، با پشتیبانی تماس بگیرید.",
"ExceededContextWindow": "محتوای درخواست فعلی از طولی که مدل می‌تواند پردازش کند فراتر رفته است. لطفاً مقدار محتوا را کاهش داده و دوباره تلاش کنید.",
+ "HarnessJsonParseError": "یک بارگذاری داخلی قابل خواندن نبود، بنابراین این عملیات متوقف شد. تلاش مجدد برای همان درخواست به همان خطا برخورد خواهد کرد — لطفاً یک پیام جدید شروع کنید؛ اگر مشکل ادامه داشت، با پشتیبانی تماس بگیرید.",
"InsufficientQuota": "متأسفیم، سهمیه این کلید به پایان رسیده است. لطفاً بررسی کنید که آیا موجودی حساب شما کافی است یا پس از افزایش سهمیه کلید دوباره تلاش کنید.",
"InvalidBedrockCredentials": "احراز هویت Bedrock ناموفق بود. لطفاً AccessKeyId/SecretAccessKey را بررسی کرده و دوباره تلاش کنید.",
"InvalidComfyUIArgs": "پیکربندی ComfyUI نامعتبر است. لطفاً تنظیمات را بررسی کرده و دوباره تلاش کنید.",
diff --git a/locales/fa-IR/verify.json b/locales/fa-IR/verify.json
index 70c1004d098..e28e5bde0e6 100644
--- a/locales/fa-IR/verify.json
+++ b/locales/fa-IR/verify.json
@@ -273,6 +273,10 @@
"acceptance.workspace.filters.noSearchResults": "هیچ پذیرشی با «{{query}}» مطابقت ندارد.",
"acceptance.workspace.filters.showAll": "نمایش همه پذیرش‌ها",
"acceptance.workspace.filters.title": "فیلتر پذیرش‌ها",
+ "acceptance.workspace.groups.actions": "اقدامات پروژه",
+ "acceptance.workspace.groups.createProject": "ایجاد پروژه",
+ "acceptance.workspace.groups.ungrouped": "بدون گروه‌بندی",
+ "acceptance.workspace.groups.viewProject": "مشاهده پروژه",
"acceptance.workspace.listEmpty": "یک گزارش تأیید را با CLI وارد کنید و پذیرش آن اینجا نمایش داده خواهد شد.",
"acceptance.workspace.listEmptyTitle": "هنوز هیچ پذیرشی وجود ندارد",
"acceptance.workspace.renameEmpty": "عنوان نمی‌تواند خالی باشد",
diff --git a/locales/fr-FR/components.json b/locales/fr-FR/components.json
index 74b139c3324..c5f93613a53 100644
--- a/locales/fr-FR/components.json
+++ b/locales/fr-FR/components.json
@@ -47,6 +47,10 @@
"FileManager.actions.rename": "Renommer",
"FileManager.actions.renameError": "Échec du renommage",
"FileManager.actions.renameSuccess": "Renommage réussi",
+ "FileManager.actions.sendToMessenger": "Envoyer à Messenger",
+ "FileManager.actions.sendToMessengerSettings": "Paramètres de Messenger",
+ "FileManager.actions.sendToMessengerSetup": "Configurer les canaux",
+ "FileManager.actions.sendToMessengerSetupAction": "Configurer",
"FileManager.bottom": "Vous avez atteint la fin.",
"FileManager.config.showFilesInLibrary": "Afficher le contenu dans la bibliothèque",
"FileManager.emptyStatus.actions.file": "Téléverser un fichier",
diff --git a/locales/fr-FR/messenger.json b/locales/fr-FR/messenger.json
index 257c8094a1c..8cecf24a707 100644
--- a/locales/fr-FR/messenger.json
+++ b/locales/fr-FR/messenger.json
@@ -74,6 +74,8 @@
"messenger.push.placeholder": "Écrivez un message à envoyer à {{platform}}…",
"messenger.push.queued": "{{count}} message(s) en file d'attente seront délivrés après que vous ayez envoyé un message au bot sur {{platform}}.",
"messenger.push.queuedToast": "La fenêtre d'envoi est fermée — votre message est en file d'attente. Envoyez un message au bot sur {{platform}} pour le recevoir.",
+ "messenger.push.resource.description": "Le fichier sera envoyé en tant que pièce jointe à votre compte {{platform}} lié.",
+ "messenger.push.resource.placeholder": "Ajoutez un message (facultatif)…",
"messenger.push.retry": "Réessayer",
"messenger.push.sectionTitle": "Envoi de messages",
"messenger.push.send": "Envoyer à {{platform}}",
diff --git a/locales/fr-FR/modelRuntime.json b/locales/fr-FR/modelRuntime.json
index e62a707a3d2..a1ccaff683d 100644
--- a/locales/fr-FR/modelRuntime.json
+++ b/locales/fr-FR/modelRuntime.json
@@ -13,6 +13,7 @@
"ContextEnginePipelineError": "Échec de l'assemblage du contexte de la conversation pour cette requête. Veuillez réessayer ; si le problème persiste, contactez le support.",
"DatabasePersistError": "Une opération de base de données a échoué lors de la sauvegarde ou du chargement de cette conversation. Veuillez réessayer ; si le problème persiste, contactez le support.",
"ExceededContextWindow": "Le contenu de la requête actuelle dépasse la longueur que le modèle peut gérer. Veuillez réduire la quantité de contenu et réessayer.",
+ "HarnessJsonParseError": "Un problème interne a empêché la lecture du contenu, ce qui a interrompu cette opération. Réessayer la même requête entraînera le même échec — veuillez commencer un nouveau message ; si le problème persiste, contactez le support.",
"InsufficientQuota": "Désolé, le quota pour cette clé a été atteint. Veuillez vérifier si le solde de votre compte est suffisant ou réessayer après avoir augmenté le quota de la clé.",
"InvalidBedrockCredentials": "Échec de l'authentification Bedrock. Veuillez vérifier l'AccessKeyId/SecretAccessKey et réessayer.",
"InvalidComfyUIArgs": "Configuration ComfyUI invalide. Veuillez vérifier les paramètres et réessayer.",
diff --git a/locales/fr-FR/verify.json b/locales/fr-FR/verify.json
index 986bc2e97b9..6fc2dff4ce3 100644
--- a/locales/fr-FR/verify.json
+++ b/locales/fr-FR/verify.json
@@ -273,6 +273,10 @@
"acceptance.workspace.filters.noSearchResults": "Aucune acceptation ne correspond à « {{query}} ».",
"acceptance.workspace.filters.showAll": "Afficher toutes les acceptations",
"acceptance.workspace.filters.title": "Filtrer les acceptations",
+ "acceptance.workspace.groups.actions": "Actions du projet",
+ "acceptance.workspace.groups.createProject": "Créer un projet",
+ "acceptance.workspace.groups.ungrouped": "Non groupé",
+ "acceptance.workspace.groups.viewProject": "Voir le projet",
"acceptance.workspace.listEmpty": "Importez un rapport de vérification avec le CLI et son acceptation apparaîtra ici.",
"acceptance.workspace.listEmptyTitle": "Aucune acceptation pour le moment",
"acceptance.workspace.renameEmpty": "Le titre ne peut pas être vide",
diff --git a/locales/it-IT/components.json b/locales/it-IT/components.json
index 06d0e92e4a4..e2c394d9b96 100644
--- a/locales/it-IT/components.json
+++ b/locales/it-IT/components.json
@@ -47,6 +47,10 @@
"FileManager.actions.rename": "Rinomina",
"FileManager.actions.renameError": "Rinomina non riuscita",
"FileManager.actions.renameSuccess": "Rinomina completata con successo",
+ "FileManager.actions.sendToMessenger": "Invia a Messenger",
+ "FileManager.actions.sendToMessengerSettings": "Impostazioni di Messenger",
+ "FileManager.actions.sendToMessengerSetup": "Configura Canali",
+ "FileManager.actions.sendToMessengerSetupAction": "Configura",
"FileManager.bottom": "Hai raggiunto la fine.",
"FileManager.config.showFilesInLibrary": "Mostra contenuti nella Libreria",
"FileManager.emptyStatus.actions.file": "Carica File",
diff --git a/locales/it-IT/messenger.json b/locales/it-IT/messenger.json
index b191b32946d..5da85219901 100644
--- a/locales/it-IT/messenger.json
+++ b/locales/it-IT/messenger.json
@@ -74,6 +74,8 @@
"messenger.push.placeholder": "Scrivi un messaggio da inviare a {{platform}}…",
"messenger.push.queued": "{{count}} messaggio/i in coda verrà/verranno consegnato/i dopo che avrai inviato un messaggio al bot su {{platform}}.",
"messenger.push.queuedToast": "La finestra di invio è chiusa — il tuo messaggio è in coda. Invia un messaggio al bot su {{platform}} per riceverlo.",
+ "messenger.push.resource.description": "Il file verrà inviato come allegato al tuo account {{platform}} collegato.",
+ "messenger.push.resource.placeholder": "Aggiungi un messaggio (facoltativo)…",
"messenger.push.retry": "Riprova",
"messenger.push.sectionTitle": "Invio messaggi",
"messenger.push.send": "Invia a {{platform}}",
diff --git a/locales/it-IT/modelRuntime.json b/locales/it-IT/modelRuntime.json
index 50d41309c36..9657224dc0b 100644
--- a/locales/it-IT/modelRuntime.json
+++ b/locales/it-IT/modelRuntime.json
@@ -13,6 +13,7 @@
"ContextEnginePipelineError": "Impossibile assemblare il contesto della conversazione per questa richiesta. Riprova; se il problema persiste, contatta l'assistenza.",
"DatabasePersistError": "Un'operazione sul database è fallita durante il salvataggio o il caricamento di questa conversazione. Riprova; se il problema persiste, contatta l'assistenza.",
"ExceededContextWindow": "Il contenuto della richiesta corrente supera la lunghezza che il modello può gestire. Riduci la quantità di contenuto e riprova.",
+ "HarnessJsonParseError": "Un payload interno non è stato possibile leggere, quindi questa operazione è stata interrotta. Ripetere la stessa richiesta porterà allo stesso errore — si prega di iniziare un nuovo messaggio; se il problema persiste, contattare il supporto.",
"InsufficientQuota": "Spiacenti, la quota per questa chiave è stata raggiunta. Controlla se il saldo del tuo account è sufficiente o riprova dopo aver aumentato la quota della chiave.",
"InvalidBedrockCredentials": "Autenticazione Bedrock fallita. Controlla AccessKeyId/SecretAccessKey e riprova.",
"InvalidComfyUIArgs": "Configurazione ComfyUI non valida. Controlla le impostazioni e riprova.",
diff --git a/locales/it-IT/verify.json b/locales/it-IT/verify.json
index 70fedeb64a6..7ae429f906a 100644
--- a/locales/it-IT/verify.json
+++ b/locales/it-IT/verify.json
@@ -273,6 +273,10 @@
"acceptance.workspace.filters.noSearchResults": "Nessuna accettazione corrisponde a “{{query}}”.",
"acceptance.workspace.filters.showAll": "Mostra tutte le accettazioni",
"acceptance.workspace.filters.title": "Filtra accettazioni",
+ "acceptance.workspace.groups.actions": "Azioni del progetto",
+ "acceptance.workspace.groups.createProject": "Crea progetto",
+ "acceptance.workspace.groups.ungrouped": "Non raggruppato",
+ "acceptance.workspace.groups.viewProject": "Visualizza progetto",
"acceptance.workspace.listEmpty": "Inserisci un rapporto di verifica con il CLI e la sua accettazione apparirà qui.",
"acceptance.workspace.listEmptyTitle": "Nessuna accettazione ancora",
"acceptance.workspace.renameEmpty": "Il titolo non può essere vuoto",
diff --git a/locales/ja-JP/components.json b/locales/ja-JP/components.json
index f0b9ebc4c38..0d87cba8498 100644
--- a/locales/ja-JP/components.json
+++ b/locales/ja-JP/components.json
@@ -47,6 +47,10 @@
"FileManager.actions.rename": "名前を変更",
"FileManager.actions.renameError": "名前の変更に失敗しました",
"FileManager.actions.renameSuccess": "名前の変更に成功しました",
+ "FileManager.actions.sendToMessenger": "メッセンジャーに送信",
+ "FileManager.actions.sendToMessengerSettings": "メッセンジャー設定",
+ "FileManager.actions.sendToMessengerSetup": "チャネルを設定",
+ "FileManager.actions.sendToMessengerSetupAction": "設定する",
"FileManager.bottom": "これ以上ありません",
"FileManager.config.showFilesInLibrary": "ライブラリ内のコンテンツを表示",
"FileManager.emptyStatus.actions.file": "ファイルをアップロード",
diff --git a/locales/ja-JP/messenger.json b/locales/ja-JP/messenger.json
index 31937f8aaef..11fde4deda7 100644
--- a/locales/ja-JP/messenger.json
+++ b/locales/ja-JP/messenger.json
@@ -74,6 +74,8 @@
"messenger.push.placeholder": "{{platform}}に送信するメッセージを入力してください…",
"messenger.push.queued": "{{count}}件のキューに入ったメッセージは、{{platform}}でボットにメッセージを送信した後に配信されます。",
"messenger.push.queuedToast": "送信ウィンドウが閉じています — メッセージはキューに入れられました。{{platform}}でボットにメッセージを送信すると受信できます。",
+ "messenger.push.resource.description": "ファイルはリンクされた{{platform}}アカウントに添付ファイルとして送信されます。",
+ "messenger.push.resource.placeholder": "メッセージを追加してください(任意)…",
"messenger.push.retry": "再試行",
"messenger.push.sectionTitle": "メッセージプッシュ",
"messenger.push.send": "{{platform}}に送信",
diff --git a/locales/ja-JP/modelRuntime.json b/locales/ja-JP/modelRuntime.json
index 35471c722ae..37532131765 100644
--- a/locales/ja-JP/modelRuntime.json
+++ b/locales/ja-JP/modelRuntime.json
@@ -13,6 +13,7 @@
"ContextEnginePipelineError": "このリクエストの会話コンテキストの組み立てに失敗しました。再試行してください。それでも解決しない場合はサポートにお問い合わせください。",
"DatabasePersistError": "この会話を保存または読み込む際にデータベース操作が失敗しました。再試行してください。それでも解決しない場合はサポートにお問い合わせください。",
"ExceededContextWindow": "現在のリクエスト内容がモデルが処理できる長さを超えています。内容を減らして再試行してください。",
+ "HarnessJsonParseError": "内部ペイロードを読み取ることができなかったため、この操作は停止しました。同じリクエストを再試行しても同じエラーが発生します。新しいメッセージを開始してください。それでも問題が解決しない場合は、サポートにお問い合わせください。",
"InsufficientQuota": "申し訳ありませんが、このキーのクォータが上限に達しました。アカウント残高が十分であることを確認するか、キーのクォータを増やして再試行してください。",
"InvalidBedrockCredentials": "Bedrock認証に失敗しました。AccessKeyId/SecretAccessKeyを確認して再試行してください。",
"InvalidComfyUIArgs": "ComfyUIの設定が無効です。設定を確認して再試行してください。",
diff --git a/locales/ja-JP/verify.json b/locales/ja-JP/verify.json
index 0aac0919626..47691f269a9 100644
--- a/locales/ja-JP/verify.json
+++ b/locales/ja-JP/verify.json
@@ -273,6 +273,10 @@
"acceptance.workspace.filters.noSearchResults": "「{{query}}」に一致する受け入れはありません。",
"acceptance.workspace.filters.showAll": "すべての受け入れを表示",
"acceptance.workspace.filters.title": "受け入れをフィルタリング",
+ "acceptance.workspace.groups.actions": "プロジェクトの操作",
+ "acceptance.workspace.groups.createProject": "プロジェクトを作成",
+ "acceptance.workspace.groups.ungrouped": "グループ化されていない",
+ "acceptance.workspace.groups.viewProject": "プロジェクトを表示",
"acceptance.workspace.listEmpty": "CLIで検証レポートを取り込むと、その受け入れがここに表示されます。",
"acceptance.workspace.listEmptyTitle": "まだ受け入れがありません",
"acceptance.workspace.renameEmpty": "タイトルは空にできません",
diff --git a/locales/ko-KR/components.json b/locales/ko-KR/components.json
index 955df5d1e62..a92d0a7b5dd 100644
--- a/locales/ko-KR/components.json
+++ b/locales/ko-KR/components.json
@@ -47,6 +47,10 @@
"FileManager.actions.rename": "이름 변경",
"FileManager.actions.renameError": "이름 변경에 실패했습니다",
"FileManager.actions.renameSuccess": "이름이 성공적으로 변경되었습니다",
+ "FileManager.actions.sendToMessenger": "메신저로 보내기",
+ "FileManager.actions.sendToMessengerSettings": "메신저 설정",
+ "FileManager.actions.sendToMessengerSetup": "채널 설정",
+ "FileManager.actions.sendToMessengerSetupAction": "설정하기",
"FileManager.bottom": "마지막입니다",
"FileManager.config.showFilesInLibrary": "라이브러리에서 콘텐츠 보기",
"FileManager.emptyStatus.actions.file": "파일 업로드",
diff --git a/locales/ko-KR/messenger.json b/locales/ko-KR/messenger.json
index 18fb37c3fa2..66ee6535d3f 100644
--- a/locales/ko-KR/messenger.json
+++ b/locales/ko-KR/messenger.json
@@ -74,6 +74,8 @@
"messenger.push.placeholder": "{{platform}}에 보낼 메시지를 작성하세요…",
"messenger.push.queued": "{{count}}개의 대기 중인 메시지가 {{platform}}에서 봇에게 메시지를 보낸 후 전달됩니다.",
"messenger.push.queuedToast": "전송 창이 닫혔습니다 — 메시지가 대기 중입니다. {{platform}}에서 봇에게 메시지를 보내면 받을 수 있습니다.",
+ "messenger.push.resource.description": "파일은 연결된 {{platform}} 계정에 첨부 파일로 전송됩니다.",
+ "messenger.push.resource.placeholder": "메시지를 추가하세요 (선택 사항)…",
"messenger.push.retry": "다시 시도",
"messenger.push.sectionTitle": "메시지 푸시",
"messenger.push.send": "{{platform}}에 보내기",
diff --git a/locales/ko-KR/modelRuntime.json b/locales/ko-KR/modelRuntime.json
index 75ea19cc6e1..70264d56fff 100644
--- a/locales/ko-KR/modelRuntime.json
+++ b/locales/ko-KR/modelRuntime.json
@@ -13,6 +13,7 @@
"ContextEnginePipelineError": "이 요청에 대한 대화 컨텍스트를 조립하지 못했습니다. 다시 시도하세요. 문제가 지속되면 지원팀에 문의하세요.",
"DatabasePersistError": "이 대화를 저장하거나 로드하는 동안 데이터베이스 작업에 실패했습니다. 다시 시도하세요. 문제가 지속되면 지원팀에 문의하세요.",
"ExceededContextWindow": "현재 요청 내용이 모델이 처리할 수 있는 길이를 초과했습니다. 내용을 줄이고 다시 시도하세요.",
+ "HarnessJsonParseError": "내부 페이로드를 다시 읽을 수 없어 이 작업이 중단되었습니다. 동일한 요청을 다시 시도하면 동일한 오류가 발생하므로 새 메시지를 시작하십시오. 문제가 계속되면 지원팀에 문의하십시오.",
"InsufficientQuota": "죄송합니다. 이 키의 할당량이 초과되었습니다. 계정 잔액이 충분한지 확인하거나 키의 할당량을 늘린 후 다시 시도하세요.",
"InvalidBedrockCredentials": "Bedrock 인증에 실패했습니다. AccessKeyId/SecretAccessKey를 확인하고 다시 시도하세요.",
"InvalidComfyUIArgs": "ComfyUI 구성이 잘못되었습니다. 설정을 확인하고 다시 시도하세요.",
diff --git a/locales/ko-KR/verify.json b/locales/ko-KR/verify.json
index 8318cb3ae39..19ffdb4ba38 100644
--- a/locales/ko-KR/verify.json
+++ b/locales/ko-KR/verify.json
@@ -273,6 +273,10 @@
"acceptance.workspace.filters.noSearchResults": "“{{query}}”와 일치하는 수락이 없습니다.",
"acceptance.workspace.filters.showAll": "모든 수락 보기",
"acceptance.workspace.filters.title": "수락 필터",
+ "acceptance.workspace.groups.actions": "프로젝트 작업",
+ "acceptance.workspace.groups.createProject": "프로젝트 생성",
+ "acceptance.workspace.groups.ungrouped": "그룹화되지 않음",
+ "acceptance.workspace.groups.viewProject": "프로젝트 보기",
"acceptance.workspace.listEmpty": "CLI를 사용하여 검증 보고서를 가져오면 해당 수락이 여기에 표시됩니다.",
"acceptance.workspace.listEmptyTitle": "아직 수락이 없습니다",
"acceptance.workspace.renameEmpty": "제목은 비워둘 수 없습니다",
diff --git a/locales/nl-NL/components.json b/locales/nl-NL/components.json
index 43899c74a8e..a5fd57a8ed8 100644
--- a/locales/nl-NL/components.json
+++ b/locales/nl-NL/components.json
@@ -47,6 +47,10 @@
"FileManager.actions.rename": "Hernoemen",
"FileManager.actions.renameError": "Hernoemen mislukt",
"FileManager.actions.renameSuccess": "Hernoemen geslaagd",
+ "FileManager.actions.sendToMessenger": "Verstuur naar Messenger",
+ "FileManager.actions.sendToMessengerSettings": "Messenger-instellingen",
+ "FileManager.actions.sendToMessengerSetup": "Kanalen instellen",
+ "FileManager.actions.sendToMessengerSetupAction": "Instellen",
"FileManager.bottom": "Je bent aan het einde gekomen.",
"FileManager.config.showFilesInLibrary": "Toon inhoud in bibliotheek",
"FileManager.emptyStatus.actions.file": "Bestand uploaden",
diff --git a/locales/nl-NL/messenger.json b/locales/nl-NL/messenger.json
index d8926c5e8c1..b5a13fbcd8f 100644
--- a/locales/nl-NL/messenger.json
+++ b/locales/nl-NL/messenger.json
@@ -74,6 +74,8 @@
"messenger.push.placeholder": "Schrijf een bericht om te verzenden naar {{platform}}…",
"messenger.push.queued": "{{count}} bericht(en) in de wachtrij worden afgeleverd nadat je de bot een bericht stuurt in {{platform}}.",
"messenger.push.queuedToast": "Het verzendvenster is gesloten — je bericht staat in de wachtrij. Stuur een bericht naar de bot in {{platform}} om het te ontvangen.",
+ "messenger.push.resource.description": "Het bestand wordt als bijlage verzonden naar je gekoppelde {{platform}} account.",
+ "messenger.push.resource.placeholder": "Voeg een bericht toe (optioneel)…",
"messenger.push.retry": "Opnieuw proberen",
"messenger.push.sectionTitle": "Bericht Push",
"messenger.push.send": "Verstuur naar {{platform}}",
diff --git a/locales/nl-NL/modelRuntime.json b/locales/nl-NL/modelRuntime.json
index cd1abc064f8..eadbad0d566 100644
--- a/locales/nl-NL/modelRuntime.json
+++ b/locales/nl-NL/modelRuntime.json
@@ -13,6 +13,7 @@
"ContextEnginePipelineError": "Het samenstellen van de gesprekscontext voor dit verzoek is mislukt. Probeer het opnieuw; neem contact op met de ondersteuning als het probleem aanhoudt.",
"DatabasePersistError": "Een databasebewerking is mislukt bij het opslaan of laden van dit gesprek. Probeer het opnieuw; neem contact op met de ondersteuning als het probleem aanhoudt.",
"ExceededContextWindow": "De inhoud van het huidige verzoek overschrijdt de lengte die het model aankan. Verminder de hoeveelheid inhoud en probeer het opnieuw.",
+ "HarnessJsonParseError": "Een interne payload kon niet worden teruggelezen, waardoor deze operatie is gestopt. Het opnieuw proberen van dezelfde aanvraag zal dezelfde fout opleveren — start een nieuw bericht; als het probleem aanhoudt, neem dan contact op met de ondersteuning.",
"InsufficientQuota": "Sorry, het quotum voor deze sleutel is bereikt. Controleer of uw accountbalans toereikend is of probeer het opnieuw nadat u het quotum van de sleutel hebt verhoogd.",
"InvalidBedrockCredentials": "Bedrock-authenticatie is mislukt. Controleer de AccessKeyId/SecretAccessKey en probeer het opnieuw.",
"InvalidComfyUIArgs": "Ongeldige ComfyUI-configuratie. Controleer de instellingen en probeer het opnieuw.",
diff --git a/locales/nl-NL/verify.json b/locales/nl-NL/verify.json
index aa3eaa091f7..86d132fa456 100644
--- a/locales/nl-NL/verify.json
+++ b/locales/nl-NL/verify.json
@@ -273,6 +273,10 @@
"acceptance.workspace.filters.noSearchResults": "Geen acceptaties komen overeen met “{{query}}”.",
"acceptance.workspace.filters.showAll": "Toon alle acceptaties",
"acceptance.workspace.filters.title": "Filter acceptaties",
+ "acceptance.workspace.groups.actions": "Projectacties",
+ "acceptance.workspace.groups.createProject": "Project maken",
+ "acceptance.workspace.groups.ungrouped": "Niet gegroepeerd",
+ "acceptance.workspace.groups.viewProject": "Project bekijken",
"acceptance.workspace.listEmpty": "Voer een verificatierapport in met de CLI en de acceptatie verschijnt hier.",
"acceptance.workspace.listEmptyTitle": "Nog geen acceptaties",
"acceptance.workspace.renameEmpty": "De titel mag niet leeg zijn",
diff --git a/locales/pl-PL/components.json b/locales/pl-PL/components.json
index 0d4a1f1a755..2f09ddb7ba3 100644
--- a/locales/pl-PL/components.json
+++ b/locales/pl-PL/components.json
@@ -47,6 +47,10 @@
"FileManager.actions.rename": "Zmień nazwę",
"FileManager.actions.renameError": "Zmiana nazwy nie powiodła się",
"FileManager.actions.renameSuccess": "Nazwa została pomyślnie zmieniona",
+ "FileManager.actions.sendToMessenger": "Wyślij do Messengera",
+ "FileManager.actions.sendToMessengerSettings": "Ustawienia Messengera",
+ "FileManager.actions.sendToMessengerSetup": "Skonfiguruj kanały",
+ "FileManager.actions.sendToMessengerSetupAction": "Skonfiguruj",
"FileManager.bottom": "To już koniec.",
"FileManager.config.showFilesInLibrary": "Pokaż zawartość w bibliotece",
"FileManager.emptyStatus.actions.file": "Prześlij plik",
diff --git a/locales/pl-PL/messenger.json b/locales/pl-PL/messenger.json
index c6632e3d375..69cdfee831c 100644
--- a/locales/pl-PL/messenger.json
+++ b/locales/pl-PL/messenger.json
@@ -74,6 +74,8 @@
"messenger.push.placeholder": "Napisz wiadomość do wysłania na {{platform}}…",
"messenger.push.queued": "{{count}} wiadomość(i) w kolejce zostanie dostarczona po wysłaniu wiadomości do bota na {{platform}}.",
"messenger.push.queuedToast": "Okno wysyłania jest zamknięte — Twoja wiadomość jest w kolejce. Wyślij wiadomość do bota na {{platform}}, aby ją otrzymać.",
+ "messenger.push.resource.description": "Plik zostanie wysłany jako załącznik do Twojego powiązanego konta {{platform}}.",
+ "messenger.push.resource.placeholder": "Dodaj wiadomość (opcjonalnie)…",
"messenger.push.retry": "Spróbuj ponownie",
"messenger.push.sectionTitle": "Wysyłanie wiadomości",
"messenger.push.send": "Wyślij na {{platform}}",
diff --git a/locales/pl-PL/modelRuntime.json b/locales/pl-PL/modelRuntime.json
index 26820f9033f..696b92d72f2 100644
--- a/locales/pl-PL/modelRuntime.json
+++ b/locales/pl-PL/modelRuntime.json
@@ -13,6 +13,7 @@
"ContextEnginePipelineError": "Nie udało się złożyć kontekstu rozmowy dla tego żądania. Proszę spróbować ponownie; jeśli problem będzie się powtarzał, skontaktuj się z pomocą techniczną.",
"DatabasePersistError": "Operacja na bazie danych nie powiodła się podczas zapisywania lub ładowania tej rozmowy. Proszę spróbować ponownie; jeśli problem będzie się powtarzał, skontaktuj się z pomocą techniczną.",
"ExceededContextWindow": "Treść bieżącego żądania przekracza długość, którą model może obsłużyć. Proszę zmniejszyć ilość treści i spróbować ponownie.",
+ "HarnessJsonParseError": "Nie można odczytać wewnętrznego ładunku, więc operacja została przerwana. Ponowienie tego samego żądania spowoduje ten sam błąd — proszę rozpocząć nową wiadomość; jeśli problem będzie się powtarzał, skontaktuj się z pomocą techniczną.",
"InsufficientQuota": "Przepraszamy, osiągnięto limit przydziału dla tego klucza. Proszę sprawdzić, czy saldo konta jest wystarczające, lub spróbować ponownie po zwiększeniu przydziału klucza.",
"InvalidBedrockCredentials": "Uwierzytelnianie Bedrock nie powiodło się. Proszę sprawdzić AccessKeyId/SecretAccessKey i spróbować ponownie.",
"InvalidComfyUIArgs": "Nieprawidłowa konfiguracja ComfyUI. Proszę sprawdzić ustawienia i spróbować ponownie.",
diff --git a/locales/pl-PL/verify.json b/locales/pl-PL/verify.json
index 8c01b11b1fe..8563f0792af 100644
--- a/locales/pl-PL/verify.json
+++ b/locales/pl-PL/verify.json
@@ -273,6 +273,10 @@
"acceptance.workspace.filters.noSearchResults": "Brak akceptacji pasujących do „{{query}}”.",
"acceptance.workspace.filters.showAll": "Pokaż wszystkie akceptacje",
"acceptance.workspace.filters.title": "Filtruj akceptacje",
+ "acceptance.workspace.groups.actions": "Akcje projektu",
+ "acceptance.workspace.groups.createProject": "Utwórz projekt",
+ "acceptance.workspace.groups.ungrouped": "Nieskategoryzowane",
+ "acceptance.workspace.groups.viewProject": "Zobacz projekt",
"acceptance.workspace.listEmpty": "Załaduj raport weryfikacyjny za pomocą CLI, a jego akceptacja pojawi się tutaj.",
"acceptance.workspace.listEmptyTitle": "Brak akceptacji",
"acceptance.workspace.renameEmpty": "Tytuł nie może być pusty",
diff --git a/locales/pt-BR/components.json b/locales/pt-BR/components.json
index 73abc7d0070..dfdc58d4062 100644
--- a/locales/pt-BR/components.json
+++ b/locales/pt-BR/components.json
@@ -47,6 +47,10 @@
"FileManager.actions.rename": "Renomear",
"FileManager.actions.renameError": "Falha ao renomear",
"FileManager.actions.renameSuccess": "Renomeado com sucesso",
+ "FileManager.actions.sendToMessenger": "Enviar para o Messenger",
+ "FileManager.actions.sendToMessengerSettings": "Configurações do Messenger",
+ "FileManager.actions.sendToMessengerSetup": "Configurar Canais",
+ "FileManager.actions.sendToMessengerSetupAction": "Configurar",
"FileManager.bottom": "Você chegou ao fim.",
"FileManager.config.showFilesInLibrary": "Mostrar conteúdo na Biblioteca",
"FileManager.emptyStatus.actions.file": "Enviar Arquivo",
diff --git a/locales/pt-BR/messenger.json b/locales/pt-BR/messenger.json
index de10ad02213..0010acfa913 100644
--- a/locales/pt-BR/messenger.json
+++ b/locales/pt-BR/messenger.json
@@ -74,6 +74,8 @@
"messenger.push.placeholder": "Escreva uma mensagem para enviar ao {{platform}}…",
"messenger.push.queued": "{{count}} mensagem(ns) na fila será(ão) entregue(s) após você enviar uma mensagem ao bot no {{platform}}.",
"messenger.push.queuedToast": "A janela de envio está fechada — sua mensagem está na fila. Envie uma mensagem ao bot no {{platform}} para recebê-la.",
+ "messenger.push.resource.description": "O arquivo será enviado como um anexo para sua conta vinculada no {{platform}}.",
+ "messenger.push.resource.placeholder": "Adicione uma mensagem (opcional)…",
"messenger.push.retry": "Tentar novamente",
"messenger.push.sectionTitle": "Envio de Mensagens",
"messenger.push.send": "Enviar para {{platform}}",
diff --git a/locales/pt-BR/modelRuntime.json b/locales/pt-BR/modelRuntime.json
index 2abd7be8f11..41b1d1f6981 100644
--- a/locales/pt-BR/modelRuntime.json
+++ b/locales/pt-BR/modelRuntime.json
@@ -13,6 +13,7 @@
"ContextEnginePipelineError": "Falha ao montar o contexto da conversa para esta solicitação. Por favor, tente novamente; se o problema persistir, entre em contato com o suporte.",
"DatabasePersistError": "Uma operação no banco de dados falhou ao salvar ou carregar esta conversa. Por favor, tente novamente; se o problema persistir, entre em contato com o suporte.",
"ExceededContextWindow": "O conteúdo da solicitação atual excede o comprimento que o modelo pode processar. Por favor, reduza a quantidade de conteúdo e tente novamente.",
+ "HarnessJsonParseError": "Um payload interno não pôde ser lido, então esta operação foi interrompida. Repetir a mesma solicitação resultará na mesma falha — por favor, inicie uma nova mensagem; se o problema persistir, entre em contato com o suporte.",
"InsufficientQuota": "Desculpe, a cota para esta chave foi atingida. Por favor, verifique se o saldo da sua conta é suficiente ou tente novamente após aumentar a cota da chave.",
"InvalidBedrockCredentials": "Falha na autenticação do Bedrock. Por favor, verifique o AccessKeyId/SecretAccessKey e tente novamente.",
"InvalidComfyUIArgs": "Configuração inválida do ComfyUI. Por favor, verifique as configurações e tente novamente.",
diff --git a/locales/pt-BR/verify.json b/locales/pt-BR/verify.json
index a9a91b45940..1abb29af752 100644
--- a/locales/pt-BR/verify.json
+++ b/locales/pt-BR/verify.json
@@ -273,6 +273,10 @@
"acceptance.workspace.filters.noSearchResults": "Nenhuma aceitação corresponde a “{{query}}”.",
"acceptance.workspace.filters.showAll": "Mostrar todas as aceitações",
"acceptance.workspace.filters.title": "Filtrar aceitações",
+ "acceptance.workspace.groups.actions": "Ações do projeto",
+ "acceptance.workspace.groups.createProject": "Criar projeto",
+ "acceptance.workspace.groups.ungrouped": "Desagrupado",
+ "acceptance.workspace.groups.viewProject": "Visualizar projeto",
"acceptance.workspace.listEmpty": "Ingestione um relatório de verificação com o CLI e sua aceitação aparecerá aqui.",
"acceptance.workspace.listEmptyTitle": "Ainda não há aceitações",
"acceptance.workspace.renameEmpty": "O título não pode estar vazio",
diff --git a/locales/ru-RU/components.json b/locales/ru-RU/components.json
index dd95edb1c18..4bbe9e26246 100644
--- a/locales/ru-RU/components.json
+++ b/locales/ru-RU/components.json
@@ -47,6 +47,10 @@
"FileManager.actions.rename": "Переименовать",
"FileManager.actions.renameError": "Ошибка при переименовании",
"FileManager.actions.renameSuccess": "Переименование прошло успешно",
+ "FileManager.actions.sendToMessenger": "Отправить в Messenger",
+ "FileManager.actions.sendToMessengerSettings": "Настройки Messenger",
+ "FileManager.actions.sendToMessengerSetup": "Настроить каналы",
+ "FileManager.actions.sendToMessengerSetupAction": "Настроить",
"FileManager.bottom": "Вы достигли конца.",
"FileManager.config.showFilesInLibrary": "Показать содержимое в библиотеке",
"FileManager.emptyStatus.actions.file": "Загрузить файл",
diff --git a/locales/ru-RU/messenger.json b/locales/ru-RU/messenger.json
index 0642eb939f4..0d82be12c23 100644
--- a/locales/ru-RU/messenger.json
+++ b/locales/ru-RU/messenger.json
@@ -74,6 +74,8 @@
"messenger.push.placeholder": "Напишите сообщение для отправки в {{platform}}…",
"messenger.push.queued": "{{count}} сообщение(й) в очереди будет доставлено после того, как вы отправите сообщение боту в {{platform}}.",
"messenger.push.queuedToast": "Окно отправки закрыто — ваше сообщение добавлено в очередь. Отправьте сообщение боту в {{platform}}, чтобы получить его.",
+ "messenger.push.resource.description": "Файл будет отправлен в виде вложения на ваш связанный аккаунт {{platform}}.",
+ "messenger.push.resource.placeholder": "Добавьте сообщение (необязательно)…",
"messenger.push.retry": "Попробовать снова",
"messenger.push.sectionTitle": "Отправка сообщений",
"messenger.push.send": "Отправить в {{platform}}",
diff --git a/locales/ru-RU/modelRuntime.json b/locales/ru-RU/modelRuntime.json
index 0a5f807e6b6..cbc3f03f2be 100644
--- a/locales/ru-RU/modelRuntime.json
+++ b/locales/ru-RU/modelRuntime.json
@@ -13,6 +13,7 @@
"ContextEnginePipelineError": "Не удалось собрать контекст разговора для этого запроса. Пожалуйста, повторите попытку; если проблема сохраняется, свяжитесь с поддержкой.",
"DatabasePersistError": "Ошибка операции с базой данных при сохранении или загрузке этого разговора. Пожалуйста, повторите попытку; если проблема сохраняется, свяжитесь с поддержкой.",
"ExceededContextWindow": "Содержимое текущего запроса превышает длину, которую модель может обработать. Пожалуйста, уменьшите объем содержимого и повторите попытку.",
+ "HarnessJsonParseError": "Внутренний полезный груз не удалось прочитать, поэтому операция была остановлена. Повторение того же запроса приведет к той же ошибке — пожалуйста, начните новое сообщение; если проблема сохраняется, обратитесь в службу поддержки.",
"InsufficientQuota": "Извините, квота для этого ключа исчерпана. Пожалуйста, проверьте баланс вашего аккаунта или увеличьте квоту ключа.",
"InvalidBedrockCredentials": "Ошибка аутентификации Bedrock. Пожалуйста, проверьте AccessKeyId/SecretAccessKey и повторите попытку.",
"InvalidComfyUIArgs": "Некорректная конфигурация ComfyUI. Пожалуйста, проверьте настройки и повторите попытку.",
diff --git a/locales/ru-RU/verify.json b/locales/ru-RU/verify.json
index f18004a0683..efe1cb25833 100644
--- a/locales/ru-RU/verify.json
+++ b/locales/ru-RU/verify.json
@@ -273,6 +273,10 @@
"acceptance.workspace.filters.noSearchResults": "Нет принятий, соответствующих «{{query}}».",
"acceptance.workspace.filters.showAll": "Показать все принятия",
"acceptance.workspace.filters.title": "Фильтр принятий",
+ "acceptance.workspace.groups.actions": "Действия проекта",
+ "acceptance.workspace.groups.createProject": "Создать проект",
+ "acceptance.workspace.groups.ungrouped": "Без группы",
+ "acceptance.workspace.groups.viewProject": "Просмотреть проект",
"acceptance.workspace.listEmpty": "Загрузите отчет о проверке через CLI, и его принятие появится здесь.",
"acceptance.workspace.listEmptyTitle": "Пока нет принятий",
"acceptance.workspace.renameEmpty": "Название не может быть пустым",
diff --git a/locales/tr-TR/components.json b/locales/tr-TR/components.json
index 51f67452bb5..4ec865d2313 100644
--- a/locales/tr-TR/components.json
+++ b/locales/tr-TR/components.json
@@ -47,6 +47,10 @@
"FileManager.actions.rename": "Yeniden Adlandır",
"FileManager.actions.renameError": "Yeniden adlandırma başarısız",
"FileManager.actions.renameSuccess": "Yeniden adlandırma başarılı",
+ "FileManager.actions.sendToMessenger": "Messenger'a Gönder",
+ "FileManager.actions.sendToMessengerSettings": "Messenger Ayarları",
+ "FileManager.actions.sendToMessengerSetup": "Kanalları Ayarla",
+ "FileManager.actions.sendToMessengerSetupAction": "Ayarla",
"FileManager.bottom": "Sonuna geldiniz.",
"FileManager.config.showFilesInLibrary": "Kütüphanedeki içeriği göster",
"FileManager.emptyStatus.actions.file": "Dosya Yükle",
diff --git a/locales/tr-TR/messenger.json b/locales/tr-TR/messenger.json
index a1433340901..a9d2cbe10d9 100644
--- a/locales/tr-TR/messenger.json
+++ b/locales/tr-TR/messenger.json
@@ -74,6 +74,8 @@
"messenger.push.placeholder": "{{platform}}'a göndermek için bir mesaj yazın…",
"messenger.push.queued": "{{count}} bekleyen mesaj, {{platform}}'da bota mesaj gönderdikten sonra teslim edilecek.",
"messenger.push.queuedToast": "Gönderim penceresi kapalı — mesajınız sıraya alındı. Mesajı almak için {{platform}}'da bota mesaj gönderin.",
+ "messenger.push.resource.description": "Dosya, bağlı {{platform}} hesabınıza ek olarak gönderilecektir.",
+ "messenger.push.resource.placeholder": "Bir mesaj ekleyin (isteğe bağlı)…",
"messenger.push.retry": "Tekrar dene",
"messenger.push.sectionTitle": "Mesaj Gönderimi",
"messenger.push.send": "{{platform}}'a gönder",
diff --git a/locales/tr-TR/modelRuntime.json b/locales/tr-TR/modelRuntime.json
index 65e75d07255..e1537dba6ad 100644
--- a/locales/tr-TR/modelRuntime.json
+++ b/locales/tr-TR/modelRuntime.json
@@ -13,6 +13,7 @@
"ContextEnginePipelineError": "Bu istek için konuşma bağlamı birleştirilemedi. Lütfen yeniden deneyin; devam ederse destekle iletişime geçin.",
"DatabasePersistError": "Bu konuşmayı kaydederken veya yüklerken bir veritabanı işlemi başarısız oldu. Lütfen yeniden deneyin; devam ederse destekle iletişime geçin.",
"ExceededContextWindow": "Mevcut istek içeriği modelin işleyebileceği uzunluğu aşıyor. Lütfen içerik miktarını azaltıp yeniden deneyin.",
+ "HarnessJsonParseError": "Dahili bir yük geri okunamadığı için bu işlem durduruldu. Aynı isteği yeniden denemek aynı hatayı verecektir — lütfen yeni bir mesaj başlatın; devam ederse, destek ile iletişime geçin.",
"InsufficientQuota": "Üzgünüz, bu anahtar için kota doldu. Lütfen hesap bakiyenizin yeterli olup olmadığını kontrol edin veya anahtarın kotasını artırdıktan sonra yeniden deneyin.",
"InvalidBedrockCredentials": "Bedrock kimlik doğrulaması başarısız oldu. Lütfen AccessKeyId/SecretAccessKey'i kontrol edip yeniden deneyin.",
"InvalidComfyUIArgs": "Geçersiz ComfyUI yapılandırması. Lütfen ayarları kontrol edip yeniden deneyin.",
diff --git a/locales/tr-TR/verify.json b/locales/tr-TR/verify.json
index 9418aea67af..12716f88542 100644
--- a/locales/tr-TR/verify.json
+++ b/locales/tr-TR/verify.json
@@ -273,6 +273,10 @@
"acceptance.workspace.filters.noSearchResults": "“{{query}}” ile eşleşen kabul yok.",
"acceptance.workspace.filters.showAll": "Tüm kabulleri göster",
"acceptance.workspace.filters.title": "Kabulleri filtrele",
+ "acceptance.workspace.groups.actions": "Proje eylemleri",
+ "acceptance.workspace.groups.createProject": "Proje oluştur",
+ "acceptance.workspace.groups.ungrouped": "Gruplandırılmamış",
+ "acceptance.workspace.groups.viewProject": "Projeyi görüntüle",
"acceptance.workspace.listEmpty": "CLI ile bir doğrulama raporu yükleyin ve kabul burada görünecektir.",
"acceptance.workspace.listEmptyTitle": "Henüz kabul yok",
"acceptance.workspace.renameEmpty": "Başlık boş olamaz",
diff --git a/locales/vi-VN/components.json b/locales/vi-VN/components.json
index 1758f45722e..e985c28a028 100644
--- a/locales/vi-VN/components.json
+++ b/locales/vi-VN/components.json
@@ -47,6 +47,10 @@
"FileManager.actions.rename": "Đổi tên",
"FileManager.actions.renameError": "Đổi tên thất bại",
"FileManager.actions.renameSuccess": "Đổi tên thành công",
+ "FileManager.actions.sendToMessenger": "Gửi đến Messenger",
+ "FileManager.actions.sendToMessengerSettings": "Cài đặt Messenger",
+ "FileManager.actions.sendToMessengerSetup": "Thiết lập Kênh",
+ "FileManager.actions.sendToMessengerSetupAction": "Thiết lập",
"FileManager.bottom": "Bạn đã đến cuối danh sách.",
"FileManager.config.showFilesInLibrary": "Hiển thị nội dung trong Thư viện",
"FileManager.emptyStatus.actions.file": "Tải lên Tệp",
diff --git a/locales/vi-VN/messenger.json b/locales/vi-VN/messenger.json
index 72e4368ba78..ff311c13e71 100644
--- a/locales/vi-VN/messenger.json
+++ b/locales/vi-VN/messenger.json
@@ -74,6 +74,8 @@
"messenger.push.placeholder": "Viết tin nhắn để gửi đến {{platform}}…",
"messenger.push.queued": "{{count}} tin nhắn trong hàng đợi sẽ được gửi sau khi bạn nhắn tin cho bot trên {{platform}}.",
"messenger.push.queuedToast": "Cửa sổ gửi đã đóng — tin nhắn của bạn đang trong hàng đợi. Nhắn tin cho bot trên {{platform}} để nhận tin nhắn.",
+ "messenger.push.resource.description": "Tệp sẽ được gửi dưới dạng tệp đính kèm đến tài khoản {{platform}} được liên kết của bạn.",
+ "messenger.push.resource.placeholder": "Thêm tin nhắn (tùy chọn)…",
"messenger.push.retry": "Thử lại",
"messenger.push.sectionTitle": "Đẩy tin nhắn",
"messenger.push.send": "Gửi đến {{platform}}",
diff --git a/locales/vi-VN/modelRuntime.json b/locales/vi-VN/modelRuntime.json
index 09df4f76c82..f4e257980e5 100644
--- a/locales/vi-VN/modelRuntime.json
+++ b/locales/vi-VN/modelRuntime.json
@@ -13,6 +13,7 @@
"ContextEnginePipelineError": "Không thể lắp ráp ngữ cảnh hội thoại cho yêu cầu này. Vui lòng thử lại; nếu vấn đề vẫn tiếp diễn, hãy liên hệ với bộ phận hỗ trợ.",
"DatabasePersistError": "Một thao tác cơ sở dữ liệu đã thất bại khi lưu hoặc tải hội thoại này. Vui lòng thử lại; nếu vấn đề vẫn tiếp diễn, hãy liên hệ với bộ phận hỗ trợ.",
"ExceededContextWindow": "Nội dung yêu cầu hiện tại vượt quá độ dài mà mô hình có thể xử lý. Vui lòng giảm bớt nội dung và thử lại.",
+ "HarnessJsonParseError": "Một tải trọng nội bộ không thể được đọc lại, vì vậy hoạt động này đã dừng. Thử lại yêu cầu tương tự sẽ gặp cùng lỗi — vui lòng bắt đầu một tin nhắn mới; nếu vấn đề vẫn tiếp diễn, hãy liên hệ với bộ phận hỗ trợ.",
"InsufficientQuota": "Rất tiếc, hạn mức cho khóa này đã đạt đến giới hạn. Vui lòng kiểm tra số dư tài khoản của bạn hoặc thử lại sau khi tăng hạn mức của khóa.",
"InvalidBedrockCredentials": "Xác thực Bedrock thất bại. Vui lòng kiểm tra AccessKeyId/SecretAccessKey và thử lại.",
"InvalidComfyUIArgs": "Cấu hình ComfyUI không hợp lệ. Vui lòng kiểm tra cài đặt và thử lại.",
diff --git a/locales/vi-VN/verify.json b/locales/vi-VN/verify.json
index 17330635177..91f43905047 100644
--- a/locales/vi-VN/verify.json
+++ b/locales/vi-VN/verify.json
@@ -273,6 +273,10 @@
"acceptance.workspace.filters.noSearchResults": "Không có chấp nhận nào khớp với “{{query}}”.",
"acceptance.workspace.filters.showAll": "Hiển thị tất cả các chấp nhận",
"acceptance.workspace.filters.title": "Lọc các chấp nhận",
+ "acceptance.workspace.groups.actions": "Hành động dự án",
+ "acceptance.workspace.groups.createProject": "Tạo dự án",
+ "acceptance.workspace.groups.ungrouped": "Không nhóm",
+ "acceptance.workspace.groups.viewProject": "Xem dự án",
"acceptance.workspace.listEmpty": "Nhập một báo cáo xác minh bằng CLI và trạng thái chấp nhận của nó sẽ hiển thị ở đây.",
"acceptance.workspace.listEmptyTitle": "Chưa có trạng thái chấp nhận nào",
"acceptance.workspace.renameEmpty": "Tiêu đề không được để trống",
diff --git a/locales/zh-CN/components.json b/locales/zh-CN/components.json
index 84e2a980f6a..87ed650e8fa 100644
--- a/locales/zh-CN/components.json
+++ b/locales/zh-CN/components.json
@@ -47,6 +47,10 @@
"FileManager.actions.rename": "重命名",
"FileManager.actions.renameError": "重命名遇到了问题,请重试",
"FileManager.actions.renameSuccess": "重命名成功",
+ "FileManager.actions.sendToMessenger": "发送到聊天平台",
+ "FileManager.actions.sendToMessengerSettings": "聊天平台设置",
+ "FileManager.actions.sendToMessengerSetup": "去绑定渠道",
+ "FileManager.actions.sendToMessengerSetupAction": "去绑定",
"FileManager.bottom": "已到达页面底部。",
"FileManager.config.showFilesInLibrary": "在资料库中显示内容",
"FileManager.emptyStatus.actions.file": "上传文件",
diff --git a/locales/zh-CN/messenger.json b/locales/zh-CN/messenger.json
index c336ecf08c5..e780f11e669 100644
--- a/locales/zh-CN/messenger.json
+++ b/locales/zh-CN/messenger.json
@@ -74,6 +74,8 @@
"messenger.push.placeholder": "输入要发送到 {{platform}} 的消息…",
"messenger.push.queued": "{{count}} 条消息排队中,你在 {{platform}} 中给机器人发送消息后将自动送达。",
"messenger.push.queuedToast": "发送窗口未打开,消息已排队。在 {{platform}} 中给机器人发送消息后即可收到。",
+ "messenger.push.resource.description": "文件将作为附件发送到你绑定的 {{platform}} 账号。",
+ "messenger.push.resource.placeholder": "附带一条消息(可选)…",
"messenger.push.retry": "重试",
"messenger.push.sectionTitle": "消息推送",
"messenger.push.send": "发送到 {{platform}}",
diff --git a/locales/zh-TW/components.json b/locales/zh-TW/components.json
index d6c3f6f040e..73e3daeb374 100644
--- a/locales/zh-TW/components.json
+++ b/locales/zh-TW/components.json
@@ -47,6 +47,10 @@
"FileManager.actions.rename": "重新命名",
"FileManager.actions.renameError": "重新命名失敗",
"FileManager.actions.renameSuccess": "重新命名成功",
+ "FileManager.actions.sendToMessenger": "傳送至 Messenger",
+ "FileManager.actions.sendToMessengerSettings": "Messenger 設定",
+ "FileManager.actions.sendToMessengerSetup": "設定頻道",
+ "FileManager.actions.sendToMessengerSetupAction": "設定",
"FileManager.bottom": "已經到底啦",
"FileManager.config.showFilesInLibrary": "在資料庫中顯示內容",
"FileManager.emptyStatus.actions.file": "上傳文件",
diff --git a/locales/zh-TW/messenger.json b/locales/zh-TW/messenger.json
index cdda2d173a7..5b8ca40856e 100644
--- a/locales/zh-TW/messenger.json
+++ b/locales/zh-TW/messenger.json
@@ -74,6 +74,8 @@
"messenger.push.placeholder": "撰寫訊息以發送到 {{platform}}…",
"messenger.push.queued": "{{count}} 則排隊中的訊息將在您於 {{platform}} 與機器人互動後送達。",
"messenger.push.queuedToast": "發送窗口已關閉 — 您的訊息已排隊。請在 {{platform}} 與機器人互動以接收訊息。",
+ "messenger.push.resource.description": "檔案將作為附件發送到您連結的 {{platform}} 帳戶。",
+ "messenger.push.resource.placeholder": "新增訊息(選填)…",
"messenger.push.retry": "再試一次",
"messenger.push.sectionTitle": "訊息推送",
"messenger.push.send": "發送到 {{platform}}",
diff --git a/locales/zh-TW/modelRuntime.json b/locales/zh-TW/modelRuntime.json
index 04bdee3e831..f7cc8199e20 100644
--- a/locales/zh-TW/modelRuntime.json
+++ b/locales/zh-TW/modelRuntime.json
@@ -13,6 +13,7 @@
"ContextEnginePipelineError": "無法組裝此請求的對話上下文。請重試;如果問題持續,請聯繫支援。",
"DatabasePersistError": "保存或載入此對話時的資料庫操作失敗。請重試;如果問題持續,請聯繫支援。",
"ExceededContextWindow": "當前請求內容超過模型可處理的長度。請減少內容量並重試。",
+ "HarnessJsonParseError": "無法讀取內部負載,因此此操作已停止。重試相同的請求將遇到相同的錯誤——請開始新的訊息;如果問題持續,請聯絡支援。",
"InsufficientQuota": "抱歉,此金鑰的配額已達上限。請檢查您的帳戶餘額是否充足,或在增加金鑰配額後重試。",
"InvalidBedrockCredentials": "Bedrock 身份驗證失敗。請檢查 AccessKeyId/SecretAccessKey 並重試。",
"InvalidComfyUIArgs": "ComfyUI 配置無效。請檢查設置並重試。",
diff --git a/locales/zh-TW/verify.json b/locales/zh-TW/verify.json
index afd86ed718f..7b6c0d82f52 100644
--- a/locales/zh-TW/verify.json
+++ b/locales/zh-TW/verify.json
@@ -273,6 +273,10 @@
"acceptance.workspace.filters.noSearchResults": "沒有符合「{{query}}」的驗收。",
"acceptance.workspace.filters.showAll": "顯示所有驗收",
"acceptance.workspace.filters.title": "篩選驗收",
+ "acceptance.workspace.groups.actions": "專案操作",
+ "acceptance.workspace.groups.createProject": "建立專案",
+ "acceptance.workspace.groups.ungrouped": "未分組",
+ "acceptance.workspace.groups.viewProject": "查看專案",
"acceptance.workspace.listEmpty": "使用 CLI 引入驗證報告,其接受將顯示在此處。",
"acceptance.workspace.listEmptyTitle": "尚無接受",
"acceptance.workspace.renameEmpty": "標題不能為空",
diff --git a/packages/locales/src/default/components.ts b/packages/locales/src/default/components.ts
index b6438e2a274..388bc6cda69 100644
--- a/packages/locales/src/default/components.ts
+++ b/packages/locales/src/default/components.ts
@@ -58,6 +58,10 @@ export default {
'FileManager.actions.rename': 'Rename',
'FileManager.actions.renameError': 'Rename failed',
'FileManager.actions.renameSuccess': 'Rename successful',
+ 'FileManager.actions.sendToMessenger': 'Send to Messenger',
+ 'FileManager.actions.sendToMessengerSettings': 'Messenger Settings',
+ 'FileManager.actions.sendToMessengerSetup': 'Set Up Channels',
+ 'FileManager.actions.sendToMessengerSetupAction': 'Set Up',
'FileManager.bottom': "You've reached the end.",
'FileManager.config.showFilesInLibrary': 'Show content in Library',
'FileManager.emptyStatus.actions.file': 'Upload File',
diff --git a/packages/locales/src/default/messenger.ts b/packages/locales/src/default/messenger.ts
index 02bce421659..0a00d800014 100644
--- a/packages/locales/src/default/messenger.ts
+++ b/packages/locales/src/default/messenger.ts
@@ -136,6 +136,9 @@ export default {
'{{count}} queued message(s) will be delivered after you message the bot in {{platform}}.',
'messenger.push.queuedToast':
'The send window is closed — your message is queued. Message the bot in {{platform}} to receive it.',
+ 'messenger.push.resource.description':
+ 'The file will be sent as an attachment to your linked {{platform}} account.',
+ 'messenger.push.resource.placeholder': 'Add a message (optional)…',
'messenger.push.retry': 'Try again',
'messenger.push.sectionTitle': 'Message Push',
'messenger.push.send': 'Send to {{platform}}',
diff --git a/src/features/Billboard/Carousel.tsx b/src/features/Billboard/Carousel.tsx
index 53e37191d31..d8e1c19b056 100644
--- a/src/features/Billboard/Carousel.tsx
+++ b/src/features/Billboard/Carousel.tsx
@@ -134,115 +134,117 @@ const styles = createStaticStyles(({ css }) => ({
`,
}));
-const ItemContent = memo<{ billboardSlug: string; item: BillboardItem; position: number }>(
- ({ item, billboardSlug, position }) => {
- const { t, i18n } = useTranslation('notification');
- const { analytics } = useAnalytics();
- const resolved = useMemo(
- () => resolveBillboardItem(item, i18n.language),
- [item, i18n.language],
- );
-
- const action = resolveBillboardAction(item.action);
-
- const trackCtaClick = useCallback(
- (extra: Record<string, unknown>) => {
- analytics?.track({
- name: 'billboard_cta_clicked',
- properties: {
- billboard_slug: billboardSlug,
- item_id: item.id,
- position,
- spm: 'billboard.cta.clicked',
- ...extra,
- },
- });
- },
- [analytics, billboardSlug, item.id, position],
- );
-
- const handleActionClick = useCallback(async () => {
- if (!action) return;
- trackCtaClick({ action });
- await Promise.resolve(runBillboardAction(action)).catch(() => {});
- }, [action, trackCtaClick]);
-
- const handleLinkClick = useCallback(() => {
- trackCtaClick({ link_url: item.linkUrl });
- }, [trackCtaClick, item.linkUrl]);
-
- const titleRef = useRef<HTMLDivElement>(null);
- const descRef = useRef<HTMLDivElement>(null);
- const [titleOverflow, setTitleOverflow] = useState(false);
- const [descOverflow, setDescOverflow] = useState(false);
-
- useLayoutEffect(() => {
- const el = titleRef.current;
- if (!el) return;
- setTitleOverflow(el.scrollHeight > el.clientHeight + 1);
- }, [resolved.title]);
-
- useLayoutEffect(() => {
- const el = descRef.current;
- if (!el) return;
- setDescOverflow(el.scrollHeight > el.clientHeight + 1);
- }, [resolved.description]);
-
- const titleNode = (
- <div className={styles.title} ref={titleRef}>
- {resolved.title}
- </div>
- );
-
- const descNode = resolved.description && (
- <div className={styles.description} ref={descRef}>
- {resolved.description}
- </div>
- );
-
- return (
- <Flexbox gap={0}>
- {item.cover && <img alt="" className={styles.image} src={item.cover} />}
- <Flexbox className={styles.itemBody} gap={4}>
- {titleOverflow ? (
- <Tooltip placement="top" title={resolved.title}>
- {titleNode}
+const ItemContent = memo<{
+ billboardSlug: string;
+ item: BillboardItem;
+ onClose: () => void;
+ position: number;
+}>(({ item, billboardSlug, position, onClose }) => {
+ const { t, i18n } = useTranslation('notification');
+ const { analytics } = useAnalytics();
+ const resolved = useMemo(() => resolveBillboardItem(item, i18n.language), [item, i18n.language]);
+
+ const action = resolveBillboardAction(item.action);
+
+ const trackCtaClick = useCallback(
+ (extra: Record<string, unknown>) => {
+ analytics?.track({
+ name: 'billboard_cta_clicked',
+ properties: {
+ billboard_slug: billboardSlug,
+ item_id: item.id,
+ position,
+ spm: 'billboard.cta.clicked',
+ ...extra,
+ },
+ });
+ },
+ [analytics, billboardSlug, item.id, position],
+ );
+
+ const handleActionClick = useCallback(async () => {
+ if (!action) return;
+ trackCtaClick({ action });
+ onClose();
+ await Promise.resolve(runBillboardAction(action)).catch(() => {});
+ }, [action, trackCtaClick, onClose]);
+
+ const handleLinkClick = useCallback(() => {
+ trackCtaClick({ link_url: item.linkUrl });
+ onClose();
+ }, [trackCtaClick, item.linkUrl, onClose]);
+
+ const titleRef = useRef<HTMLDivElement>(null);
+ const descRef = useRef<HTMLDivElement>(null);
+ const [titleOverflow, setTitleOverflow] = useState(false);
+ const [descOverflow, setDescOverflow] = useState(false);
+
+ useLayoutEffect(() => {
+ const el = titleRef.current;
+ if (!el) return;
+ setTitleOverflow(el.scrollHeight > el.clientHeight + 1);
+ }, [resolved.title]);
+
+ useLayoutEffect(() => {
+ const el = descRef.current;
+ if (!el) return;
+ setDescOverflow(el.scrollHeight > el.clientHeight + 1);
+ }, [resolved.description]);
+
+ const titleNode = (
+ <div className={styles.title} ref={titleRef}>
+ {resolved.title}
+ </div>
+ );
+
+ const descNode = resolved.description && (
+ <div className={styles.description} ref={descRef}>
+ {resolved.description}
+ </div>
+ );
+
+ return (
+ <Flexbox gap={0}>
+ {item.cover && <img alt="" className={styles.image} src={item.cover} />}
+ <Flexbox className={styles.itemBody} gap={4}>
+ {titleOverflow ? (
+ <Tooltip placement="top" title={resolved.title}>
+ {titleNode}
+ </Tooltip>
+ ) : (
+ titleNode
+ )}
+ {descNode &&
+ (descOverflow ? (
+ <Tooltip placement="top" title={resolved.description}>
+ {descNode}
</Tooltip>
) : (
- titleNode
- )}
- {descNode &&
- (descOverflow ? (
- <Tooltip placement="top" title={resolved.description}>
- {descNode}
- </Tooltip>
- ) : (
- descNode
- ))}
- {action ? (
- <Button block className={styles.action} type="primary" onClick={handleActionClick}>
- {resolved.linkLabel ?? t('billboard.learnMore')}
- </Button>
- ) : (
- item.linkUrl && (
- <a
- className={styles.action}
- href={item.linkUrl}
- rel="noopener noreferrer"
- target="_blank"
- onClick={handleLinkClick}
- >
- <Button block type="primary">
- {resolved.linkLabel ?? t('billboard.learnMore')}
- </Button>
- </a>
- )
- )}
- </Flexbox>
+ descNode
+ ))}
+ {action ? (
+ <Button block className={styles.action} type="primary" onClick={handleActionClick}>
+ {resolved.linkLabel ?? t('billboard.learnMore')}
+ </Button>
+ ) : (
+ item.linkUrl && (
+ <a
+ className={styles.action}
+ href={item.linkUrl}
+ rel="noopener noreferrer"
+ target="_blank"
+ onClick={handleLinkClick}
+ >
+ <Button block type="primary">
+ {resolved.linkLabel ?? t('billboard.learnMore')}
+ </Button>
+ </a>
+ )
+ )}
</Flexbox>
- );
- },
-);
+ </Flexbox>
+ );
+});
ItemContent.displayName = 'BillboardItemContent';
@@ -299,7 +301,12 @@ const BillboardCarousel = memo<BillboardCarouselProps>(
>
<ActionIcon className={styles.closeButton} icon={X} size={14} onClick={onClose} />
{single ? (
- <ItemContent billboardSlug={set.slug} item={set.items[0]} position={0} />
+ <ItemContent
+ billboardSlug={set.slug}
+ item={set.items[0]}
+ position={0}
+ onClose={onClose}
+ />
) : (
<>
<AntCarousel
@@ -312,7 +319,12 @@ const BillboardCarousel = memo<BillboardCarouselProps>(
>
{set.items.map((item, idx) => (
<div key={item.id}>
- <ItemContent billboardSlug={set.slug} item={item} position={idx} />
+ <ItemContent
+ billboardSlug={set.slug}
+ item={item}
+ position={idx}
+ onClose={onClose}
+ />
</div>
))}
</AntCarousel>
diff --git a/src/features/Messenger/PushResourceModal/PushResourceContent.tsx b/src/features/Messenger/PushResourceModal/PushResourceContent.tsx
new file mode 100644
index 00000000000..8659953ab82
--- /dev/null
+++ b/src/features/Messenger/PushResourceModal/PushResourceContent.tsx
@@ -0,0 +1,192 @@
+'use client';
+
+import { Block, Flexbox, Input, Text } from '@lobehub/ui';
+import { Alert, Button, ModalFooter, Select, toast, useModalContext } from '@lobehub/ui/base-ui';
+import { memo, useState } from 'react';
+import { useTranslation } from 'react-i18next';
+import useSWR from 'swr';
+
+import FileIcon from '@/components/FileIcon';
+import { messengerKeys } from '@/libs/swr/keys';
+import { messengerService } from '@/services/messenger';
+
+import type { MessengerPlatform } from '../constants';
+import { getMessengerErrorMessage } from '../i18n';
+import { MessengerPushWindowState } from '../IntegrationDetail/MessengerPushWindowState';
+import { resolveAttachmentType } from './resolveAttachmentType';
+
+const PUSH_WINDOW_REFRESH_INTERVAL = 5000;
+
+export interface PushResourceFile {
+ fileType?: string;
+ id: string;
+ name: string;
+}
+
+export interface PushResourceTarget {
+ label: string;
+ tenantId: string;
+}
+
+export interface PushResourceModalProps {
+ file: PushResourceFile;
+ platform: MessengerPlatform;
+ platformName: string;
+ /** Slack only: one entry per linked workspace; selection happens in-modal. */
+ targets?: PushResourceTarget[];
+}
+
+/**
+ * Modal body for pushing one resource file to a linked messenger channel.
+ * Mirrors the settings-page `MessengerPushSection` semantics: the window
+ * status drives whether the send is possible (WeChat is windowed; the other
+ * platforms are always-open), and the result statuses reuse the same toasts.
+ */
+export const PushResourceContent = memo<PushResourceModalProps>(
+ ({ file, platform, platformName, targets }) => {
+ const { t } = useTranslation(['messenger', 'common']);
+ const { close } = useModalContext();
+ const [content, setContent] = useState('');
+ const [sending, setSending] = useState(false);
+ const [tenantId, setTenantId] = useState(targets?.[0]?.tenantId);
+
+ const windowSWR = useSWR(
+ messengerKeys.pushWindow(platform, tenantId),
+ () => messengerService.getMessengerPushWindow(platform, tenantId),
+ {
+ refreshInterval: platform === 'wechat' ? PUSH_WINDOW_REFRESH_INTERVAL : 0,
+ refreshWhenHidden: false,
+ refreshWhenOffline: false,
+ },
+ );
+ const status = windowSWR.data;
+
+ const canPush = status?.deliverability === 'always' ? status.linked : !!status?.windowOpen;
+
+ const handleSend = async () => {
+ if (sending || !canPush) return;
+
+ setSending(true);
+ try {
+ // Send the file by id — the server resolves it to a stable access URL
+ // and reads the name/MIME type off the owned row (a client-side
+ // presigned URL can expire before the platform sender downloads it,
+ // silently dropping the attachment).
+ const result = await messengerService.sendMessengerPush({
+ attachments: [
+ {
+ fileId: file.id,
+ type: resolveAttachmentType(file.name, file.fileType),
+ },
+ ],
+ content: content.trim() || undefined,
+ platform,
+ tenantId,
+ });
+ switch (result.status) {
+ case 'sent': {
+ toast.success(
+ result.remaining === undefined
+ ? t('messenger.push.sentToast', { platform: platformName })
+ : t('messenger.push.sentWindowedToast', {
+ platform: platformName,
+ remaining: result.remaining,
+ }),
+ );
+ close();
+ break;
+ }
+ case 'queued': {
+ toast.info(t('messenger.push.queuedToast', { platform: platformName }));
+ close();
+ break;
+ }
+ case 'unlinked': {
+ toast.warning(t('messenger.push.unlinkedToast', { platform: platformName }));
+ break;
+ }
+ default: {
+ toast.warning(t('messenger.push.unavailableToast'));
+ }
+ }
+ await windowSWR.mutate();
+ } catch (error) {
+ toast.error(getMessengerErrorMessage(error, t, 'messenger.push.unavailableToast'));
+ } finally {
+ setSending(false);
+ }
+ };
+
+ return (
+ <>
+ <Flexbox gap={16} padding={16}>
+ <Text style={{ fontSize: 13 }} type="secondary">
+ {t('messenger.push.resource.description', { platform: platformName })}
+ </Text>
+
+ <Block padding={12} variant="outlined">
+ <Flexbox horizontal align="center" gap={12}>
+ <FileIcon fileName={file.name} fileType={file.fileType} size={32} />
+ <Flexbox flex={1} style={{ minWidth: 0 }}>
+ <Text ellipsis strong>
+ {file.name}
+ </Text>
+ </Flexbox>
+ </Flexbox>
+ </Block>
+
+ {targets && targets.length > 1 && (
+ <Flexbox gap={6}>
+ <Text style={{ fontSize: 12 }} type="secondary">
+ {t('messenger.push.target')}
+ </Text>
+ <Select
+ value={tenantId}
+ options={targets.map((target) => ({
+ label: target.label,
+ value: target.tenantId,
+ }))}
+ onChange={(value) => setTenantId(value as string)}
+ />
+ </Flexbox>
+ )}
+
+ <MessengerPushWindowState
+ error={windowSWR.error}
+ name={platformName}
+ status={status}
+ onRetry={() => windowSWR.mutate()}
+ />
+
+ {!!status?.queued && (
+ <Alert
+ showIcon
+ type="info"
+ message={t('messenger.push.queued', {
+ count: status.queued,
+ platform: platformName,
+ })}
+ />
+ )}
+
+ <Input
+ disabled={sending}
+ placeholder={t('messenger.push.resource.placeholder')}
+ value={content}
+ onChange={(e) => setContent(e.target.value)}
+ onPressEnter={handleSend}
+ />
+ </Flexbox>
+
+ <ModalFooter>
+ <Button onClick={() => close()}>{t('cancel', { ns: 'common' })}</Button>
+ <Button disabled={!canPush} loading={sending} type="primary" onClick={handleSend}>
+ {t('messenger.push.send', { platform: platformName })}
+ </Button>
+ </ModalFooter>
+ </>
+ );
+ },
+);
+
+PushResourceContent.displayName = 'PushResourceContent';
diff --git a/src/features/Messenger/PushResourceModal/index.tsx b/src/features/Messenger/PushResourceModal/index.tsx
new file mode 100644
index 00000000000..9764d168cdc
--- /dev/null
+++ b/src/features/Messenger/PushResourceModal/index.tsx
@@ -0,0 +1,26 @@
+'use client';
+
+import { createModal } from '@lobehub/ui/base-ui';
+import { useTranslation } from 'react-i18next';
+
+import { PushResourceContent, type PushResourceModalProps } from './PushResourceContent';
+
+export type { PushResourceFile, PushResourceModalProps } from './PushResourceContent';
+
+// The modal can open from pages that have not loaded the `messenger`
+// namespace yet, so the title must resolve through a component (which
+// re-renders when the namespace arrives) instead of a one-shot `t()` call.
+const ModalTitle = ({ platformName }: { platformName: string }) => {
+ const { t } = useTranslation('messenger');
+ return <>{t('messenger.push.send', { platform: platformName })}</>;
+};
+
+export const openPushResourceModal = (props: PushResourceModalProps) =>
+ createModal({
+ content: <PushResourceContent {...props} />,
+ footer: null,
+ maskClosable: true,
+ styles: { content: { padding: 0 } },
+ title: <ModalTitle platformName={props.platformName} />,
+ width: 480,
+ });
diff --git a/src/features/Messenger/PushResourceModal/resolveAttachmentType.test.ts b/src/features/Messenger/PushResourceModal/resolveAttachmentType.test.ts
new file mode 100644
index 00000000000..6b80ac7d15b
--- /dev/null
+++ b/src/features/Messenger/PushResourceModal/resolveAttachmentType.test.ts
@@ -0,0 +1,45 @@
+import { describe, expect, it } from 'vitest';
+
+import { resolveAttachmentType } from './resolveAttachmentType';
+
+describe('resolveAttachmentType', () => {
+ it('maps a MIME prefix to its attachment type', () => {
+ expect(resolveAttachmentType('photo.png', 'image/png')).toBe('image');
+ expect(resolveAttachmentType('clip.mp4', 'video/mp4')).toBe('video');
+ expect(resolveAttachmentType('voice.mp3', 'audio/mpeg')).toBe('audio');
+ });
+
+ it('treats an unrecognized MIME type as a generic file', () => {
+ expect(resolveAttachmentType('report.pdf', 'application/pdf')).toBe('file');
+ });
+
+ it('accepts an uppercase MIME type', () => {
+ expect(resolveAttachmentType('photo.png', 'IMAGE/PNG')).toBe('image');
+ });
+
+ it('reads a legacy row that stores a bare extension in fileType', () => {
+ expect(resolveAttachmentType('whatever', 'png')).toBe('image');
+ expect(resolveAttachmentType('whatever', 'MOV')).toBe('video');
+ });
+
+ it('falls back to the filename extension when fileType is missing', () => {
+ expect(resolveAttachmentType('photo.JPG')).toBe('image');
+ expect(resolveAttachmentType('clip.webm')).toBe('video');
+ expect(resolveAttachmentType('voice.flac')).toBe('audio');
+ expect(resolveAttachmentType('archive.zip')).toBe('file');
+ });
+
+ it('lets the MIME type win over a contradicting extension', () => {
+ expect(resolveAttachmentType('report.pdf', 'image/png')).toBe('image');
+ });
+
+ it('returns a generic file for a name with no extension and no fileType', () => {
+ expect(resolveAttachmentType('README')).toBe('file');
+ });
+
+ it('does not treat a dotless name as its own extension', () => {
+ // `split('.').pop()` yields the whole string when there is no dot — a name
+ // that happens to equal a known extension must not be misread as one.
+ expect(resolveAttachmentType('png')).toBe('file');
+ });
+});
diff --git a/src/features/Messenger/PushResourceModal/resolveAttachmentType.ts b/src/features/Messenger/PushResourceModal/resolveAttachmentType.ts
new file mode 100644
index 00000000000..e39939eb00f
--- /dev/null
+++ b/src/features/Messenger/PushResourceModal/resolveAttachmentType.ts
@@ -0,0 +1,46 @@
+export type MessengerAttachmentType = 'image' | 'file' | 'video' | 'audio';
+
+const IMAGE_EXTENSIONS = new Set([
+ 'avif',
+ 'bmp',
+ 'gif',
+ 'heic',
+ 'jpeg',
+ 'jpg',
+ 'png',
+ 'svg',
+ 'webp',
+]);
+const VIDEO_EXTENSIONS = new Set(['avi', 'm4v', 'mkv', 'mov', 'mp4', 'webm']);
+const AUDIO_EXTENSIONS = new Set(['aac', 'flac', 'm4a', 'mp3', 'ogg', 'opus', 'wav']);
+
+/**
+ * Map a file to the messenger attachment type the platform senders expect.
+ * `fileType` on a resource row is usually a MIME type (`application/pdf`,
+ * `image/png`, …) but legacy rows may carry a bare extension, so the MIME
+ * prefix, the raw value, and the filename extension are all consulted;
+ * anything unknown is a generic document.
+ */
+export const resolveAttachmentType = (
+ filename: string,
+ fileType?: string,
+): MessengerAttachmentType => {
+ const mime = fileType?.toLowerCase();
+ if (mime?.startsWith('image/')) return 'image';
+ if (mime?.startsWith('video/')) return 'video';
+ if (mime?.startsWith('audio/')) return 'audio';
+
+ // `split('.').pop()` returns the whole string when there is no dot, which
+ // would read an extension-less file named e.g. `png` as an image — only take
+ // the tail when the name actually carries an extension.
+ const dot = filename.lastIndexOf('.');
+ const extension = dot > 0 ? filename.slice(dot + 1).toLowerCase() : undefined;
+
+ const candidates = [mime, extension].filter(Boolean) as string[];
+ for (const ext of candidates) {
+ if (IMAGE_EXTENSIONS.has(ext)) return 'image';
+ if (VIDEO_EXTENSIONS.has(ext)) return 'video';
+ if (AUDIO_EXTENSIONS.has(ext)) return 'audio';
+ }
+ return 'file';
+};
diff --git a/src/features/Messenger/PushResourceModal/useSendToMessengerMenuItem.tsx b/src/features/Messenger/PushResourceModal/useSendToMessengerMenuItem.tsx
new file mode 100644
index 00000000000..47b67930f0f
--- /dev/null
+++ b/src/features/Messenger/PushResourceModal/useSendToMessengerMenuItem.tsx
@@ -0,0 +1,185 @@
+'use client';
+
+import { Flexbox, Icon } from '@lobehub/ui';
+import { type ItemType } from 'antd/es/menu/interface';
+import { cssVar } from 'antd-style';
+import { SendIcon, Settings2Icon } from 'lucide-react';
+import { useTranslation } from 'react-i18next';
+import useSWR from 'swr';
+
+import { useWorkspaceAwareNavigate } from '@/features/Workspace/useWorkspaceAwareNavigate';
+import { messengerKeys } from '@/libs/swr/keys';
+import { messengerService } from '@/services/messenger';
+
+import {
+ type MessengerPlatform,
+ PlatformBrandIcon,
+ SUPPORTED_MESSENGER_PLATFORMS,
+} from '../constants';
+import { openPushResourceModal } from './index';
+import type { PushResourceFile } from './PushResourceContent';
+
+const platformNameById = new Map<string, string>(
+ SUPPORTED_MESSENGER_PLATFORMS.map((p) => [p.id, p.name]),
+);
+
+interface UseSendToMessengerMenuItemParams {
+ enabled: boolean;
+ file: PushResourceFile;
+}
+
+/**
+ * "Send to Messenger" entry for the resource row menu: a hover submenu with
+ * one entry per available platform. A linked platform opens the push modal
+ * (one entry per platform × Slack workspace); an unlinked one deep-links to
+ * that platform's messenger settings page for setup.
+ *
+ * SWR dedupes the fetches across every row that renders this hook, so a long
+ * file list still issues a single request each.
+ */
+export const useSendToMessengerMenuItem = ({
+ enabled,
+ file,
+}: UseSendToMessengerMenuItemParams): ItemType | null => {
+ const { t } = useTranslation(['components', 'common']);
+ const navigate = useWorkspaceAwareNavigate();
+
+ const platformsSWR = useSWR(
+ enabled ? messengerKeys.availablePlatforms() : null,
+ () => messengerService.availablePlatforms(),
+ { revalidateOnFocus: false },
+ );
+ const linksSWR = useSWR(
+ enabled ? messengerKeys.listMyLinks() : null,
+ () => messengerService.listMyLinks(),
+ { revalidateOnFocus: false },
+ );
+ const platforms = platformsSWR.data;
+ const links = linksSWR.data;
+
+ // Slack links carry a workspace tenant; resolve its display name from the
+ // caller's installations. Only fetched when a Slack link actually exists.
+ const hasSlackLink = !!links?.some((link) => link.platform === 'slack');
+ const installationsSWR = useSWR(
+ hasSlackLink ? messengerKeys.listMyInstallations() : null,
+ () => messengerService.listMyInstallations(),
+ { revalidateOnFocus: false },
+ );
+ const tenantNameByTenantId = new Map(
+ (installationsSWR.data ?? []).map((i) => [i.tenantId, i.tenantName]),
+ );
+
+ if (!enabled) return null;
+
+ let children: ItemType[];
+
+ if (platforms === undefined || links === undefined) {
+ children = [
+ {
+ disabled: true,
+ key: 'send-to-messenger-loading',
+ label: t('loading', { ns: 'common' }),
+ },
+ ];
+ } else {
+ // Keep the registry order stable regardless of what the queries return.
+ const availableIds = SUPPORTED_MESSENGER_PLATFORMS.map((p) => p.id).filter((id) =>
+ platforms.some((p) => p.id === id),
+ );
+
+ children = availableIds.flatMap((platform): ItemType[] => {
+ const platformName = platformNameById.get(platform) ?? platform;
+ const platformLinks = links.filter((link) => link.platform === platform);
+
+ // Unlinked platform: grayed-out name with a trailing "Set Up" action;
+ // the whole row deep-links to that platform's setup page.
+ if (platformLinks.length === 0) {
+ return [
+ {
+ icon: <PlatformBrandIcon platform={platform} size={16} />,
+ key: `send-to-messenger-setup-${platform}`,
+ label: (
+ <Flexbox horizontal align="center" flex={1} gap={16} justify="space-between">
+ <span style={{ color: cssVar.colorTextTertiary }}>{platformName}</span>
+ <span style={{ color: cssVar.colorTextSecondary, fontSize: 12 }}>
+ {t('FileManager.actions.sendToMessengerSetupAction')}
+ </span>
+ </Flexbox>
+ ),
+ onClick: ({ domEvent }) => {
+ domEvent.stopPropagation();
+ navigate(`/settings/messenger/${platform}`);
+ },
+ },
+ ];
+ }
+
+ // Linked: a single entry per platform. Slack workspace selection happens
+ // inside the modal (a target select, mirroring the settings push card),
+ // so multiple workspace links do not multiply the submenu.
+ const targets =
+ platform === 'slack'
+ ? platformLinks
+ .filter((link) => link.tenantId)
+ .map((link) => ({
+ label: tenantNameByTenantId.get(link.tenantId) ?? link.tenantId,
+ tenantId: link.tenantId,
+ }))
+ : undefined;
+
+ return [
+ {
+ icon: <PlatformBrandIcon platform={platform} size={16} />,
+ key: `send-to-messenger-${platform}`,
+ label: platformName,
+ onClick: ({ domEvent }) => {
+ domEvent.stopPropagation();
+ openPushResourceModal({
+ file,
+ platform: platform as MessengerPlatform,
+ platformName,
+ targets,
+ });
+ },
+ },
+ ];
+ });
+
+ // Deployment has no messenger platform configured at all: fall back to a
+ // single entry pointing at the messenger settings overview.
+ if (children.length === 0) {
+ children = [
+ {
+ icon: <Icon icon={Settings2Icon} />,
+ key: 'send-to-messenger-setup',
+ label: t('FileManager.actions.sendToMessengerSetup'),
+ onClick: ({ domEvent }) => {
+ domEvent.stopPropagation();
+ navigate('/settings/messenger');
+ },
+ },
+ ];
+ } else {
+ // Trailing shortcut to the messenger settings overview.
+ children.push(
+ { type: 'divider' },
+ {
+ icon: <Icon icon={Settings2Icon} />,
+ key: 'send-to-messenger-settings',
+ label: t('FileManager.actions.sendToMessengerSettings'),
+ onClick: ({ domEvent }) => {
+ domEvent.stopPropagation();
+ navigate('/settings/messenger');
+ },
+ },
+ );
+ }
+ }
+
+ return {
+ children,
+ icon: <Icon icon={SendIcon} />,
+ key: 'sendToMessenger',
+ label: t('FileManager.actions.sendToMessenger'),
+ };
+};
diff --git a/src/features/ResourceManager/components/Explorer/ItemDropdown/useFileItemDropdown.tsx b/src/features/ResourceManager/components/Explorer/ItemDropdown/useFileItemDropdown.tsx
index 166515924d9..ef55dc938c7 100644
--- a/src/features/ResourceManager/components/Explorer/ItemDropdown/useFileItemDropdown.tsx
+++ b/src/features/ResourceManager/components/Explorer/ItemDropdown/useFileItemDropdown.tsx
@@ -19,6 +19,7 @@ import { useTranslation } from 'react-i18next';
import { shallow } from 'zustand/shallow';
import RepoIcon from '@/components/LibIcon';
+import { useSendToMessengerMenuItem } from '@/features/Messenger/PushResourceModal/useSendToMessengerMenuItem';
import { useKnowledgeBaseListContext } from '@/features/ResourceManager/components/KnowledgeBaseListProvider';
import { PAGE_FILE_TYPE } from '@/features/ResourceManager/constants';
import VisibilityConfirmContent from '@/features/VisibilityConfirmContent';
@@ -118,6 +119,13 @@ export const useFileItemDropdown = ({
!isOfficeFile &&
(sourceType === DERIVED_DOCUMENT_SOURCE_TYPE || fileType === PAGE_FILE_TYPE);
+ // Pages/documents have no storage URL to attach, so only real files get the
+ // "Send to chat platform" entry.
+ const sendToMessengerItem = useSendToMessengerMenuItem({
+ enabled: !isFolder && !isPage && !!url,
+ file: { fileType, id, name: filename },
+ });
+
const menuItems = useCallback(() => {
// Filter out current knowledge base and constrain by visibility scope:
// a private file can only join a private KB, a workspace-public file can
@@ -312,43 +320,6 @@ export const useFileItemDropdown = ({
},
},
canEditResources && isOwnPublicFile && { type: 'divider' },
- ...libraryRelatedActions,
- hasKnowledgeBaseActions && {
- type: 'divider',
- },
- canEditResources &&
- isInLibrary && {
- icon: <Icon icon={FolderInputIcon} />,
- key: 'moveToFolder',
- label: t('FileManager.actions.moveToFolder'),
- onClick: async ({ domEvent }) => {
- domEvent.stopPropagation();
-
- openMoveToFolderModal({
- fileId: id,
- knowledgeBaseId: libraryId,
- });
- },
- },
- canEditResources &&
- isFolder && {
- disabled: !canManage,
- icon: <Icon icon={PencilIcon} />,
- key: 'rename',
- label: canManage ? (
- t('FileManager.actions.rename')
- ) : (
- <Tooltip title={t('manageOnlyCreator', { ns: 'common' })}>
- <span>{t('FileManager.actions.rename')}</span>
- </Tooltip>
- ),
- onClick: async ({ domEvent }) => {
- domEvent.stopPropagation();
- if (!canManage) return;
- onRenameStart?.();
- },
- sfSymbol: 'pencil',
- },
{
icon: <Icon icon={LinkIcon} />,
key: 'copyUrl',
@@ -413,6 +384,44 @@ export const useFileItemDropdown = ({
downloadingToast.close();
},
},
+ sendToMessengerItem,
+ (hasKnowledgeBaseActions || (canEditResources && (isInLibrary || isFolder))) && {
+ type: 'divider',
+ },
+ ...libraryRelatedActions,
+ canEditResources &&
+ isInLibrary && {
+ icon: <Icon icon={FolderInputIcon} />,
+ key: 'moveToFolder',
+ label: t('FileManager.actions.moveToFolder'),
+ onClick: async ({ domEvent }) => {
+ domEvent.stopPropagation();
+
+ openMoveToFolderModal({
+ fileId: id,
+ knowledgeBaseId: libraryId,
+ });
+ },
+ },
+ canEditResources &&
+ isFolder && {
+ disabled: !canManage,
+ icon: <Icon icon={PencilIcon} />,
+ key: 'rename',
+ label: canManage ? (
+ t('FileManager.actions.rename')
+ ) : (
+ <Tooltip title={t('manageOnlyCreator', { ns: 'common' })}>
+ <span>{t('FileManager.actions.rename')}</span>
+ </Tooltip>
+ ),
+ onClick: async ({ domEvent }) => {
+ domEvent.stopPropagation();
+ if (!canManage) return;
+ onRenameStart?.();
+ },
+ sfSymbol: 'pencil',
+ },
canEditResources && {
type: 'divider',
},
@@ -483,6 +492,7 @@ export const useFileItemDropdown = ({
setFileVisibility,
refreshFileList,
removeFilesFromKnowledgeBase,
+ sendToMessengerItem,
sourceType,
t,
url,
diff --git a/src/services/messenger.ts b/src/services/messenger.ts
index 377b68cd4b0..7b217edc1c7 100644
--- a/src/services/messenger.ts
+++ b/src/services/messenger.ts
@@ -64,7 +64,16 @@ class MessengerService {
};
sendMessengerPush = async (params: {
- content: string;
+ /**
+ * Referenced by id only — the server resolves each file to a stable access
+ * URL from the owned row. Deliberately no caller-supplied URL: the platform
+ * senders fetch it server-side.
+ */
+ attachments?: {
+ fileId: string;
+ type: 'image' | 'file' | 'video' | 'audio';
+ }[];
+ content?: string;
platform: MessengerPlatform;
tenantId?: string;
}) => {