Skip to content

Enhanced ChatGPT Clone: Features Agents, MCP, Skills, DeepSeek, Anthropic, AWS, OpenAI, Responses API, Azure, Groq, o1, GPT-5, Mistral, OpenRouter, Vertex AI, Gemini, Artifacts, AI model switching, message search, Code Interpreter, langchain, DALL-E-3, OpenAPI Actions, Functions, Secure Multi-User Auth, Presets, open-source for self-hosting. Active

759 B
Raw Blame
import { createStore } from 'jotai';
import { Constants, ReasoningEffort } from 'librechat-data-provider';
import { getReasoningStateKey, pendingReasoningOverrideFamily } from '../composer';

describe('composer reasoning state', () => {
  it('isolates unsaved split panes that share the new-conversation sentinel', () => {
    const firstKey = getReasoningStateKey(Constants.NEW_CONVO, 0);
    const secondKey = getReasoningStateKey(Constants.NEW_CONVO, 1);
    const store = createStore();

    store.set(pendingReasoningOverrideFamily(firstKey), {
      key: 'reasoning_effort',
      value: ReasoningEffort.high,
    });

    expect(firstKey).not.toBe(secondKey);
    expect(store.get(pendingReasoningOverrideFamily(secondKey))).toBeUndefined();
  });
});