Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Support Sidebar - Max #27091

Open
wants to merge 43 commits into
base: master
Choose a base branch
from
Open

Conversation

slshults
Copy link
Contributor

@slshults slshults commented Dec 20, 2024

Problem

Support AI Chat for the support sidebar. Help users help themselves, reduce support ticket volume.

CleanShot 2024-12-19 at 18 27 46@2x
CleanShot 2024-12-19 at 18 28 13@2x

CleanShot 2024-12-19 at 18 31 12@2x
CleanShot 2024-12-19 at 18 31 32@2x

Does this work well for both Cloud and self-hosted?

Cloud only

How did you test this code?

Lots of chatting with Max, in two browsers concurrently.

Feature flag in place for a bit more internal testing before we give access to a small set of customers initially.

Edit: Once this review is done, I'll be submitting another PR for this more recent commit

slshults and others added 30 commits December 10, 2024 19:07
…so added 1 line to URL validation in the system prompt.
flashy/blinky behavior seen while typing
after Max had included a codeblock in a response.
a collapsible, "Explore the docs", because
less scrolling is more betterer.
… this commit. Will be pairing with others to revive him.
…n be run on the local with this commit, but can't run Max yet, need to know how to handle secrets correctly.
…ation management, improved token and cache tracking.
…o anthropic API doesn't work in this commit, pushing it to pair with Michael on it.
ee/support_sidebar_max/views.py Dismissed Show dismissed Hide dismissed
ee/support_sidebar_max/views.py Dismissed Show dismissed Hide dismissed
ee/support_sidebar_max/views.py Dismissed Show dismissed Hide dismissed
@slshults slshults changed the title Support sidebar max integration Feature: Support Sidebar - Max Dec 20, 2024
@slshults slshults changed the title Feature: Support Sidebar - Max feat: Support Sidebar - Max Dec 20, 2024
@slshults slshults force-pushed the support-sidebar-max-integration branch from c7a4f5e to 1983eb8 Compare December 20, 2024 03:06
Comment on lines +24 to +25
/** If true, docs links will not be opened in the docs panel */
disableDocsPanel?: boolean
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't disableClientSideRouting achieve the same?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is part of an exception to allow links generated by Max to open in a new tab, since there's code to force links from the Docs panel to ignore target="_blank. This is part of the exception carved out for links that Max includes in his answers so they'll open in a new tab (currently we'd lose the chat session if the links opened in the sidepanel instead of a new tab.)

The key difference:

  • disableDocsPanel is specific to documentation links and controls whether they open in the side panel
  • disableClientSideRouting is a broader setting that affects all navigation, determining whether links should trigger a full page load or use client-side routing

Comment on lines +71 to +77

# Max-specific entries
ee/support_sidebar_max/max-venv/
ee/support_sidebar_max/.vscode
ee/support_sidebar_max/.vscode/settings.json
max-test-venv/
ee/support_sidebar_max/.env
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think any of these additions should be needed after we've moved this Max out of Flask and into Django – let's remove

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some functions were moved, but the main python script is still in use and still in ee/support_sidebar_max (sidebar_max_AI.py), so I still don't want to be pushing those items from my local. (I can and will remove max-test-venv though, done with that.)

package.json Outdated
@@ -66,6 +66,7 @@
"mypy-baseline-sync": "mypy -p posthog | mypy-baseline sync"
},
"dependencies": {
"@anthropic-ai/sdk": "^0.33.1",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually it seems we don't use this anywhere, so let's remove. This means package.json and pnpm-lock.yaml should have no changes in this PR

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, thanks! The Node.js/JavaScript version of the SDK, while in our Python code we're using the Python SDK. Shall remove.

Copy link
Contributor

github-actions bot commented Dec 20, 2024

Size Change: +68 B (+0.01%)

Total Size: 1.11 MB

ℹ️ View Unchanged
Filename Size Change
frontend/dist/toolbar.js 1.11 MB +68 B (+0.01%)

compressed-size-action

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants