diff --git a/.github/workflows/ci-plugin-server.yml b/.github/workflows/ci-plugin-server.yml index 4ee25d612039d..d2c46aab547d4 100644 --- a/.github/workflows/ci-plugin-server.yml +++ b/.github/workflows/ci-plugin-server.yml @@ -137,7 +137,7 @@ jobs: - name: Install sqlx-cli if: needs.changes.outputs.plugin-server == 'true' working-directory: rust - run: cargo install sqlx-cli@0.7.3 --no-default-features --features native-tls,postgres + run: cargo install sqlx-cli@0.7.3 --locked --no-default-features --features native-tls,postgres - name: Install SAML (python3-saml) dependencies if: needs.changes.outputs.plugin-server == 'true' diff --git a/ee/hogai/trends/nodes.py b/ee/hogai/trends/nodes.py index d1819b49b705f..9726a61b3cb0d 100644 --- a/ee/hogai/trends/nodes.py +++ b/ee/hogai/trends/nodes.py @@ -97,6 +97,7 @@ def run(self, state: AssistantState, config: RunnableConfig): AgentAction, agent.invoke( { + "product_description": self._team.project.product_description, "tools": toolkit.render_text_description(), "tool_names": ", ".join([t["name"] for t in toolkit.tools]), "agent_scratchpad": self._get_agent_scratchpad(intermediate_steps), diff --git a/ee/hogai/trends/prompts.py b/ee/hogai/trends/prompts.py index a4620158434a3..14076c3bc4686 100644 --- a/ee/hogai/trends/prompts.py +++ b/ee/hogai/trends/prompts.py @@ -1,10 +1,13 @@ react_system_prompt = """ You're a product analyst agent. Your task is to define trends series: events, property filters, and values of property filters from the user's data in order to correctly answer on the user's question. +The product being analyzed is described as follows: +{{product_description}} + You have access to the following tools: {{tools}} -Use a json blob to specify a tool by providing an action key (tool name) and an action_input key (tool input). +Use a JSON blob to specify a tool by providing an action key (tool name) and an action_input key (tool input). Valid "action" values: {{tool_names}} diff --git a/frontend/__snapshots__/scenes-app-insights--funnel-top-to-bottom-breakdown-edit--light.png b/frontend/__snapshots__/scenes-app-insights--funnel-top-to-bottom-breakdown-edit--light.png index 74e8409c16b8b..78ea79ea3f745 100644 Binary files a/frontend/__snapshots__/scenes-app-insights--funnel-top-to-bottom-breakdown-edit--light.png and b/frontend/__snapshots__/scenes-app-insights--funnel-top-to-bottom-breakdown-edit--light.png differ diff --git a/frontend/__snapshots__/scenes-app-max-ai--welcome--dark.png b/frontend/__snapshots__/scenes-app-max-ai--welcome--dark.png index 72976d20f6979..0845aaa82062e 100644 Binary files a/frontend/__snapshots__/scenes-app-max-ai--welcome--dark.png and b/frontend/__snapshots__/scenes-app-max-ai--welcome--dark.png differ diff --git a/frontend/__snapshots__/scenes-app-max-ai--welcome--light.png b/frontend/__snapshots__/scenes-app-max-ai--welcome--light.png index 6047a48da0df7..7fcdaba2eafa8 100644 Binary files a/frontend/__snapshots__/scenes-app-max-ai--welcome--light.png and b/frontend/__snapshots__/scenes-app-max-ai--welcome--light.png differ diff --git a/frontend/__snapshots__/scenes-app-max-ai--welcome-loading-suggestions--dark.png b/frontend/__snapshots__/scenes-app-max-ai--welcome-loading-suggestions--dark.png index 72976d20f6979..8fd19ae835a64 100644 Binary files a/frontend/__snapshots__/scenes-app-max-ai--welcome-loading-suggestions--dark.png and b/frontend/__snapshots__/scenes-app-max-ai--welcome-loading-suggestions--dark.png differ diff --git a/frontend/__snapshots__/scenes-app-max-ai--welcome-loading-suggestions--light.png b/frontend/__snapshots__/scenes-app-max-ai--welcome-loading-suggestions--light.png index 64ba4b1cac7bb..96b45dc3059b4 100644 Binary files a/frontend/__snapshots__/scenes-app-max-ai--welcome-loading-suggestions--light.png and b/frontend/__snapshots__/scenes-app-max-ai--welcome-loading-suggestions--light.png differ diff --git a/frontend/__snapshots__/scenes-app-max-ai--welcome-suggestions-available--dark.png b/frontend/__snapshots__/scenes-app-max-ai--welcome-suggestions-available--dark.png new file mode 100644 index 0000000000000..6a8addfe132e5 Binary files /dev/null and b/frontend/__snapshots__/scenes-app-max-ai--welcome-suggestions-available--dark.png differ diff --git a/frontend/__snapshots__/scenes-app-max-ai--welcome-suggestions-available--light.png b/frontend/__snapshots__/scenes-app-max-ai--welcome-suggestions-available--light.png new file mode 100644 index 0000000000000..eff544e4834a1 Binary files /dev/null and b/frontend/__snapshots__/scenes-app-max-ai--welcome-suggestions-available--light.png differ diff --git a/frontend/__snapshots__/scenes-app-sidepanels--side-panel-settings--dark.png b/frontend/__snapshots__/scenes-app-sidepanels--side-panel-settings--dark.png index 8bfd970329347..f84db4546c21f 100644 Binary files a/frontend/__snapshots__/scenes-app-sidepanels--side-panel-settings--dark.png and b/frontend/__snapshots__/scenes-app-sidepanels--side-panel-settings--dark.png differ diff --git a/frontend/__snapshots__/scenes-app-sidepanels--side-panel-settings--light.png b/frontend/__snapshots__/scenes-app-sidepanels--side-panel-settings--light.png index 83a2404223849..2dce17c37f60d 100644 Binary files a/frontend/__snapshots__/scenes-app-sidepanels--side-panel-settings--light.png and b/frontend/__snapshots__/scenes-app-sidepanels--side-panel-settings--light.png differ diff --git a/frontend/__snapshots__/scenes-other-settings--settings-project--dark.png b/frontend/__snapshots__/scenes-other-settings--settings-project--dark.png index 77afe0cd15b6f..24b46c282634e 100644 Binary files a/frontend/__snapshots__/scenes-other-settings--settings-project--dark.png and b/frontend/__snapshots__/scenes-other-settings--settings-project--dark.png differ diff --git a/frontend/__snapshots__/scenes-other-settings--settings-project--light.png b/frontend/__snapshots__/scenes-other-settings--settings-project--light.png index 946fad1b7d6bb..ff07ce0325337 100644 Binary files a/frontend/__snapshots__/scenes-other-settings--settings-project--light.png and b/frontend/__snapshots__/scenes-other-settings--settings-project--light.png differ diff --git a/frontend/__snapshots__/scenes-other-settings--settings-project-with-replay-features--dark.png b/frontend/__snapshots__/scenes-other-settings--settings-project-with-replay-features--dark.png index 2f4dd38f43d7b..97d72dcec86a0 100644 Binary files a/frontend/__snapshots__/scenes-other-settings--settings-project-with-replay-features--dark.png and b/frontend/__snapshots__/scenes-other-settings--settings-project-with-replay-features--dark.png differ diff --git a/frontend/__snapshots__/scenes-other-settings--settings-project-with-replay-features--light.png b/frontend/__snapshots__/scenes-other-settings--settings-project-with-replay-features--light.png index 5af68794791fa..0804b690eea04 100644 Binary files a/frontend/__snapshots__/scenes-other-settings--settings-project-with-replay-features--light.png and b/frontend/__snapshots__/scenes-other-settings--settings-project-with-replay-features--light.png differ diff --git a/frontend/__snapshots__/scenes-other-settings--settings-session-timeout-all-options--dark.png b/frontend/__snapshots__/scenes-other-settings--settings-session-timeout-all-options--dark.png index 7fbbd90b966bd..24b46c282634e 100644 Binary files a/frontend/__snapshots__/scenes-other-settings--settings-session-timeout-all-options--dark.png and b/frontend/__snapshots__/scenes-other-settings--settings-session-timeout-all-options--dark.png differ diff --git a/frontend/__snapshots__/scenes-other-settings--settings-session-timeout-all-options--light.png b/frontend/__snapshots__/scenes-other-settings--settings-session-timeout-all-options--light.png index b050994d51ecf..ff07ce0325337 100644 Binary files a/frontend/__snapshots__/scenes-other-settings--settings-session-timeout-all-options--light.png and b/frontend/__snapshots__/scenes-other-settings--settings-session-timeout-all-options--light.png differ diff --git a/frontend/__snapshots__/scenes-other-settings--settings-session-timeout-password-only--dark.png b/frontend/__snapshots__/scenes-other-settings--settings-session-timeout-password-only--dark.png index 2968881dd0f6d..24b46c282634e 100644 Binary files a/frontend/__snapshots__/scenes-other-settings--settings-session-timeout-password-only--dark.png and b/frontend/__snapshots__/scenes-other-settings--settings-session-timeout-password-only--dark.png differ diff --git a/frontend/__snapshots__/scenes-other-settings--settings-session-timeout-password-only--light.png b/frontend/__snapshots__/scenes-other-settings--settings-session-timeout-password-only--light.png index aaeccae01012e..ff07ce0325337 100644 Binary files a/frontend/__snapshots__/scenes-other-settings--settings-session-timeout-password-only--light.png and b/frontend/__snapshots__/scenes-other-settings--settings-session-timeout-password-only--light.png differ diff --git a/frontend/__snapshots__/scenes-other-settings--settings-session-timeout-sso-enforced-github--dark.png b/frontend/__snapshots__/scenes-other-settings--settings-session-timeout-sso-enforced-github--dark.png index b19c8bb0c1857..24b46c282634e 100644 Binary files a/frontend/__snapshots__/scenes-other-settings--settings-session-timeout-sso-enforced-github--dark.png and b/frontend/__snapshots__/scenes-other-settings--settings-session-timeout-sso-enforced-github--dark.png differ diff --git a/frontend/__snapshots__/scenes-other-settings--settings-session-timeout-sso-enforced-github--light.png b/frontend/__snapshots__/scenes-other-settings--settings-session-timeout-sso-enforced-github--light.png index 2f248c1178b48..ff07ce0325337 100644 Binary files a/frontend/__snapshots__/scenes-other-settings--settings-session-timeout-sso-enforced-github--light.png and b/frontend/__snapshots__/scenes-other-settings--settings-session-timeout-sso-enforced-github--light.png differ diff --git a/frontend/__snapshots__/scenes-other-settings--settings-session-timeout-sso-enforced-google--dark.png b/frontend/__snapshots__/scenes-other-settings--settings-session-timeout-sso-enforced-google--dark.png index 384888b49637f..24b46c282634e 100644 Binary files a/frontend/__snapshots__/scenes-other-settings--settings-session-timeout-sso-enforced-google--dark.png and b/frontend/__snapshots__/scenes-other-settings--settings-session-timeout-sso-enforced-google--dark.png differ diff --git a/frontend/__snapshots__/scenes-other-settings--settings-session-timeout-sso-enforced-google--light.png b/frontend/__snapshots__/scenes-other-settings--settings-session-timeout-sso-enforced-google--light.png index fdfe3c5ff43cc..ff07ce0325337 100644 Binary files a/frontend/__snapshots__/scenes-other-settings--settings-session-timeout-sso-enforced-google--light.png and b/frontend/__snapshots__/scenes-other-settings--settings-session-timeout-sso-enforced-google--light.png differ diff --git a/frontend/__snapshots__/scenes-other-settings--settings-session-timeout-sso-enforced-saml--dark.png b/frontend/__snapshots__/scenes-other-settings--settings-session-timeout-sso-enforced-saml--dark.png index fa0e26b7b40d3..24b46c282634e 100644 Binary files a/frontend/__snapshots__/scenes-other-settings--settings-session-timeout-sso-enforced-saml--dark.png and b/frontend/__snapshots__/scenes-other-settings--settings-session-timeout-sso-enforced-saml--dark.png differ diff --git a/frontend/__snapshots__/scenes-other-settings--settings-session-timeout-sso-enforced-saml--light.png b/frontend/__snapshots__/scenes-other-settings--settings-session-timeout-sso-enforced-saml--light.png index 72d7e2c71646b..ff07ce0325337 100644 Binary files a/frontend/__snapshots__/scenes-other-settings--settings-session-timeout-sso-enforced-saml--light.png and b/frontend/__snapshots__/scenes-other-settings--settings-session-timeout-sso-enforced-saml--light.png differ diff --git a/frontend/__snapshots__/scenes-other-settings--settings-session-timeout-sso-only--dark.png b/frontend/__snapshots__/scenes-other-settings--settings-session-timeout-sso-only--dark.png index 94cf733f6bc9d..24b46c282634e 100644 Binary files a/frontend/__snapshots__/scenes-other-settings--settings-session-timeout-sso-only--dark.png and b/frontend/__snapshots__/scenes-other-settings--settings-session-timeout-sso-only--dark.png differ diff --git a/frontend/__snapshots__/scenes-other-settings--settings-session-timeout-sso-only--light.png b/frontend/__snapshots__/scenes-other-settings--settings-session-timeout-sso-only--light.png index c22c1112c9c7e..ff07ce0325337 100644 Binary files a/frontend/__snapshots__/scenes-other-settings--settings-session-timeout-sso-only--light.png and b/frontend/__snapshots__/scenes-other-settings--settings-session-timeout-sso-only--light.png differ diff --git a/frontend/src/layout/navigation-3000/sidepanel/panels/SidePanelFeaturePreviews.tsx b/frontend/src/layout/navigation-3000/sidepanel/panels/SidePanelFeaturePreviews.tsx index cf5c67c209ed5..29f8fb6b074ec 100644 --- a/frontend/src/layout/navigation-3000/sidepanel/panels/SidePanelFeaturePreviews.tsx +++ b/frontend/src/layout/navigation-3000/sidepanel/panels/SidePanelFeaturePreviews.tsx @@ -8,7 +8,7 @@ export const SidePanelFeaturePreviews = (): JSX.Element => { return (
-
+
Get early access to these upcoming features. Let us know what you think! diff --git a/frontend/src/layout/navigation-3000/sidepanel/panels/SidePanelSettings.tsx b/frontend/src/layout/navigation-3000/sidepanel/panels/SidePanelSettings.tsx index 2ec3a84507b03..f5a992c30b82d 100644 --- a/frontend/src/layout/navigation-3000/sidepanel/panels/SidePanelSettings.tsx +++ b/frontend/src/layout/navigation-3000/sidepanel/panels/SidePanelSettings.tsx @@ -1,6 +1,7 @@ import { IconExternal } from '@posthog/icons' import { LemonButton } from '@posthog/lemon-ui' import { useActions, useValues } from 'kea' +import { capitalizeFirstLetter } from 'lib/utils' import { useEffect } from 'react' import { Settings } from 'scenes/settings/Settings' import { settingsLogic } from 'scenes/settings/settingsLogic' @@ -30,6 +31,9 @@ export const SidePanelSettings = (): JSX.Element => { return (
+ + {capitalizeFirstLetter(selectedLevel)} settings + { All settings -
+
diff --git a/frontend/src/lib/api.mock.ts b/frontend/src/lib/api.mock.ts index b35349f5c8f62..0dacdcfa74554 100644 --- a/frontend/src/lib/api.mock.ts +++ b/frontend/src/lib/api.mock.ts @@ -98,6 +98,7 @@ export const MOCK_DEFAULT_PROJECT: ProjectType = { name: 'MockHog App + Marketing', organization_id: MOCK_ORGANIZATION_ID, created_at: '2020-06-30T09:53:35.932534Z', + product_description: null, } export const MOCK_DEFAULT_ORGANIZATION: OrganizationType = { diff --git a/frontend/src/scenes/max/Intro.tsx b/frontend/src/scenes/max/Intro.tsx index c714495b72f86..7e9ea55204954 100644 --- a/frontend/src/scenes/max/Intro.tsx +++ b/frontend/src/scenes/max/Intro.tsx @@ -42,9 +42,9 @@ export function Intro(): JSX.Element {

{headline}

- +
I'm Max, here to help you build a succesful product. Ask me about your product and your users. - +
) diff --git a/frontend/src/scenes/max/Max.stories.tsx b/frontend/src/scenes/max/Max.stories.tsx index 88ffe32ea7559..73f1ce19a4117 100644 --- a/frontend/src/scenes/max/Max.stories.tsx +++ b/frontend/src/scenes/max/Max.stories.tsx @@ -1,6 +1,8 @@ import { Meta, StoryFn } from '@storybook/react' import { BindLogic, useActions, useValues } from 'kea' +import { MOCK_DEFAULT_PROJECT } from 'lib/api.mock' import { useEffect } from 'react' +import { projectLogic } from 'scenes/projectLogic' import { mswDecorator, useStorybookMocks } from '~/mocks/browser' @@ -25,10 +27,13 @@ const meta: Meta = { } export default meta -const Template = ({ sessionId }: { sessionId: string }): JSX.Element => { +// The session ID is hard-coded here, as it's used for randomizing the welcome headline +const SESSION_ID = 'b1b4b3b4-1b3b-4b3b-1b3b4b3b4b3b' + +const Template = ({ sessionId: SESSION_ID }: { sessionId: string }): JSX.Element => { return (
- +
@@ -38,7 +43,7 @@ const Template = ({ sessionId }: { sessionId: string }): JSX.Element => { export const Welcome: StoryFn = () => { useStorybookMocks({ post: { - '/api/projects/:team_id/query/': () => [ + '/api/environments/:team_id/query/': () => [ 200, { questions: [ @@ -52,19 +57,33 @@ export const Welcome: StoryFn = () => { }, }) - const sessionId = 'd210b263-8521-4c5b-b3c4-8e0348df574b' - return