-
Notifications
You must be signed in to change notification settings - Fork 836
feat(inspect): Pipeline enable/disable #3097
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: feature/geti-inspect
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,6 +8,7 @@ import { useSpinDelay } from 'spin-delay'; | |
|
|
||
| import { useInference } from './inference-provider.component'; | ||
| import { useSelectedMediaItem } from './selected-media-item-provider.component'; | ||
| import { StreamContainer } from './stream/stream-container'; | ||
|
|
||
| import styles from './inference.module.scss'; | ||
|
|
||
|
|
@@ -56,6 +57,10 @@ export const InferenceResult = () => { | |
| const isInferenceAvailable = useIsInferenceAvailable(); | ||
| const isLoadingInference = useSpinDelay(isPending, { delay: 300 }); | ||
|
|
||
| if (selectedMediaItem === undefined) { | ||
| return <StreamContainer />; | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. One thing to note: here we will need to improve the validation a bit more. In the demo code I send you I rendered the In a later UX we should:
|
||
| } | ||
|
|
||
| if (!isInferenceAvailable && selectedMediaItem === undefined) { | ||
| return ( | ||
| <Grid | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
|
|
@@ -42,6 +42,7 @@ | |||
| const { status, webRTCConnectionRef } = useWebRTCConnection(); | ||||
|
|
||||
| const connect = useCallback(async () => { | ||||
| console.log('feature connect'); | ||||
|
||||
| console.log('feature connect'); |
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,41 @@ | ||||||||||||||
| import { $api } from '@geti-inspect/api'; | ||||||||||||||
| import { useProjectIdentifier } from '@geti-inspect/hooks'; | ||||||||||||||
| import { Switch, toast } from '@geti/ui'; | ||||||||||||||
|
|
||||||||||||||
| export const PipelineSwitch = () => { | ||||||||||||||
| const { projectId } = useProjectIdentifier(); | ||||||||||||||
| const { data: pipeline } = $api.useSuspenseQuery('get', '/api/projects/{project_id}/pipeline', { | ||||||||||||||
| params: { path: { project_id: projectId } }, | ||||||||||||||
| }); | ||||||||||||||
|
|
||||||||||||||
| const enablePipeline = $api.useMutation('post', '/api/projects/{project_id}/pipeline:enable', { | ||||||||||||||
| onError: (error) => { | ||||||||||||||
| if (error) { | ||||||||||||||
| toast({ type: 'error', message: String(error.detail) }); | ||||||||||||||
|
||||||||||||||
| toast({ type: 'error', message: String(error.detail) }); | |
| const message = | |
| typeof error?.detail === 'string' && error.detail.trim() | |
| ? error.detail | |
| : 'Failed to enable pipeline'; | |
| toast({ type: 'error', message }); |
Copilot
AI
Nov 7, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The disablePipeline mutation is missing an onError handler similar to enablePipeline. Consider adding error handling to provide user feedback when disabling the pipeline fails.
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we could get rid of
setSelectedModelIdnow and instead use the model id from the project's pipeline query.