Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ Thumbs.db
*.swp
*.swo
.halo/
.claude/

# Logs
*.log
Expand Down
3 changes: 2 additions & 1 deletion electron/main/channels/feishu/feishu-transport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,10 @@ export class FeishuTransport implements MessageTransport {
}
}

/** Send markdown wrapped in a minimal Feishu Interactive Card. */
/** Send markdown wrapped in a Feishu Interactive Card with mobile-friendly configuration. */
async sendMarkdown(chatId: string, markdown: string): Promise<string> {
const card = JSON.stringify({
config: { wide_screen_mode: true },
elements: [{ tag: "markdown", content: markdown }],
Comment on lines +37 to 41
Copy link

Copilot AI Apr 29, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The doc comment says this card has “mobile-friendly configuration”, but the only config being set is wide_screen_mode: true, which is a wide-screen layout setting. Please update the comment to accurately describe what configuration is applied (or rename it if additional mobile-related config is intended).

Copilot uses AI. Check for mistakes.
});
return this.sendRichContent(chatId, card);
Expand Down
6 changes: 6 additions & 0 deletions src/components/SessionTurn.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@
display: flex;
flex-direction: column;
gap: 0.5rem;
min-width: 0;
padding: 0.75rem;
border: 1px solid rgba(148, 163, 184, 0.12);
border-radius: 0.875rem;
Expand Down Expand Up @@ -276,6 +277,9 @@
display: flex;
flex-direction: column;
gap: 0.5rem;
min-width: 0;
max-width: 100%;
overflow: hidden;
padding: 0.75rem 1rem;
border: 1px solid #E2E8F0;
border-radius: 1rem;
Expand Down Expand Up @@ -328,6 +332,8 @@
}

.responseContent {
min-width: 0;
max-width: 100%;
}

/* ─── Compacting Turn ─── */
Expand Down
5 changes: 5 additions & 0 deletions src/components/share/content-markdown.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@

[data-slot="markdown"] {
display: -webkit-box;
min-width: 0;
max-width: 100%;
-webkit-box-orient: vertical;
-webkit-line-clamp: 3;
line-clamp: 3;
Expand Down Expand Up @@ -164,6 +166,7 @@
table {
border-collapse: collapse;
width: 100%;
max-width: 100%;
display: block;
overflow-x: auto;
-webkit-overflow-scrolling: touch;
Expand All @@ -182,6 +185,8 @@
border: 1px solid var(--sl-color-border);
padding: 0.5rem 0.75rem;
text-align: left;
overflow-wrap: anywhere;
word-break: break-word;
}

th {
Expand Down
4 changes: 3 additions & 1 deletion tests/unit/electron/channels/feishu/feishu-transport.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -184,9 +184,10 @@ describe("FeishuTransport", () => {
expect(callArgs.data.receive_id).toBe("chat-1");
expect(callArgs.data.msg_type).toBe("interactive");

// The content should be JSON with elements containing markdown tag
// The content should be JSON with elements containing markdown tag and wide_screen_mode config
const content = JSON.parse(callArgs.data.content);
expect(content).toEqual({
config: { wide_screen_mode: true },
elements: [{ tag: "markdown", content: "**bold** text" }],
});
});
Expand Down Expand Up @@ -227,6 +228,7 @@ describe("FeishuTransport", () => {
const cardArg = spy.mock.calls[0][1];
const parsed = JSON.parse(cardArg);
expect(parsed).toEqual({
config: { wide_screen_mode: true },
elements: [{ tag: "markdown", content: "hello" }],
});
});
Expand Down
Loading