Skip to content

Commit 7ffa9d7

Browse files
olasunkanmi.raymondolasunkanmi.raymond
authored andcommitted
refactor(core): Remove connector feature and enhance account settings
* Remove ConnectorHandler from webview providers and handlers. * Remove Connectors section, components, and types from settings UI. * Display dynamic username and initials in Account Settings. * Update documentation and changelog links to GitHub URLs.
1 parent 2477bdf commit 7ffa9d7

7 files changed

Lines changed: 12 additions & 17 deletions

File tree

src/webview-providers/base.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ import { type ProviderKey, toProviderKey } from "./provider-name";
5454
import {
5555
BrowserHandler,
5656
ComposerHandler,
57-
ConnectorHandler,
5857
CostTrackingHandler,
5958
TerminalViewerHandler,
6059
SkillHandler,
@@ -242,7 +241,6 @@ export abstract class BaseWebViewProvider implements vscode.Disposable {
242241
);
243242
this.handlerRegistry.register(new DockerHandler());
244243
this.handlerRegistry.register(new MCPHandler());
245-
this.handlerRegistry.register(new ConnectorHandler());
246244
this.handlerRegistry.register(new SkillHandler());
247245
this.handlerRegistry.register(
248246
new NewsHandler(() => this.synchronizeNews()),

src/webview-providers/handlers/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ export {
66
export { SettingsHandler } from "./settings-handler";
77
export { DockerHandler } from "./docker-handler";
88
export { MCPHandler } from "./mcp-handler";
9-
export { ConnectorHandler } from "./connector-handler";
109
export { SkillHandler } from "./skill-handler";
1110
export { NewsHandler } from "./news-handler";
1211
export { BrowserHandler } from "./browser-handler";

webviewUi/src/components/settings/SettingsContent.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from 'react';
22
import styled from 'styled-components';
33
import { SettingsCategory, SETTINGS_CATEGORIES } from './types';
4-
import { AccountSettings, GeneralSettings, AgentsSettings, MCPSettings, ConnectorsSettings, SkillsSettings, ConversationSettings, ModelsSettings, ContextSettings, RulesSettings, PrivacySettings, BetaSettings, AboutSettings, BrowserSettings } from './sections';
4+
import { AccountSettings, GeneralSettings, AgentsSettings, MCPSettings, SkillsSettings, ConversationSettings, ModelsSettings, ContextSettings, RulesSettings, PrivacySettings, BetaSettings, AboutSettings, BrowserSettings } from './sections';
55

66

77
interface SettingsContentProps {
@@ -63,7 +63,6 @@ const SECTION_COMPONENTS: Record<SettingsCategory, React.FC<{ searchQuery: strin
6363
general: GeneralSettings,
6464
agents: AgentsSettings,
6565
mcp: MCPSettings,
66-
connectors: ConnectorsSettings,
6766
skills: SkillsSettings,
6867
conversation: ConversationSettings,
6968
models: ModelsSettings,

webviewUi/src/components/settings/sections/AboutSettings.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,11 +123,11 @@ export const AboutSettings: React.FC<AboutSettingsProps> = ({ searchQuery: _sear
123123
<span>GitHub Repository</span>
124124
<SettingsIcon name="externalLink" size={16} />
125125
</LinkItem>
126-
<LinkItem href="https://codebuddy.dev/docs" target="_blank" rel="noopener noreferrer">
126+
<LinkItem href="https://github.com/olasunkanmi-SE/codebuddy/blob/main/README.md" target="_blank" rel="noopener noreferrer">
127127
<span>Documentation</span>
128128
<SettingsIcon name="externalLink" size={16} />
129129
</LinkItem>
130-
<LinkItem href="https://codebuddy.dev/changelog" target="_blank" rel="noopener noreferrer">
130+
<LinkItem href="https://github.com/olasunkanmi-SE/codebuddy/releases/" target="_blank" rel="noopener noreferrer">
131131
<span>Changelog</span>
132132
<SettingsIcon name="externalLink" size={16} />
133133
</LinkItem>

webviewUi/src/components/settings/sections/AccountSettings.tsx

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import {
1111
Button,
1212
Badge,
1313
} from '../ui';
14+
import { useSettingsStore } from '../../../stores/settings.store';
1415

1516
interface AccountSettingsProps {
1617
searchQuery: string;
@@ -70,12 +71,18 @@ const ProfileBadge = styled.div`
7071
`;
7172

7273
export const AccountSettings: React.FC<AccountSettingsProps> = ({ searchQuery: _searchQuery }) => {
74+
const username = useSettingsStore((s) => s.username);
75+
const displayName = username || 'CodeBuddy User';
76+
const initials = username
77+
? username.split(/\s+/).map((w) => w[0]).join('').toUpperCase().slice(0, 2)
78+
: 'CB';
79+
7380
return (
7481
<>
7582
<ProfileCard>
76-
<Avatar>CB</Avatar>
83+
<Avatar>{initials}</Avatar>
7784
<ProfileInfo>
78-
<ProfileName>CodeBuddy User</ProfileName>
85+
<ProfileName>{displayName}</ProfileName>
7986
<ProfileEmail>user@codebuddy.dev</ProfileEmail>
8087
<ProfileBadge>
8188
<svg width="12" height="12" viewBox="0 0 24 24" fill="currentColor">

webviewUi/src/components/settings/sections/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
export { ConnectorsSettings } from "./ConnectorsSettings";
21
export { SkillsSettings } from "./SkillsSettings";
32
export { AccountSettings } from "./AccountSettings";
43
export { GeneralSettings } from "./GeneralSettings";

webviewUi/src/components/settings/types.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ export type SettingsCategory =
44
| "browser"
55
| "agents"
66
| "mcp"
7-
| "connectors"
87
| "skills"
98
| "conversation"
109
| "models"
@@ -80,12 +79,6 @@ export const SETTINGS_CATEGORIES: SettingsCategoryInfo[] = [
8079
icon: "server",
8180
description: "Model Context Protocol servers",
8281
},
83-
{
84-
id: "connectors",
85-
label: "Connectors",
86-
icon: "plug",
87-
description: "Connect to external services",
88-
},
8982
{
9083
id: "skills",
9184
label: "Skills",

0 commit comments

Comments
 (0)