diff --git a/scripts/wait_pr_checks.sh b/scripts/wait_pr_checks.sh index a2a03935d..f0fdcad24 100755 --- a/scripts/wait_pr_checks.sh +++ b/scripts/wait_pr_checks.sh @@ -30,6 +30,12 @@ while true; do exit 0 fi + # Check if PR is closed without merging + if [ "$PR_STATE" = "CLOSED" ]; then + echo "❌ PR #$PR_NUMBER is closed (not merged)!" + exit 1 + fi + MERGEABLE=$(echo "$STATUS" | jq -r '.mergeable') MERGE_STATE=$(echo "$STATUS" | jq -r '.mergeStateStatus') diff --git a/src/components/AIView.tsx b/src/components/AIView.tsx index 01e60f3e8..5c3aef98b 100644 --- a/src/components/AIView.tsx +++ b/src/components/AIView.tsx @@ -320,12 +320,7 @@ const AIViewInner: React.FC = ({ } return ( - + diff --git a/src/components/ChatInput.tsx b/src/components/ChatInput.tsx index 31e39d116..d8d5e77a5 100644 --- a/src/components/ChatInput.tsx +++ b/src/components/ChatInput.tsx @@ -306,7 +306,7 @@ export const ChatInput: React.FC = ({ const modelSelectorRef = useRef(null); const [thinkingLevel] = useThinkingLevel(); const [mode, setMode] = useMode(); - const [use1M] = use1MContext(workspaceId); + const [use1M] = use1MContext(); const { recentModels } = useModelLRU(); const focusMessageInput = useCallback(() => { @@ -763,7 +763,7 @@ export const ChatInput: React.FC = ({ )} - + > = [ ]; export const CostsTab: React.FC = () => { - const { stats, isCalculating, workspaceId } = useChatContext(); + const { stats, isCalculating } = useChatContext(); const [viewMode, setViewMode] = usePersistedState("costsTab:viewMode", "last-request"); - const [use1M] = use1MContext(workspaceId); + const [use1M] = use1MContext(); // Only show loading if we don't have any stats yet if (isCalculating && !stats) { diff --git a/src/components/ChatToggles.tsx b/src/components/ChatToggles.tsx index 1ac5e7c20..c74ca5898 100644 --- a/src/components/ChatToggles.tsx +++ b/src/components/ChatToggles.tsx @@ -10,17 +10,16 @@ export const TogglesContainer = styled.div` `; interface ChatTogglesProps { - workspaceId: string; modelString: string; children: React.ReactNode; } -export const ChatToggles: React.FC = ({ workspaceId, modelString, children }) => { +export const ChatToggles: React.FC = ({ modelString, children }) => { return ( {children} - + ); }; diff --git a/src/components/Context1MCheckbox.tsx b/src/components/Context1MCheckbox.tsx index 10642070b..16e5d12d1 100644 --- a/src/components/Context1MCheckbox.tsx +++ b/src/components/Context1MCheckbox.tsx @@ -59,15 +59,11 @@ const Checkbox = styled.input` `; interface Context1MCheckboxProps { - workspaceId: string; modelString: string; } -export const Context1MCheckbox: React.FC = ({ - workspaceId, - modelString, -}) => { - const [use1M, setUse1M] = use1MContext(workspaceId); +export const Context1MCheckbox: React.FC = ({ modelString }) => { + const [use1M, setUse1M] = use1MContext(); const isSupported = supports1MContext(modelString); if (!isSupported) { diff --git a/src/contexts/ChatContext.tsx b/src/contexts/ChatContext.tsx index 5192ac1ce..3a64187be 100644 --- a/src/contexts/ChatContext.tsx +++ b/src/contexts/ChatContext.tsx @@ -8,7 +8,6 @@ interface ChatContextType { messages: DisplayedMessage[]; stats: ChatStats | null; isCalculating: boolean; - workspaceId: string; } const ChatContext = createContext(undefined); @@ -18,7 +17,6 @@ interface ChatProviderProps { messages: DisplayedMessage[]; cmuxMessages: CmuxMessage[]; model: string; - workspaceId: string; } export const ChatProvider: React.FC = ({ @@ -26,7 +24,6 @@ export const ChatProvider: React.FC = ({ messages, cmuxMessages, model, - workspaceId, }) => { const [stats, setStats] = useState(null); const [isCalculating, setIsCalculating] = useState(false); @@ -91,7 +88,7 @@ export const ChatProvider: React.FC = ({ }, [cmuxMessages, model]); return ( - + {children} ); diff --git a/src/hooks/use1MContext.ts b/src/hooks/use1MContext.ts index 82d1e98ac..0fe5efe1c 100644 --- a/src/hooks/use1MContext.ts +++ b/src/hooks/use1MContext.ts @@ -2,11 +2,10 @@ import { usePersistedState } from "@/hooks/usePersistedState"; /** * Custom hook for 1M context state. - * Persists state per workspace in localStorage. + * Persists state globally in localStorage (applies to all workspaces). * - * @param workspaceId - Unique identifier for the workspace * @returns [use1MContext, setUse1MContext] tuple */ -export function use1MContext(workspaceId: string): [boolean, (value: boolean) => void] { - return usePersistedState(`use1MContext:${workspaceId}`, false); +export function use1MContext(): [boolean, (value: boolean) => void] { + return usePersistedState("use1MContext", false); }