Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
aebec7b
Move db providers to feature module
fearnworks Mar 25, 2025
40951ae
Decouple inference bridge from file based provider config
fearnworks Mar 25, 2025
e24e39f
Remove provider config files
fearnworks Mar 25, 2025
f789c38
Clean up old provider file code. Breaking changes for offline pipelines
fearnworks Mar 25, 2025
0581482
Initial updates for v2 Inference Bridge in client
fearnworks Mar 25, 2025
72e93e2
FIX: Sidebar closes when new provider selected
fearnworks Mar 25, 2025
5f56f04
Add test connection logic, pydantic middleware, error debug modal.
fearnworks Mar 25, 2025
ff9d8c0
Add api key field
fearnworks Mar 25, 2025
0d3ec14
Fix toast system, improve error info from data service
fearnworks Mar 25, 2025
8e31424
Improved provider form error ux. Decompose into module
fearnworks Mar 26, 2025
e5f5b56
Update provider client env var to api key
fearnworks Mar 26, 2025
a82099b
Add in connections tests to provider setup
fearnworks Mar 26, 2025
aefbcea
Update graphcap_server to inference_brdige
fearnworks Mar 26, 2025
ae07a78
move db schema and provider seed to feature module
fearnworks Mar 26, 2025
3dd8a99
Split inference app and form context, clean up action flow
fearnworks Mar 26, 2025
34b37b0
data service structured logging middleware
fearnworks Mar 26, 2025
624c86e
Clean up InferenceProviderContext
fearnworks Mar 26, 2025
90a8a2d
Remove env var requirement for providers, improve validation info
fearnworks Mar 26, 2025
119b6fb
API key encryption flow,Form submission flow for providers
fearnworks Mar 26, 2025
2e4f5b9
Provider refactor, cleanup 1
fearnworks Mar 26, 2025
be3d69f
Fix models call in provider form
fearnworks Mar 26, 2025
984fe70
Provider->Bridge Flow init
fearnworks Mar 26, 2025
86412b3
Remove default model concept from inference bridge
fearnworks Mar 26, 2025
5d850e2
Add generation options to Action Drawers
fearnworks Mar 27, 2025
a228a89
Style tweaks
fearnworks Mar 27, 2025
3d3bd9f
Require model on generation request, clean up default model reqs
fearnworks Mar 29, 2025
996bf8b
Move GenOptions to root types
fearnworks Mar 29, 2025
e77c555
Move Server Connection and Perspective types to type root
fearnworks Mar 29, 2025
2a15640
Move Provider config types to common types
fearnworks Mar 29, 2025
bc2479a
Update imports, Add explicit type imports
fearnworks Mar 29, 2025
672a19a
Consolidate caption options to use central generation options
fearnworks Mar 29, 2025
1200ae1
Fix persist and save of new gen option. Clean up old ui components
fearnworks Mar 29, 2025
37f4fe4
Fix issue with loading providers with no rate limits
fearnworks Mar 29, 2025
51e90e1
First split between user defined and api models in provider config
fearnworks Mar 29, 2025
18f98e5
Remove fetchModels
fearnworks Mar 29, 2025
0bfb84e
Provider model setup
fearnworks Mar 29, 2025
cbd92b3
Fix cache key for perspectives panel
fearnworks Mar 29, 2025
bfd9b87
Split up large fn, move id to model name
fearnworks Mar 29, 2025
57333ac
Extract api key logic from controller
fearnworks Mar 29, 2025
c3982a8
Default resize image to skip
fearnworks Mar 29, 2025
fa95f8c
Resolve SQ issue batch
fearnworks Mar 29, 2025
ff270cc
Remove file upload caption route
fearnworks Mar 30, 2025
c689b9b
Deprecate old batch processing method in gcap core
fearnworks Mar 30, 2025
521c195
Split import function
fearnworks Mar 30, 2025
5d86abb
Remove model list endpoint from inference bridge server and client
fearnworks Mar 30, 2025
f4b1d21
Split debug logic for provider issues
fearnworks Mar 30, 2025
c667123
split provider test conn, process single caption
fearnworks Mar 30, 2025
4762eea
Split provider logic in data service
fearnworks Mar 30, 2025
228dffa
Decompose provider config crud
fearnworks Mar 30, 2025
730f7ce
Performance and Static Analysis tweaks
fearnworks Mar 30, 2025
1d0a3b1
Remove reluctant qualifiers in IPTC extraction
fearnworks Mar 30, 2025
7644b0a
Add caption exceptions
fearnworks Mar 30, 2025
9bb5889
normalize naming scheme for hf export | import
fearnworks Mar 30, 2025
1e889e5
Remove v1 providrer return in offline pipelines
fearnworks Mar 30, 2025
caaf23d
cleanup
fearnworks Mar 30, 2025
7afb5f3
Clear form when making new provider, cleanup tasks
fearnworks Mar 30, 2025
ae61df0
Convert provider kind to dropdown
fearnworks Mar 30, 2025
a5323e5
Fix api show in view mode, cleanup
fearnworks Mar 30, 2025
8ea9ba4
Test Connection cleanup. Fix color
fearnworks Mar 30, 2025
b5e6bde
Add step input types
fearnworks Mar 30, 2025
c855772
Fix issues with canceling Provider form edit
fearnworks Mar 30, 2025
8b5a161
Remove ui breadcrumbs for model lists from inference bridge
fearnworks Mar 30, 2025
65b9357
Resolve props issues for provider connections
fearnworks Mar 30, 2025
f29b6ed
Fix reset form logic
fearnworks Mar 30, 2025
8fcdf56
Move features flags in settings, fix model name it gen options
fearnworks Mar 30, 2025
5c102db
Add remove provider action
fearnworks Mar 30, 2025
115a874
Convert to use provider and model name throughout gen options
fearnworks Mar 30, 2025
56123a0
Fix perspective type issues, metadata for generated caps
fearnworks Mar 30, 2025
2cfeed7
Lint tweaks
fearnworks Mar 30, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .cursor/rules/task.mdc
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ globs:
alwaysApply: true
---
# Task
Add your task for the agent here.
Place your task for the agent here.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,5 @@ provider.config.toml
provider.test.config.toml
test_logs.jsonl
docker-compose.override.yml
node_modules/
node_modules/
graphcap_pg.session.sql
2 changes: 1 addition & 1 deletion Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ dotenv: ['.env', '{{.ENV}}/.env', '{{.HOME}}/.env']

