-
Notifications
You must be signed in to change notification settings - Fork 112
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: allow kill switch to disable saving agent configs and dsviews (#…
…9356) * feat: allow kill switch to disable saving agent configs and dsviews * block at endpoint level * fix * add assistant builder tooltip * ds views tooltips --------- Co-authored-by: Henry Fontanier <[email protected]>
- Loading branch information
1 parent
cafe8c1
commit 7e21c12
Showing
13 changed files
with
956 additions
and
711 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// LABS - CAN BE REMOVED ANYTIME | ||
|
||
import type { Fetcher } from "swr"; | ||
|
||
import { fetcher, useSWRWithDefaults } from "@app/lib/swr/swr"; | ||
import type { GetKillSwitchesResponseBody } from "@app/pages/api/kill"; | ||
|
||
export function useKillSwitches() { | ||
const killSwitchesFetcher: Fetcher<GetKillSwitchesResponseBody> = fetcher; | ||
|
||
const { data, error, mutate } = useSWRWithDefaults( | ||
`/api/kill`, | ||
killSwitchesFetcher | ||
); | ||
|
||
return { | ||
killSwitches: data ? data.killSwitches : null, | ||
isKillSwitchesLoading: !error && !data, | ||
isKillSwitchesError: error, | ||
mutateKillSwitches: mutate, | ||
}; | ||
} |
Oops, something went wrong.