Expand AITURK Turkish settings and desktop surfaces for beta 5
This commit is contained in:
1 parent
237d1e2060
commit
5e76f58637
108 files changed
+6675
-1034
No files matched your search
@@ -1,8 +1,14 @@
|
||||
import { useEffect, useRef } from 'react'
|
||||
|
||||
import { useI18n } from '@/i18n'
|
||||
import { setPetActivity } from '@/store/pet'
|
||||
import { setPetScale } from '@/store/pet-gallery'
|
||||
import { setPetOverlayOpenAppHandler, setPetOverlayScaleHandler, setPetOverlaySubmitHandler } from '@/store/pet-overlay'
|
||||
import {
|
||||
setPetOverlayLocale,
|
||||
setPetOverlayOpenAppHandler,
|
||||
setPetOverlayScaleHandler,
|
||||
setPetOverlaySubmitHandler
|
||||
} from '@/store/pet-overlay'
|
||||
import { $sessions } from '@/store/session'
|
||||
import { $attentionSessionIds } from '@/store/session-states'
|
||||
import { isAuxiliaryWindow } from '@/store/windows'
|
||||
@@ -23,6 +29,12 @@ interface PetBridgeParams {
|
||||
* window that can drop a submit. Primary window only.
|
||||
*/
|
||||
export function usePetBridge({ requestGateway, resumeSession, submitText }: PetBridgeParams): void {
|
||||
const { locale } = useI18n()
|
||||
useEffect(() => {
|
||||
if (!isAuxiliaryWindow()) {
|
||||
setPetOverlayLocale(locale)
|
||||
}
|
||||
}, [locale])
|
||||
const submitTextRef = useRef(submitText)
|
||||
submitTextRef.current = submitText
|
||||
const resumeSessionRef = useRef(resumeSession)
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { useEffect, useRef } from 'react'
|
||||
|
||||
import { useI18n } from '@/i18n'
|
||||
import {
|
||||
initQuickEntryBridge,
|
||||
QUICK_TARGET_CURRENT,
|
||||
@@ -51,6 +52,7 @@ function sessionOptions(): QuickEntrySessionOption[] {
|
||||
* one keystroke would send N prompts.
|
||||
*/
|
||||
export function useQuickEntryBridge({ startFreshSessionDraft, submitText }: QuickEntryBridgeParams): void {
|
||||
const { locale } = useI18n()
|
||||
const submitTextRef = useRef(submitText)
|
||||
submitTextRef.current = submitText
|
||||
const startFreshRef = useRef(startFreshSessionDraft)
|
||||
@@ -112,7 +114,7 @@ export function useQuickEntryBridge({ startFreshSessionDraft, submitText }: Quic
|
||||
}
|
||||
|
||||
const push = () => {
|
||||
api.pushState({ connected: $gatewayState.get() === 'open', sessions: sessionOptions() })
|
||||
api.pushState({ connected: $gatewayState.get() === 'open', locale, sessions: sessionOptions() })
|
||||
}
|
||||
|
||||
push()
|
||||
@@ -124,5 +126,5 @@ export function useQuickEntryBridge({ startFreshSessionDraft, submitText }: Quic
|
||||
offGateway()
|
||||
offSessions()
|
||||
}
|
||||
}, [])
|
||||
}, [locale])
|
||||
}
|
||||
@@ -22,6 +22,7 @@ import { ContribBoundary, ContribRender } from '@/contrib/react/boundary'
|
||||
import { useContributions } from '@/contrib/react/use-contributions'
|
||||
import { registry } from '@/contrib/registry'
|
||||
import { getLogs } from '@/hermes'
|
||||
import { useI18n } from '@/i18n'
|
||||
import { normalizeOrLocalPreviewTarget } from '@/lib/local-preview'
|
||||
import { cn } from '@/lib/utils'
|
||||
import { openPreview } from '@/store/preview'
|
||||
@@ -34,6 +35,8 @@ import { $currentCwd } from '@/store/session'
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
export function LogsPane() {
|
||||
const { t } = useI18n()
|
||||
|
||||
const { data, error } = useQuery({
|
||||
queryKey: ['contrib-logs-tail'],
|
||||
queryFn: () => getLogs({ lines: 300 }),
|
||||
@@ -41,7 +44,7 @@ export function LogsPane() {
|
||||
})
|
||||
|
||||
if (error) {
|
||||
return <div className="p-3 text-xs text-(--ui-text-quaternary)">log unavailable: {String(error)}</div>
|
||||
return <div className="p-3 text-xs text-(--ui-text-quaternary)">{t.surfaces.logUnavailable(String(error))}</div>
|
||||
}
|
||||
|
||||
if (!data) {
|
||||
|
||||
Reference in new issue
Block a user