mirror of
https://github.com/enricoros/big-AGI.git
synced 2026-05-10 21:50:14 -07:00
Remove labsAttachScreenCapture/labsCameraDesktop - always on now
This commit is contained in:
@@ -136,9 +136,7 @@ export function Composer(props: {
|
||||
// external state
|
||||
const { showPromisedOverlay } = useOverlayComponents();
|
||||
const { newChat: appChatNewChatIntent } = useRouterQuery<Partial<AppChatIntent>>();
|
||||
const { labsAttachScreenCapture, labsCameraDesktop, labsShowCost, labsShowShortcutBar } = useUXLabsStore(useShallow(state => ({
|
||||
labsAttachScreenCapture: state.labsAttachScreenCapture,
|
||||
labsCameraDesktop: state.labsCameraDesktop,
|
||||
const { labsShowCost, labsShowShortcutBar } = useUXLabsStore(useShallow(state => ({
|
||||
labsShowCost: state.labsShowCost,
|
||||
labsShowShortcutBar: state.labsShowShortcutBar,
|
||||
})));
|
||||
@@ -663,7 +661,7 @@ export function Composer(props: {
|
||||
if (supportsClipboardRead())
|
||||
composerShortcuts.push({ key: 'v', ctrl: true, shift: true, action: attachAppendClipboardItems, description: 'Attach Clipboard' });
|
||||
// Future: keep reactive state here to support Live Screen Capture and more
|
||||
// if (labsAttachScreenCapture && supportsScreenCapture)
|
||||
// if (supportsScreenCapture)
|
||||
// composerShortcuts.push({ key: 's', ctrl: true, shift: true, action: openScreenCaptureDialog, description: 'Attach Screen Capture' });
|
||||
}
|
||||
if (recognitionState.isActive) {
|
||||
@@ -816,13 +814,13 @@ export function Composer(props: {
|
||||
{isDesktop && showChatAttachments && (
|
||||
<Box sx={{ flexGrow: 0, display: 'grid', gap: 0.5, alignSelf: 'flex-start' }}>
|
||||
|
||||
{/* [desktop] Attachment Sources: inline buttons */}
|
||||
{/* [desktop] Attachment Sources: dropdown menu or inline buttons */}
|
||||
<AttachmentSourcesMemo
|
||||
mode='inline-buttons'
|
||||
color={showTint}
|
||||
canBrowse={hasComposerBrowseCapability}
|
||||
hasScreenCapture={labsAttachScreenCapture && supportsScreenCapture}
|
||||
hasCamera={labsCameraDesktop && supportsCameraCapture()}
|
||||
hasScreenCapture={supportsScreenCapture}
|
||||
hasCamera={supportsCameraCapture()}
|
||||
onlyImages={showChatAttachments === 'only-images'}
|
||||
onAttachClipboard={attachAppendClipboardItems}
|
||||
onAttachFiles={handleAttachFiles}
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
import * as React from 'react';
|
||||
|
||||
import { FormControl, Switch, Typography } from '@mui/joy';
|
||||
import AddAPhotoIcon from '@mui/icons-material/AddAPhoto';
|
||||
import CodeIcon from '@mui/icons-material/Code';
|
||||
import EditNoteIcon from '@mui/icons-material/EditNote';
|
||||
import LocalAtmOutlinedIcon from '@mui/icons-material/LocalAtmOutlined';
|
||||
import ScreenshotMonitorIcon from '@mui/icons-material/ScreenshotMonitor';
|
||||
import ShortcutIcon from '@mui/icons-material/Shortcut';
|
||||
import SpeedIcon from '@mui/icons-material/Speed';
|
||||
import { FormLabelStart } from '~/common/components/forms/FormLabelStart';
|
||||
@@ -20,8 +18,6 @@ export function UxLabsSettings() {
|
||||
// external state
|
||||
const isMobile = useIsMobile();
|
||||
const {
|
||||
labsAttachScreenCapture, setLabsAttachScreenCapture,
|
||||
labsCameraDesktop, setLabsCameraDesktop,
|
||||
labsEnhanceCodeBlocks, setLabsEnhanceCodeBlocks,
|
||||
labsHighPerformance, setLabsHighPerformance,
|
||||
labsShowCost, setLabsShowCost,
|
||||
@@ -54,16 +50,6 @@ export function UxLabsSettings() {
|
||||
slotProps={{ endDecorator: { sx: { minWidth: 26 } } }} />
|
||||
</FormControl>
|
||||
|
||||
{!isMobile && <FormSwitchControl
|
||||
title={<><ScreenshotMonitorIcon sx={{ fontSize: 'lg', mr: 0.5, mb: 0.25 }} /> Screen Capture</>} description={labsAttachScreenCapture ? 'Enabled' : 'Disabled'}
|
||||
checked={labsAttachScreenCapture} onChange={setLabsAttachScreenCapture}
|
||||
/>}
|
||||
|
||||
{!isMobile && <FormSwitchControl
|
||||
title={<><AddAPhotoIcon sx={{ fontSize: 'lg', mr: 0.5, mb: 0.25 }} /> Webcam Capture</>} description={/*'v1.8 · ' +*/ (labsCameraDesktop ? 'Enabled' : 'Disabled')}
|
||||
checked={labsCameraDesktop} onChange={setLabsCameraDesktop}
|
||||
/>}
|
||||
|
||||
<FormSwitchControl
|
||||
title={<><LocalAtmOutlinedIcon sx={{ fontSize: 'lg', mr: 0.5, mb: 0.25 }} />Cost of messages</>} description={labsShowCost ? 'Show when available' : 'Disabled'}
|
||||
checked={labsShowCost} onChange={setLabsShowCost}
|
||||
@@ -94,7 +80,7 @@ export function UxLabsSettings() {
|
||||
{' · '}<Link href='https://github.com/enricoros/big-AGI/issues/354' target='_blank'>Call AGI</Link>
|
||||
{' · '}<Link href='https://github.com/enricoros/big-AGI/issues/282' target='_blank'>Persona Creator</Link>
|
||||
{' · '}<Link href='https://github.com/enricoros/big-agi/issues/192' target='_blank'>Auto Diagrams</Link>
|
||||
{' · '}Imagine · Chat Search · Text Tools · LLM Overheat
|
||||
{' · '}Imagine · Chat Search · Text Tools · LLM Overheat · Screen Capture · Webcam
|
||||
</Typography>
|
||||
</FormControl>
|
||||
|
||||
|
||||
@@ -10,12 +10,6 @@ import { persist } from 'zustand/middleware';
|
||||
// - Chat Mode: Follow-Ups; moved to Chat Advanced UI
|
||||
interface UXLabsStore {
|
||||
|
||||
labsAttachScreenCapture: boolean;
|
||||
setLabsAttachScreenCapture: (labsAttachScreenCapture: boolean) => void;
|
||||
|
||||
labsCameraDesktop: boolean;
|
||||
setLabsCameraDesktop: (labsCameraDesktop: boolean) => void;
|
||||
|
||||
labsEnhanceCodeBlocks: boolean;
|
||||
setLabsEnhanceCodeBlocks: (labsEnhanceCodeBlocks: boolean) => void;
|
||||
|
||||
@@ -40,12 +34,6 @@ export const useUXLabsStore = create<UXLabsStore>()(
|
||||
persist(
|
||||
(set) => ({
|
||||
|
||||
labsAttachScreenCapture: true,
|
||||
setLabsAttachScreenCapture: (labsAttachScreenCapture: boolean) => set({ labsAttachScreenCapture }),
|
||||
|
||||
labsCameraDesktop: false,
|
||||
setLabsCameraDesktop: (labsCameraDesktop: boolean) => set({ labsCameraDesktop }),
|
||||
|
||||
labsEnhanceCodeBlocks: true,
|
||||
setLabsEnhanceCodeBlocks: (labsEnhanceCodeBlocks: boolean) => set({ labsEnhanceCodeBlocks }),
|
||||
|
||||
@@ -69,14 +57,8 @@ export const useUXLabsStore = create<UXLabsStore>()(
|
||||
name: 'app-ux-labs',
|
||||
|
||||
// Migrations:
|
||||
// - 1: turn on the screen capture by default
|
||||
// - 1: turn on the screen capture by default (subsequently removed)
|
||||
version: 1,
|
||||
migrate: (state: any, fromVersion: number): UXLabsStore => {
|
||||
// 0 -> 1: turn on the screen capture by default
|
||||
if (state && fromVersion < 1 && !state.labsAttachScreenCapture)
|
||||
return { ...state, labsAttachScreenCapture: true };
|
||||
return state;
|
||||
},
|
||||
|
||||
},
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user