mirror of
https://github.com/tiennm99/DocsGPT.git
synced 2026-10-13 08:15:43 +00:00
Regroup connector categories and give empty Knowledge a way in
Linear, Jira & Confluence and Asana move to Projects & issues, Stripe to Payments & business and Reddit to Search & web. An empty Knowledge page offers Add knowledge and Connect a service.
This commit is contained in:
1 parent
212fa4f8dc
commit
2cb23938f7
5 files changed
+48
-12
No files matched your search
@@ -19,7 +19,7 @@ import yaml
|
||||
|
||||
from docsgpt.core.settings import settings
|
||||
|
||||
CATEGORIES = ("files", "knowledge", "dev", "messaging", "database", "search", "custom")
|
||||
CATEGORIES = ("files", "knowledge", "projects", "dev", "business", "messaging", "database", "search", "custom")
|
||||
AUTH_KINDS = ("oauth", "mcp_oauth", "api_key", "none", "mcp")
|
||||
PUBLISHERS = ("built_in", "preset", "custom")
|
||||
|
||||
@@ -153,7 +153,7 @@ _BUILT_IN: tuple[ConnectorDefinition, ...] = (
|
||||
ConnectorDefinition(
|
||||
key="google_drive",
|
||||
name="Google Drive",
|
||||
description="Sync Docs, Sheets and PDFs into Sources.",
|
||||
description="Sync Docs, Sheets and PDFs into Knowledge.",
|
||||
icon="drive",
|
||||
category="files",
|
||||
auth_kind="oauth",
|
||||
@@ -166,7 +166,7 @@ _BUILT_IN: tuple[ConnectorDefinition, ...] = (
|
||||
ConnectorDefinition(
|
||||
key="share_point",
|
||||
name="SharePoint",
|
||||
description="Sync files from SharePoint sites and OneDrive into Sources.",
|
||||
description="Sync files from SharePoint sites and OneDrive into Knowledge.",
|
||||
icon="sharepoint",
|
||||
category="files",
|
||||
auth_kind="oauth",
|
||||
@@ -179,7 +179,7 @@ _BUILT_IN: tuple[ConnectorDefinition, ...] = (
|
||||
ConnectorDefinition(
|
||||
key="confluence",
|
||||
name="Confluence",
|
||||
description="Sync Confluence spaces and pages into Sources.",
|
||||
description="Sync Confluence spaces and pages into Knowledge.",
|
||||
icon="confluence",
|
||||
category="knowledge",
|
||||
auth_kind="oauth",
|
||||
@@ -192,7 +192,7 @@ _BUILT_IN: tuple[ConnectorDefinition, ...] = (
|
||||
ConnectorDefinition(
|
||||
key="s3",
|
||||
name="Amazon S3",
|
||||
description="Sync documents from an S3 bucket into Sources.",
|
||||
description="Sync documents from an S3 bucket into Knowledge.",
|
||||
icon="s3",
|
||||
category="files",
|
||||
auth_kind="api_key",
|
||||
@@ -214,9 +214,9 @@ _BUILT_IN: tuple[ConnectorDefinition, ...] = (
|
||||
ConnectorDefinition(
|
||||
key="reddit",
|
||||
name="Reddit",
|
||||
description="Sync Reddit posts that match your searches into Sources.",
|
||||
description="Sync Reddit posts that match your searches into Knowledge.",
|
||||
icon="reddit",
|
||||
category="knowledge",
|
||||
category="search",
|
||||
auth_kind="api_key",
|
||||
capabilities=("sync",),
|
||||
credential_fields=(
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
name: Linear
|
||||
description: Find, create and update Linear issues and projects.
|
||||
icon: linear
|
||||
category: dev
|
||||
category: projects
|
||||
mcp_url: https://mcp.linear.app/mcp
|
||||
auth_kind: mcp_oauth
|
||||
capabilities: [read, write]
|
||||
@@ -34,7 +34,7 @@
|
||||
name: Jira & Confluence
|
||||
description: Search and update Jira issues and Confluence pages.
|
||||
icon: atlassian
|
||||
category: dev
|
||||
category: projects
|
||||
# Shown on the Confluence card, next to syncing pages into Knowledge.
|
||||
part_of: confluence
|
||||
mcp_url: https://mcp.atlassian.com/v1/mcp
|
||||
@@ -56,7 +56,7 @@
|
||||
name: Asana
|
||||
description: Find and update Asana tasks and projects.
|
||||
icon: asana
|
||||
category: knowledge
|
||||
category: projects
|
||||
mcp_url: https://mcp.asana.com/v2/mcp
|
||||
auth_kind: mcp_oauth
|
||||
capabilities: [read, write]
|
||||
@@ -66,7 +66,7 @@
|
||||
name: Stripe
|
||||
description: Look up customers, payments and subscriptions in Stripe.
|
||||
icon: stripe
|
||||
category: dev
|
||||
category: business
|
||||
mcp_url: https://mcp.stripe.com
|
||||
auth_kind: mcp_oauth
|
||||
capabilities: [read, write]
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
export type ConnectorCategory =
|
||||
| 'files'
|
||||
| 'knowledge'
|
||||
| 'projects'
|
||||
| 'dev'
|
||||
| 'business'
|
||||
| 'messaging'
|
||||
| 'database'
|
||||
| 'search'
|
||||
|
||||
@@ -43,7 +43,9 @@ const FILTERS = [
|
||||
'connected',
|
||||
'files',
|
||||
'knowledge',
|
||||
'projects',
|
||||
'dev',
|
||||
'business',
|
||||
'messaging',
|
||||
'database',
|
||||
'search',
|
||||
|
||||
@@ -625,7 +625,39 @@ export default function Sources({
|
||||
<SkeletonLoader component="sourceCards" count={rowsPerPage} />
|
||||
</div>
|
||||
) : !currentDocuments?.length ? (
|
||||
<EmptyState title={t('settings.sources.noData')} />
|
||||
searchTerm ? (
|
||||
<EmptyState title={t('settings.sources.noResults')} />
|
||||
) : (
|
||||
// Nothing yet: the two ways in, side by side.
|
||||
<EmptyState
|
||||
title={t('settings.sources.noData')}
|
||||
description={t('settings.sources.emptyHint')}
|
||||
action={
|
||||
<div className="flex flex-wrap justify-center gap-2">
|
||||
<Button
|
||||
type="button"
|
||||
shape="pill"
|
||||
onClick={() => {
|
||||
setIsOnboarding(false);
|
||||
setModalState('ACTIVE');
|
||||
}}
|
||||
>
|
||||
{t('settings.sources.addSource')}
|
||||
</Button>
|
||||
<Button
|
||||
type="button"
|
||||
variant="outline"
|
||||
shape="pill"
|
||||
onClick={() =>
|
||||
navigate('/settings/connectors?capability=sync')
|
||||
}
|
||||
>
|
||||
{t('settings.sources.connectService')}
|
||||
</Button>
|
||||
</div>
|
||||
}
|
||||
/>
|
||||
)
|
||||
) : (
|
||||
<div className="grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4">
|
||||
{currentDocuments.map((document, index) => {
|
||||
|
||||
Reference in new issue
Block a user