Skip to content

Conversation

J1za
Copy link
Contributor

@J1za J1za commented May 19, 2025

Description

Copy should copy local state (zustand) - don't fetch all
Download should download all -txt - wait for endpoint, 1 request: all logs

Linear Ticket

https://linear.app/autokitteh/issue/UI-1536/session-outputs

What type of PR is this? (check all applicable)

  • 💡 (feat) - A new feature (non-breaking change which adds functionality)
  • 🔄 (refactor) - Code Refactoring - A code change that neither fixes a bug nor adds a feature
  • 🐞 (fix) - Bug Fix (non-breaking change which fixes an issue)
  • 🏎 (perf) - Optimization
  • 📄 (docs) - Documentation - Documentation only changes
  • 📄 (test) - Tests - Adding missing tests or correcting existing tests
  • 🎨 (style) - Styles - Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
  • ⚙️ (ci) - Continuous Integrations - Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)
  • ☑️ (chore) - Chores - Other changes that don't modify src or test files
  • ↩️ (revert) - Reverts - Reverts a previous commit(s).

@RonenMars
Copy link
Contributor

Please keep the rate limit in mind. Currently, clicking "Download" triggers multiple requests with pageSize: 50, which could potentially hit the rate limit if there are many session logs.

That said, @mario99logic is expected to complete the new endpoint in the next few days, which will allow us to fetch all session logs in a single request (without using nextPageToken). Once that's available, rate limiting will no longer be a concern, so it might be worth waiting a few days before proceeding.

@RonenMars
Copy link
Contributor

The "fetch all session logs" endpoint is ready: autokitteh/autokitteh@8364e3f

Let's bring this across the finish line!

@J1za
Copy link
Contributor Author

J1za commented May 26, 2025

The "fetch all session logs" endpoint is ready: autokitteh/autokitteh@8364e3f

Let's bring this across the finish line!

added

const url = URL.createObjectURL(blob);
const link = document.createElement("a");
link.href = url;
link.download = `session-${sessionId}-logs.txt`;
Copy link
Contributor

@RonenMars RonenMars May 28, 2025

Choose a reason for hiding this comment

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

Can you change the format of the name of the file to: <YY-MM-DD_HH-mm>_<sessionID>.log

Example: 25-05-28_14-37_ses_01jwbdv9mzffkb2dgv0j9r0mc6.log

Copy link
Contributor Author

Choose a reason for hiding this comment

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

changed

@J1za J1za force-pushed the vitaly/refactor/improve-copy-and-download-output-session branch from 6e339a6 to 75e3517 Compare May 28, 2025 14:58
@RonenMars RonenMars enabled auto-merge (squash) June 3, 2025 10:21
@RonenMars RonenMars force-pushed the vitaly/refactor/improve-copy-and-download-output-session branch from addd100 to cc117ea Compare June 3, 2025 10:23
@RonenMars RonenMars merged commit df0354f into main Jun 3, 2025
11 checks passed
@RonenMars RonenMars deleted the vitaly/refactor/improve-copy-and-download-output-session branch June 3, 2025 10:30
Copy link

github-actions bot commented Jun 3, 2025

🎉 This PR is included in version 2.198.2 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

2 participants