Skip to content

Commit 5f5da79

Browse files
committed
improve ui
1 parent 96413f2 commit 5f5da79

File tree

14 files changed

+138
-350
lines changed

14 files changed

+138
-350
lines changed

plan.md

Lines changed: 0 additions & 232 deletions
This file was deleted.

src/backend/services/storage/custom-prompt-storage.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ const SETTINGS_FILE = "custom-settings.enc";
2323

2424
const TEMPLATE_PROMPT: CustomPrompt = {
2525
id: "default",
26-
name: "Create Issues from Video Recordings",
26+
name: "Create Issues Template",
2727
description: "Template for creating issues from video recordings",
28-
content: `Project Name: <REPLACE WITH PROJECT NAME>\nProject URL: <REPLACE WITH YOUR REPO OR BOARD URL>\n${defaultCustomPrompt}`,
28+
content: `Project Name: «your project name»\nProject URL: «repo or board URL»\n${defaultCustomPrompt}`,
2929
isDefault: true,
3030
isTemplate: true,
3131
createdAt: Date.now(),

src/shared/mcp/preset-servers.ts

Lines changed: 41 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -2,46 +2,56 @@ import type { MCPServerConfig } from "../types/mcp";
22

33
/**
44
* IDs for well-known preset MCP servers.
5-
* These must stay in sync with the card components in the frontend.
65
*/
76
export const PRESET_SERVER_IDS = {
87
GITHUB: "f12980ac-f80c-47e0-b4ac-181a54122d61",
98
AZURE_DEVOPS: "483d49a4-0902-415a-a987-832a21bd3d63",
109
JIRA: "0f03a50c-219b-46e9-9ce3-54f925c44479",
1110
} as const;
1211

12+
/** Default config for the GitHub preset MCP server. */
13+
export const GITHUB_PRESET_CONFIG = {
14+
id: PRESET_SERVER_IDS.GITHUB,
15+
name: "GitHub",
16+
transport: "streamableHttp",
17+
url: "https://api.githubcopilot.com/mcp/",
18+
description: "GitHub MCP Server",
19+
toolWhitelist: [],
20+
enabled: false,
21+
} satisfies MCPServerConfig;
22+
23+
/** Default config for the Azure DevOps preset MCP server. */
24+
export const AZURE_DEVOPS_PRESET_CONFIG = {
25+
id: PRESET_SERVER_IDS.AZURE_DEVOPS,
26+
name: "Azure_DevOps", // MCP server names cannot contain spaces
27+
transport: "stdio",
28+
command: "npx",
29+
// TODO: need to be able to customize this last parameter
30+
// https://github.com/SSWConsulting/SSW.YakShaver.Desktop/issues/547
31+
args: ["-y", "@azure-devops/mcp", "ssw2"],
32+
description: "Azure DevOps MCP Server",
33+
toolWhitelist: [],
34+
enabled: false,
35+
} satisfies MCPServerConfig;
36+
37+
/** Default config for the Jira preset MCP server. */
38+
export const JIRA_PRESET_CONFIG = {
39+
id: PRESET_SERVER_IDS.JIRA,
40+
name: "Jira",
41+
transport: "streamableHttp",
42+
url: "https://mcp.atlassian.com/v1/mcp",
43+
description: "Atlassian MCP Server",
44+
toolWhitelist: [],
45+
enabled: false,
46+
} satisfies MCPServerConfig;
47+
1348
/**
14-
* Default configs for preset MCP servers.
49+
* All preset MCP server configs.
1550
* Included in listAvailableServers() even before the user connects.
1651
* Once a user saves a server with the same ID, the stored version takes precedence.
1752
*/
1853
export const PRESET_MCP_SERVERS: readonly MCPServerConfig[] = [
19-
{
20-
id: PRESET_SERVER_IDS.GITHUB,
21-
name: "GitHub",
22-
transport: "streamableHttp",
23-
url: "https://api.githubcopilot.com/mcp/",
24-
description: "GitHub MCP Server",
25-
toolWhitelist: [],
26-
enabled: false,
27-
},
28-
{
29-
id: PRESET_SERVER_IDS.AZURE_DEVOPS,
30-
name: "Azure_DevOps",
31-
transport: "stdio",
32-
command: "npx",
33-
args: ["-y", "@azure-devops/mcp", "ssw2"],
34-
description: "Azure DevOps MCP Server",
35-
toolWhitelist: [],
36-
enabled: false,
37-
},
38-
{
39-
id: PRESET_SERVER_IDS.JIRA,
40-
name: "Jira",
41-
transport: "streamableHttp",
42-
url: "https://mcp.atlassian.com/v1/mcp",
43-
description: "Atlassian MCP Server",
44-
toolWhitelist: [],
45-
enabled: false,
46-
},
47-
] as MCPServerConfig[];
54+
GITHUB_PRESET_CONFIG,
55+
AZURE_DEVOPS_PRESET_CONFIG,
56+
JIRA_PRESET_CONFIG,
57+
];

src/ui/src/components/settings/SettingsDialog.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ export function SettingsDialog() {
182182

183183
<section className="flex-1 h-full overflow-hidden">
184184
<ScrollArea className="h-full pr-1">
185-
<div className="pb-4 pr-2">
185+
<div className="pb-4">
186186
{activeTab?.id === "general" && (
187187
<GeneralSettingsPanel isActive={open && activeTabId === "general"} />
188188
)}

src/ui/src/components/settings/custom-prompt/CustomPromptManager.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ export function CustomPromptSettingsPanel({
262262
{/* Templates section */}
263263
{promptManager.templates.length > 0 && (
264264
<>
265-
<div className="flex flex-col gap-3 pt-2">
265+
<div className="flex flex-col gap-3 pt-6">
266266
<h3 className="text-sm font-semibold text-white/70 uppercase tracking-wide">
267267
Template
268268
</h3>
@@ -371,12 +371,12 @@ export function CustomPromptSettingsPanel({
371371
<h2 className="text-xl font-semibold">Custom Prompt Manager</h2>
372372
<p className="text-muted-foreground text-sm">
373373
Manage your custom prompts. Use a template to get started quickly, or create your own
374-
prompt with custom MCP server selections.
374+
prompt.
375375
</p>
376376
</header>
377377
)}
378378
<ScrollArea className="flex-1">
379-
<div className="h-full min-h-0 pr-3">{renderContent()}</div>
379+
<div className="w-full overflow-x-hidden">{renderContent()}</div>
380380
</ScrollArea>
381381
</div>
382382

src/ui/src/components/settings/custom-prompt/HighlightedTextarea.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { forwardRef, useCallback, useRef } from "react";
22
import { cn } from "@/lib/utils";
33

4-
const PLACEHOLDER_PATTERN = /<REPLACE[A-Z0-9_ ]+>/g;
4+
const PLACEHOLDER_PATTERN = /«[^»]+»/g;
55

66
function renderHighlighted(text: string): React.ReactNode[] {
77
const parts: React.ReactNode[] = [];

0 commit comments

Comments
 (0)