includes:
data: ./servers/data_service/Taskfile.data.yml
inference: ./servers/inference_server/server/Taskfile.inference.yml
inference: ./servers/inference_bridge/server/Taskfile.inference.yml
studio: ./graphcap_studio/Taskfile.studio.yml

tasks:
Expand Down
10 changes: 5 additions & 5 deletions docker-compose.override.example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
# SPDX-License-Identifier: Apache-2.0
name: graphcap
# services:
# graphcap_server:
# container_name: graphcap_server
# inference_bridge:
# container_name: inference_bridge
# build:
# context: ./src
# dockerfile: ./server/Dockerfile.server
Expand Down Expand Up @@ -45,7 +45,7 @@ name: graphcap
# ports:
# - "35433:5432"
# volumes:
# - graphcap_server_db:/var/lib/postgresql/data
# - inference_bridge_db:/var/lib/postgresql/data
# healthcheck:
# test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER}"]
# interval: 5s
Expand Down Expand Up @@ -95,7 +95,7 @@ name: graphcap
# target: /app/pnpm-lock.yaml
# environment:
# - NODE_ENV=${NODE_ENV:-development}
# - VITE_API_URL=http://localhost:32100/api
# - VITE_API_URL=http://localhost:32100/
# - VITE_WORKSPACE_PATH=/workspace/.local
# - VITE_MEDIA_SERVER_URL=http://localhost:32400
# networks:
Expand Down Expand Up @@ -181,7 +181,7 @@ name: graphcap


