Skip to content
Source
Sign inSign up
pingdotgg/t3code

feat(web): open full access menu from the new thread context strip #30275

MergedYash-Singh1(GitHub profile, opens in a new tab)merged 1 commit intomain fromrefs/pull/30275/headmerged by Yash-Singh1(GitHub profile, opens in a new tab) View on GitHub

Showing 5 changed files with 57 additions and 10 deletions (loading 2).

x
0 of 5 viewed, 5 left
5 additions and 9 deletionsapps/web/src/components/chat/ChatComposer.tsxModified
View file
@@ -5,7 +5,7 @@
import {
resolveCompatibleRuntimeMode,
runtimeModeConfig,
- runtimeModeOptions as runtimeModes,
+ resolveRuntimeModeOptions,
} from "./runtimeModeConfig";
import { isLocalEnvironmentDisabled } from "../../localEnvironment";
import { usePrimaryEnvironmentId } from "../../state/environments";
@@ -285,8 +285,6 @@
return armed;
​
-const runtimeModeOptions = runtimeModes.map((mode) => ({ mode, ...runtimeModeConfig[mode] }));
-​
export interface ChatComposerHandle {
focusAtEnd: () => void;
focusAt: (cursor: number) => void;
@@ -920,12 +918,10 @@
// Modes above an administrator's ceiling stay listed, disabled with the reason.
const managedPolicy = useManagedPolicy(environmentId);
- const compatibleRuntimeModeOptions = runtimeModeOptions
- .filter((option) => compatibleRuntimeModes.includes(option.mode))
- .map((option) => {
- const disabledReason = managedRuntimeModeDenial(managedPolicy, option.mode);
- return disabledReason === undefined ? option : { ...option, disabledReason };
- });