mirror of
https://github.com/tiennm99/ccs.git
synced 2026-07-16 02:11:28 +00:00
style(ui): format files for enforced prettier rules
This commit is contained in:
@@ -73,7 +73,9 @@ export function ExtendedContextToggle({
|
||||
<div className="flex items-start gap-2 text-xs text-muted-foreground">
|
||||
<Info className="w-3.5 h-3.5 mt-0.5 shrink-0" />
|
||||
<div className="space-y-1">
|
||||
<p>Applies the explicit <code>[1m]</code> long-context suffix to compatible saved mappings.</p>
|
||||
<p>
|
||||
Applies the explicit <code>[1m]</code> long-context suffix to compatible saved mappings.
|
||||
</p>
|
||||
<p className="text-[10px]">{behaviorHint}</p>
|
||||
<p className="text-amber-600 dark:text-amber-500">
|
||||
CCS only saves <code>[1m]</code>. Provider pricing and entitlement are separate, and
|
||||
|
||||
@@ -68,9 +68,7 @@ describe('AddAccountDialog power user mode', () => {
|
||||
it('skips the Gemini typed acknowledgement when power user mode is enabled', async () => {
|
||||
fetchMock.mockResolvedValue(createJsonResponse({ antigravityAckBypass: true }));
|
||||
|
||||
render(
|
||||
<AddAccountDialog open onClose={vi.fn()} provider="gemini" displayName="Gemini" />
|
||||
);
|
||||
render(<AddAccountDialog open onClose={vi.fn()} provider="gemini" displayName="Gemini" />);
|
||||
|
||||
await waitFor(() =>
|
||||
expect(fetchMock).toHaveBeenCalledWith('/api/settings/auth/antigravity-risk')
|
||||
@@ -95,9 +93,7 @@ describe('AddAccountDialog power user mode', () => {
|
||||
it('keeps the Gemini typed acknowledgement when power user mode is disabled', async () => {
|
||||
fetchMock.mockResolvedValue(createJsonResponse({ antigravityAckBypass: false }));
|
||||
|
||||
render(
|
||||
<AddAccountDialog open onClose={vi.fn()} provider="gemini" displayName="Gemini" />
|
||||
);
|
||||
render(<AddAccountDialog open onClose={vi.fn()} provider="gemini" displayName="Gemini" />);
|
||||
|
||||
await waitFor(() =>
|
||||
expect(fetchMock).toHaveBeenCalledWith('/api/settings/auth/antigravity-risk')
|
||||
@@ -114,9 +110,7 @@ describe('AddAccountDialog power user mode', () => {
|
||||
it('surfaces a power user mode fetch failure and fails closed for Gemini', async () => {
|
||||
fetchMock.mockRejectedValue(new Error('network down'));
|
||||
|
||||
render(
|
||||
<AddAccountDialog open onClose={vi.fn()} provider="gemini" displayName="Gemini" />
|
||||
);
|
||||
render(<AddAccountDialog open onClose={vi.fn()} provider="gemini" displayName="Gemini" />);
|
||||
|
||||
await waitFor(() =>
|
||||
expect(toast.error).toHaveBeenCalledWith(
|
||||
@@ -125,7 +119,9 @@ describe('AddAccountDialog power user mode', () => {
|
||||
);
|
||||
|
||||
expect(
|
||||
screen.getByText('Failed to load power user mode settings. Check Settings > Proxy and try again.')
|
||||
screen.getByText(
|
||||
'Failed to load power user mode settings. Check Settings > Proxy and try again.'
|
||||
)
|
||||
).toBeInTheDocument();
|
||||
expect(screen.getByText(/Type exact phrase to continue/i)).toBeInTheDocument();
|
||||
expect(screen.getByRole('button', { name: 'Authenticate' })).toBeDisabled();
|
||||
|
||||
@@ -11,9 +11,7 @@ function createJsonResponse(body: Record<string, unknown>, status = 200): Respon
|
||||
});
|
||||
}
|
||||
|
||||
const wrapper = ({ children }: { children: ReactNode }) => (
|
||||
<AllProviders>{children}</AllProviders>
|
||||
);
|
||||
const wrapper = ({ children }: { children: ReactNode }) => <AllProviders>{children}</AllProviders>;
|
||||
|
||||
describe('useProviderEditor', () => {
|
||||
beforeEach(() => {
|
||||
|
||||
@@ -51,15 +51,15 @@ const boundedLayoutContracts = [
|
||||
] as const;
|
||||
|
||||
describe('bounded CodeEditor consumers', () => {
|
||||
it.each(boundedConsumers)('$file opts into fill-parent mode for every bounded editor', ({
|
||||
file,
|
||||
expectedCount,
|
||||
}) => {
|
||||
const source = readFileSync(resolve(process.cwd(), file), 'utf8');
|
||||
const matches = source.match(/heightMode="fill-parent"/g) ?? [];
|
||||
it.each(boundedConsumers)(
|
||||
'$file opts into fill-parent mode for every bounded editor',
|
||||
({ file, expectedCount }) => {
|
||||
const source = readFileSync(resolve(process.cwd(), file), 'utf8');
|
||||
const matches = source.match(/heightMode="fill-parent"/g) ?? [];
|
||||
|
||||
expect(matches).toHaveLength(expectedCount);
|
||||
});
|
||||
expect(matches).toHaveLength(expectedCount);
|
||||
}
|
||||
);
|
||||
|
||||
it.each(boundedLayoutContracts)(
|
||||
'$file keeps bounded editor ancestors shrinkable',
|
||||
|
||||
@@ -50,11 +50,7 @@ describe('CodeEditor', () => {
|
||||
|
||||
it('preserves content mode as the default layout contract', () => {
|
||||
const { container } = render(
|
||||
<CodeEditor
|
||||
value={'{\n "provider": "openrouter"\n}'}
|
||||
onChange={vi.fn()}
|
||||
language="json"
|
||||
/>
|
||||
<CodeEditor value={'{\n "provider": "openrouter"\n}'} onChange={vi.fn()} language="json" />
|
||||
);
|
||||
|
||||
expect(container.querySelector('[data-slot="code-editor-viewport"]')).not.toBeInTheDocument();
|
||||
|
||||
Reference in New Issue
Block a user