# volumes:
# graphcap_server_db:
# inference_bridge_db:

# networks:
# graphcap:
Expand Down
20 changes: 10 additions & 10 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# SPDX-License-Identifier: Apache-2.0
name: graphcap
services:
graphcap_server:
container_name: graphcap_server
inference_bridge:
container_name: inference_bridge
build:
context: ./servers/inference_server
context: ./servers/inference_bridge
dockerfile: ./server/Dockerfile.server.dev
ports:
- 32100:32100
volumes:
- ./servers/inference_server/graphcap:/app/graphcap
- ./servers/inference_server/server/server:/app/server/server
- ./servers/inference_bridge/graphcap:/app/graphcap
- ./servers/inference_bridge/server/server:/app/server/server
- ./workspace:/workspace
environment:
- HOST_PLATFORM=${HOST_PLATFORM:-linux}
Expand All @@ -33,7 +33,7 @@ services:
ports:
- "35433:5432"
volumes:
- graphcap_server_db:/var/lib/postgresql/data
- graphcap_db:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER}"]
interval: 5s
Expand Down Expand Up @@ -83,7 +83,7 @@ services:
target: /app/pnpm-lock.yaml
environment:
- NODE_ENV=${NODE_ENV:-development}
- VITE_API_URL=http://localhost:32100/api
- VITE_API_URL=http://localhost:32100
- VITE_WORKSPACE_PATH=/workspace/.local
- VITE_MEDIA_SERVER_URL=http://localhost:32400
- VITE_DATASETS_PATH=/workspace/datasets
Expand Down Expand Up @@ -128,12 +128,12 @@ services:

graphcap_pipelines:
build:
context: ./servers/inference_server
context: ./servers/inference_bridge
dockerfile: pipelines/Dockerfile.pipelines.dev
container_name: graphcap_pipelines
volumes:
- ./workspace:/workspace
- ./servers/inference_server:/app
- ./servers/inference_bridge:/app
environment:
- DAGSTER_HOME=/workspace/.local/.dagster
- DAGSTER_PORT=32300
Expand Down Expand Up @@ -182,7 +182,7 @@ services:
- ./workspace/config/.env

volumes:
graphcap_server_db:
graphcap_db:

