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
6 changes: 4 additions & 2 deletions backend/app/config.example.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,13 @@
"token": "ghp_your-github-personal-access-token-here",
"rate_limit_per_hour": 5000
},
"graphrag": {
"deepgit_ai": {
"timeout_minutes": 50,
"batch_size": 50,
"cache_hours": 24,
"max_repos_per_request": 1000
"max_repos_per_request": 1000,
"strict_database_only": true,
"include_database_context": true
},
"server": {
"host": "127.0.0.1",
Expand Down
12 changes: 7 additions & 5 deletions backend/app/config_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,13 @@ def _get_default_config(self) -> Dict[str, Any]:
"token": "",
"rate_limit_per_hour": 5000
},
"graphrag": {
"deepgit_ai": {
"timeout_minutes": 50,
"batch_size": 50,
"cache_hours": 24,
"max_repos_per_request": 1000
"max_repos_per_request": 1000,
"strict_database_only": True,
"include_database_context": True
},
"server": {
"host": "127.0.0.1",
Expand Down Expand Up @@ -143,9 +145,9 @@ def get_github_token(self) -> str:
"""Get GitHub token from configuration."""
return self.get("github.token", "")

def get_graphrag_config(self) -> Dict[str, Any]:
"""Get GraphRAG configuration."""
return self.get("graphrag", {})
def get_deepgit_ai_config(self) -> Dict[str, Any]:
"""Get DeepGitAI configuration."""
return self.get("deepgit_ai", {})

def get_server_config(self) -> Dict[str, Any]:
"""Get server configuration."""
Expand Down
253 changes: 138 additions & 115 deletions backend/app/main.py

Large diffs are not rendered by default.

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion backend/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,6 @@ langchain-openai>=0.1.0
langchain-community>=0.2.0
langchain-google-genai>=0.1.0
python-dotenv>=1.0.0
matplotlib>=3.7.0
matplotlib>=3.7.0
sentence-transformers>=2.2.0
torch>=1.9.0
4 changes: 3 additions & 1 deletion environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,6 @@ dependencies:
- langchain-community>=0.2.0
- langchain-google-genai>=0.1.0
- python-dotenv>=1.0.0
- matplotlib>=3.7.0
- matplotlib>=3.7.0
- sentence-transformers>=2.2.0
- torch>=1.9.0
23 changes: 12 additions & 11 deletions src/lib/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,16 @@ export const API_ENDPOINTS = {
GENERATE_GRAPH_WITH_EDGES: `${API_BASE_URL}/api/generate-graph-with-edges`,
GET_UNIQUE_REPOS: `${API_BASE_URL}/api/get-unique-repos`,
CREATE_EDGES_ON_GRAPH: `${API_BASE_URL}/api/create-edges-on-graph`,
// GraphRAG endpoints
GRAPHRAG_HEALTH: `${API_BASE_URL}/api/graphrag-health`,
GRAPHRAG_SETUP: `${API_BASE_URL}/api/graphrag-setup`,
GRAPHRAG_PROGRESS: `${API_BASE_URL}/api/graphrag-progress`,
GRAPHRAG_RESET_PROGRESS: `${API_BASE_URL}/api/graphrag-reset-progress`,
GRAPHRAG_CHANGE_PROVIDER: `${API_BASE_URL}/api/graphrag-change-provider`,
GRAPHRAG_UPDATE_README: `${API_BASE_URL}/api/graphrag-update-readme`,
GRAPHRAG_FIX_SCHEMA: `${API_BASE_URL}/api/graphrag-fix-schema`,
GRAPHRAG_QUERY: `${API_BASE_URL}/api/graphrag`,
GRAPHRAG_CLEANUP: `${API_BASE_URL}/api/graphrag-cleanup`,
GRAPHRAG_CHECK_CHANGES: `${API_BASE_URL}/api/graphrag-check-changes`,
// DeepGitAI endpoints
DEEPGIT_AI_HEALTH: `${API_BASE_URL}/api/deepgit-ai-health`,
DEEPGIT_AI_SCOPE: `${API_BASE_URL}/api/deepgit-ai-scope`,
DEEPGIT_AI_SETUP: `${API_BASE_URL}/api/deepgit-ai-setup`,
DEEPGIT_AI_PROGRESS: `${API_BASE_URL}/api/deepgit-ai-progress`,
DEEPGIT_AI_RESET_PROGRESS: `${API_BASE_URL}/api/deepgit-ai-reset-progress`,
DEEPGIT_AI_CHANGE_PROVIDER: `${API_BASE_URL}/api/deepgit-ai-change-provider`,
DEEPGIT_AI_UPDATE_README: `${API_BASE_URL}/api/deepgit-ai-update-readme`,
DEEPGIT_AI_FIX_SCHEMA: `${API_BASE_URL}/api/deepgit-ai-fix-schema`,
DEEPGIT_AI_QUERY: `${API_BASE_URL}/api/deepgit-ai`,
DEEPGIT_AI_CLEANUP: `${API_BASE_URL}/api/deepgit-ai-cleanup`,
DEEPGIT_AI_CHECK_CHANGES: `${API_BASE_URL}/api/deepgit-ai-check-changes`,
} as const;
46 changes: 16 additions & 30 deletions src/styles/_graph.scss
Original file line number Diff line number Diff line change
Expand Up @@ -102,15 +102,17 @@
background: white;
}

// GraphRAG Chat Interface Styles
.graphrag-chat {
// DeepGitAI Chat Interface Styles
.deepgit-ai-chat {
min-height: 100%;
height: 100%; // Ensure full height
display: flex;
flex-direction: column;
overflow-y: auto; // Make the entire GraphRAG panel scrollable
position: relative; // Create positioning context

// Custom scrollbar for the entire chat container
scrollbar-width: thin;
scrollbar-color: #ccc transparent;
-webkit-overflow-scrolling: touch; // For better iOS scrolling

&::-webkit-scrollbar {
width: 6px;
Expand All @@ -125,11 +127,17 @@
border-radius: 3px;
}

// Setup panel (not sticky, scrolls with content)
.setup-panel {
background: #f8f9fa;
border-bottom: 1px solid #e9ecef;
flex-shrink: 0; // Prevent setup panel from shrinking
}

.chat-messages {
flex: 1;
overflow-y: visible; // Remove individual scrolling from chat messages
overflow-x: hidden;
min-height: 200px;
flex: 1 1 auto;
min-height: 0; // critical for Chrome flexbox
overflow: visible; // let the panel-content be the scroll container
max-height: none; // Remove max-height constraint
}

Expand Down Expand Up @@ -159,28 +167,6 @@
}
}

.chat-input {
border-top: 1px solid #e9ecef;
background: white;

.input-group {
.form-control {
border-radius: 20px 0 0 20px;
border: 1px solid #ced4da;

&:focus {
border-color: #007bff;
box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}
}

.btn {
border-radius: 0 20px 20px 0;
border: 1px solid #007bff;
}
}
}

.setup-panel {
background: #f8f9fa;
border-bottom: 1px solid #e9ecef;
Expand Down
80 changes: 77 additions & 3 deletions src/styles/_layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -70,15 +70,89 @@ body {
flex-direction: column;

@extend .custom-scrollbar;
overflow-y: auto;
overflow-y: auto; // single scroll ancestor for sticky

&>*>*:not(hr) {
padding: 1rem;
}

// Special handling for GraphRAG panel
.graphrag-chat {
// Special handling for DeepGitAI panel
.deepgit-ai-chat {
padding: 0;
height: 100%;
display: flex;
flex-direction: column;
}

// When DeepGitAI tab is active, keep header/input sticky relative to panel scroll
&.deepgit-ai-mode {
position: relative;

.deepgit-ai-header {
position: sticky; // sticks to panel-content
top: 0;
z-index: 1000;
background: white;
border-bottom: 1px solid #e9ecef;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
backdrop-filter: blur(10px);
}

.chat-input {
position: sticky; // sticks to panel-content
bottom: 0;
z-index: 999;
background: white;
border-top: 1px solid #e9ecef;
box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.1);
backdrop-filter: blur(10px);
}

.chat-messages {
flex: 1 1 auto;
min-height: 0; // allows shrinking so header/input remain visible
overflow: visible; // do not create nested scroll
}
}

// Make DeepGitAI header sticky relative to panel content
.deepgit-ai-header {
position: sticky;
top: 0;
z-index: 1000;
background: white;
border-bottom: 1px solid #e9ecef;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
backdrop-filter: blur(10px);
}

// Make DeepGitAI chat input sticky relative to panel content
.chat-input {
position: sticky;
bottom: 0;
z-index: 999;
background: white;
border-top: 1px solid #e9ecef;
box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.1);
backdrop-filter: blur(10px);
flex-shrink: 0; // Prevent input from shrinking

.input-group {
.form-control {
border-radius: 20px 0 0 20px;
border: 1px solid #ced4da;

&:focus {
border-color: #007bff;
box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}
}

.btn {
border-radius: 0 20px 20px 0;
border: 1px solid #007bff;
}
}
}
}
}
Expand Down
16 changes: 8 additions & 8 deletions src/views/ContextPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import GraphSumUp from "./GraphSumUp";
import NodesAppearanceBlock from "./NodesAppearanceBlock";
import Settings from "./Settings";
import SelectedNodePanel from "./SelectedNodePanel";
import GraphRAGPanel from "./GraphRAGPanel";
import DeepGitAIPanel from "./GraphRAGPanel";

const ContextPanel: FC = () => {
const { navState, data, panel, setPanel } = useContext(GraphContext);
Expand All @@ -35,8 +35,8 @@ const ContextPanel: FC = () => {
let content: JSX.Element;
if (panel === "settings") {
content = <Settings />;
} else if (panel === "graphrag") {
content = <GraphRAGPanel />;
} else if (panel === "deepgit-ai") {
content = <DeepGitAIPanel />;
} else if (selectedNode) {
content = <SelectedNodePanel node={navState?.selectedNode as string} data={selectedNode} />;
} else {
Expand Down Expand Up @@ -71,11 +71,11 @@ const ContextPanel: FC = () => {
<VscSettings /> Settings
</button>
<button
className={cx("btn ms-2 mt-1", panel === "graphrag" ? selectedButtonClass : "btn-outline-dark")}
onClick={() => setPanel("graphrag")}
disabled={panel === "graphrag"}
className={cx("btn ms-2 mt-1", panel === "deepgit-ai" ? selectedButtonClass : "btn-outline-dark")}
onClick={() => setPanel("deepgit-ai")}
disabled={panel === "deepgit-ai"}
>
<AiOutlineRobot /> GraphRAG
<AiOutlineRobot /> DeepGitAI
</button>
{/* <button
className={cx("btn ms-2 mt-1", "btn-outline-dark")}
Expand Down Expand Up @@ -123,7 +123,7 @@ const ContextPanel: FC = () => {
</div>
</div>

<div className="panel-content">
<div className={cx("panel-content", panel === "deepgit-ai" && "deepgit-ai-mode")}>
<div className="flex-grow-1 p-0 m-0">{content}</div>

<hr className="m-0 flex-shrink-0" />
Expand Down
Loading