From dee9492d4ceeb71af52dc2a6049e11d113e75c28 Mon Sep 17 00:00:00 2001 From: Enrico Ros Date: Mon, 13 May 2024 12:02:02 -0700 Subject: [PATCH] 1.16.0: update --- README.md | 4 ++++ docs/changelog.md | 4 ++++ pages/info/debug.tsx | 5 +++-- src/apps/news/news.data.tsx | 6 ++++-- src/apps/news/news.version.tsx | 29 ++++++++++++++++++++++++----- src/common/state/store-appstate.ts | 13 +------------ 6 files changed, 40 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index cf17ce2de..21cf58f88 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,10 @@ Or fork & run on Vercel [//]: # (big-AGI is an open book; see the **[ready-to-ship and future ideas](https://github.com/users/enricoros/projects/4/views/2)** in our open roadmap) +### What's New in 1.16.1 · May 13, 2024 (minor release, models support) + +- Support for the new OpenAI GPT-4o 2024-05-13 model + ### What's New in 1.16.0 · May 9, 2024 · Crystal Clear - [Beam](https://big-agi.com/blog/beam-multi-model-ai-reasoning) core and UX improvements based on user feedback diff --git a/docs/changelog.md b/docs/changelog.md index 78d2f9a3b..148e322ae 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -10,6 +10,10 @@ by release. - milestone: [1.17.0](https://github.com/enricoros/big-agi/milestone/17) - work in progress: [big-AGI open roadmap](https://github.com/users/enricoros/projects/4/views/2), [help here](https://github.com/users/enricoros/projects/4/views/4) +### What's New in 1.16.1 · May 13, 2024 (minor release, models support) + +- Support for the new OpenAI GPT-4o 2024-05-13 model + ### What's New in 1.16.0 · May 9, 2024 · Crystal Clear - [Beam](https://big-agi.com/blog/beam-multi-model-ai-reasoning) core and UX improvements based on user feedback diff --git a/pages/info/debug.tsx b/pages/info/debug.tsx index 7707812e0..43fafee01 100644 --- a/pages/info/debug.tsx +++ b/pages/info/debug.tsx @@ -17,7 +17,7 @@ import { Brand } from '~/common/app.config'; import { ROUTE_APP_CHAT, ROUTE_INDEX } from '~/common/app.routes'; // apps access -import { incrementalNewsVersion } from '../../src/apps/news/news.version'; +import { incrementalNewsVersion, useAppNewsStateStore } from '../../src/apps/news/news.version'; // capabilities access import { useCapabilityBrowserSpeechRecognition, useCapabilityElevenLabs, useCapabilityTextToImage } from '~/common/components/useCapabilities'; @@ -81,7 +81,8 @@ function AppDebug() { const chatsCount = useChatStore.getState().conversations?.length; const uxLabsExperiments = Object.entries(useUXLabsStore.getState()).filter(([_k, v]) => v === true).map(([k, _]) => k).join(', '); const { folders, enableFolders } = useFolderStore.getState(); - const { lastSeenNewsVersion, usageCount } = useAppStateStore.getState(); + const { lastSeenNewsVersion } = useAppNewsStateStore.getState(); + const { usageCount } = useAppStateStore.getState(); // derived state diff --git a/src/apps/news/news.data.tsx b/src/apps/news/news.data.tsx index 3e8c37bca..8c6697b24 100644 --- a/src/apps/news/news.data.tsx +++ b/src/apps/news/news.data.tsx @@ -60,9 +60,10 @@ export const NewsItems: NewsItem[] = [ ] }*/ { - versionCode: '1.16', + versionCode: '1.16.1', versionName: 'Crystal Clear', - versionDate: new Date('2024-05-09T00:00:00Z'), + versionDate: new Date('2024-05-13T19:00:00Z'), + // versionDate: new Date('2024-05-09T00:00:00Z'), versionCoverImage: coverV116, items: [ { text: <>Beam core and UX improvements based on user feedback, issue: 470, icon: ChatBeamIcon }, @@ -74,6 +75,7 @@ export const NewsItems: NewsItem[] = [ { text: <>More: code soft-wrap, selection toolbar, 3x faster on Apple silicon, issue: 507 }, { text: <>Updated Anthropic*, Groq, Ollama, OpenAI*, OpenRouter*, and Perplexity }, { text: <>Developers: update LLMs data structures, dev: true }, + { text: <>1.16.1: Support for OpenAI GPT-4o }, ], }, { diff --git a/src/apps/news/news.version.tsx b/src/apps/news/news.version.tsx index 3b129d03e..29d6f97e3 100644 --- a/src/apps/news/news.version.tsx +++ b/src/apps/news/news.version.tsx @@ -1,21 +1,40 @@ // NOTE: this is a separate file to help with bundle tracing, as it's included by the ProviderBootstrapLogic (i.e. by All pages) -// update this variable every time you want to broadcast a new version to clients +import { create } from 'zustand'; +import { persist } from 'zustand/middleware'; + import { useAppStateStore } from '~/common/state/store-appstate'; -export const incrementalNewsVersion: number = 15; +// update this variable every time you want to broadcast a new version to clients +export const incrementalNewsVersion: number = 16.1; + + +interface NewsState { + lastSeenNewsVersion: number; +} + +export const useAppNewsStateStore = create()( + persist( + (set) => ({ + lastSeenNewsVersion: 0, + }), + { + name: 'app-news', + }, + ), +); export function shallRedirectToNews() { - const { usageCount, lastSeenNewsVersion } = useAppStateStore.getState(); + const { lastSeenNewsVersion } = useAppNewsStateStore.getState(); + const { usageCount } = useAppStateStore.getState(); const isNewsOutdated = (lastSeenNewsVersion || 0) < incrementalNewsVersion; return isNewsOutdated && usageCount > 2; } export function markNewsAsSeen() { - const { setLastSeenNewsVersion } = useAppStateStore.getState(); - setLastSeenNewsVersion(incrementalNewsVersion); + useAppNewsStateStore.setState({ lastSeenNewsVersion: incrementalNewsVersion }); } diff --git a/src/common/state/store-appstate.ts b/src/common/state/store-appstate.ts index 0d7816bd5..0e3ff9308 100644 --- a/src/common/state/store-appstate.ts +++ b/src/common/state/store-appstate.ts @@ -6,24 +6,13 @@ import { persist } from 'zustand/middleware'; interface AppStateData { usageCount: number; - lastSeenNewsVersion: number; - // suppressedItems: Record; } -interface AppStateActions { - setLastSeenNewsVersion: (version: number) => void; -} - - -export const useAppStateStore = create()( +export const useAppStateStore = create()( persist( (set) => ({ usageCount: 0, - lastSeenNewsVersion: 0, - // suppressedItems: {}, - - setLastSeenNewsVersion: (version: number) => set({ lastSeenNewsVersion: version }), }), {