networks:
graphcap:
Expand Down
1 change: 0 additions & 1 deletion graphcap_studio/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
"react-icons": "^5.5.0",
"react-window": "^1.8.11",
"react-window-infinite-loader": "^1.0.10",
"sonner": "^1.7.4",
"styled-components": "^6.1.15",
"tailwindcss": "^4.0.12",
"zod": "^3.24.2"
Expand Down
14 changes: 0 additions & 14 deletions graphcap_studio/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 20 additions & 1 deletion graphcap_studio/src/app/layout/ActionPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,28 @@ export function ActionPanel({
// Handle clicks outside the panel
useEffect(() => {
function handleClickOutside(event: MouseEvent) {
const target = event.target as HTMLElement;

// Check if the click is inside a dialog or modal
const isInsideModal =
// Check for Chakra UI Dialog elements
target.closest("[role='dialog']") ||
target.closest("[data-part='backdrop']") ||
target.closest("[data-part='positioner']") ||
target.closest("[data-part='content']") ||
// Also check for other common modal classes/attributes
target.closest(".modal") ||
target.closest("[aria-modal='true']");

// Don't collapse the panel if clicking inside a dialog/modal
if (isInsideModal) {
return;
}

// Proceed with the normal check for panel containment
if (
panelRef.current &&
!panelRef.current.contains(event.target as Node) &&
!panelRef.current.contains(target) &&
isExpanded
) {
collapsePanel();
Expand Down
16 changes: 8 additions & 8 deletions graphcap_studio/src/app/layout/RootLeftActionPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@

import {
DatasetIcon,
FlagIcon,
GenerationOptionsIcon,
PerspectiveLayersIcon,
ProviderIcon,
SettingsIcon,
SettingsIcon
} from "@/components/icons";
import { SettingsPanel } from "@/features/app-settings";
import { FeatureFlagsPanel } from "@/features/app-settings/feature-flags";
import { DatasetPanel } from "@/features/datasets";
import { GenerationOptionsPanel } from "@/features/inference/generation-options/components/GenerationOptionsPanel";
import { ProvidersPanel } from "@/features/inference/providers";
import { PerspectiveManagementPanel } from "@/features/perspectives/components/PerspectiveManagement/PerspectiveManagementPanel";
import { ActionPanel } from "./ActionPanel";
Expand All @@ -27,13 +27,13 @@ export function RootLeftActionPanel() {
<ActionPanel
side="left"
defaultExpanded={false}
expandedWidth={350}
expandedWidth={450}
sections={[
{
id: "feature-flags",
title: "Feature Flags",
icon: <FlagIcon />,
content: <FeatureFlagsPanel />,
id: "generation-options",
title: "Generation Options",
icon: <GenerationOptionsIcon />,
content: <GenerationOptionsPanel />,
},
{
id: "datasets",
Expand Down
4 changes: 3 additions & 1 deletion graphcap_studio/src/app/theme/global-css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ export const globalCss = defineGlobalStyles({
color: "fg.muted/80",
},
"*::selection": {
bg: "colorPalette.muted/80",
bg: "colorPalette.500/50",
color: "white",

},
});
115 changes: 115 additions & 0 deletions graphcap_studio/src/components/common_inference/ModelSelector.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
// SPDX-License-Identifier: Apache-2.0
/**
* Model Selector Component
*
* A reusable component for selecting a model from a list of options.
*/

import { Box, createListCollection } from "@chakra-ui/react";
import { Field } from "../ui/field";
import {
SelectContent,
SelectItem,
SelectRoot,
SelectTrigger,
SelectValueText,
} from "../ui/select";

export interface ModelOption {
label: string;
value: string;
id: string;
is_default?: boolean;
}

export interface ModelSelectorProps {
readonly options: ModelOption[];
readonly value: string | null | undefined;
readonly onChange: (value: string) => void;
readonly isDisabled?: boolean;
readonly maxWidth?: string | number;
readonly minWidth?: string | number;
readonly width?: string | number;
readonly size?: "xs" | "sm" | "md" | "lg";
readonly placeholder?: string;
readonly className?: string;
readonly showLabel?: boolean;
readonly label?: string;
readonly helperText?: string;
}

/**
* A reusable component for selecting a model from a list of options.
*/
export function ModelSelector({
options,
value,
onChange,
isDisabled = false,
maxWidth = undefined,
minWidth = undefined,
width = undefined,
size = "sm",
placeholder = "Select model",
className,
showLabel = false,
label = "Model",
helperText,
}: ModelSelectorProps) {
// Create collection for SelectRoot
const modelCollection = createListCollection({
items: options,
});

// Convert value to string array format required by SelectRoot
const selectValue = value ? [value] : [];

const handleValueChange = (details: { value: string[] }) => {
if (details.value && details.value.length > 0) {
onChange(details.value[0]);
} else {
onChange("");
}
};

const boxProps = {
...(maxWidth ? { maxWidth } : {}),
...(minWidth ? { minWidth } : {}),
...(width ? { width } : {}),
className,
};

const selector = (
<SelectRoot
collection={modelCollection}
value={selectValue}
onValueChange={handleValueChange}
disabled={isDisabled}
positioning={{ placement: "top", flip: false }}
size={size}
>
<SelectTrigger>
<SelectValueText placeholder={placeholder} />
</SelectTrigger>
<SelectContent>
{options.map((option) => (
<SelectItem key={option.value} item={option}>
{option.label}
</SelectItem>
))}
</SelectContent>
</SelectRoot>
);

return (
<Box {...boxProps}>
{showLabel ? (
<Field id="model-selector" label={label} helperText={helperText}>
{selector}
</Field>
) : (
selector
)}
</Box>
);
}
Loading