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

Client App [Tauri Updater] [On Progress] #2966

Closed
wants to merge 7 commits into from

Conversation

H0llyW00dzZ
Copy link
Contributor

@H0llyW00dzZ H0llyW00dzZ commented Oct 8, 2023

This A wild for client app update instead of click update manually in setting

Screenshot_244
Screenshot_245

Commits Log :

[+] feat(global.d.ts): add updater interface to the Window interface
[+] feat(cn.ts): add success and failed translations for update
[+] feat(en.ts): add success and failed translations for update
[+] feat(id.ts): add success and failed translations for update
[+] feat(update.ts): add logic to check and install updates, and show toast messages for success and failure
[+] fix(tauri.conf.json): enable dialog for Tauri updater

Note : Dialog Update Tauri doesn't support using local language so default its english

Summary by CodeRabbit

Release Notes

  • New Features

    • Introduced a restart command in the chat interface, allowing users to relaunch the application.
    • Enhanced update checking process with direct installation options within the app.
  • Bug Fixes

    • Improved handling of user input and prompt hints in the chat component.
  • Localization

    • Added new strings for the restart command and update notifications in English, Chinese, and Indonesian locales.
  • User Interface Enhancements

    • Update notifications now feature interactive elements for better user engagement during updates.

[+] feat(global.d.ts): add updater interface to the Window interface
[+] feat(cn.ts): add success and failed translations for update
[+] feat(en.ts): add success and failed translations for update
[+] feat(id.ts): add success and failed translations for update
[+] feat(update.ts): add logic to check and install updates, and show toast messages for success and failure
[+] fix(tauri.conf.json): enable dialog for Tauri updater
[+] feat(global.d.ts): add support for opening dialog, displaying message, and asking for confirmation
[+] chore(global.d.ts): add http module to global declaration file
@H0llyW00dzZ
Copy link
Contributor Author

A preview :

Untitled.video.-.Made.with.Clipchamp.7.mp4

btw this must be runtime edge for runtime nodejs must fix this later

Error: Page "/api/cors/[...path]" is missing "generateStaticParams()" so it cannot be used with "output: export" config.

This Chroe Commits faf9cd7.
[+] chore(global.d.ts): add missing semicolon in the declaration of `getClient` function
[+] feat(settings.tsx): add support for checking and installing updates using Tauri updater
[+] fix(update.ts): remove showToast call after installing update
[+] fix(settings.tsx): refactor update logic into a separate function and download icon and text for update button
[+] feat(settings.tsx): add error handling for update check and display toast message
@H0llyW00dzZ H0llyW00dzZ changed the title Client App [Tauri Updater] Client App [Tauri Updater] [On Progress] Oct 9, 2023
Note : This Runtime `Edge`

[+] feat(command.ts): add support for restart command in chat commands
[+] fix(command.ts): remove restart command from chat commands if not running in app environment
[+] feat(chat.tsx): add restart command functionality to restart the client
[+] feat(global.d.ts): add relaunch method to process object in window interface
[+] feat(locales): add translations for restart command in English, Chinese, and Indonesian
@lloydzhou lloydzhou self-requested a review October 10, 2024 23:20
@lloydzhou lloydzhou self-assigned this Oct 10, 2024
@lloydzhou lloydzhou added help wanted Extra attention is needed planned planned feature, will support in the future labels Oct 10, 2024
Copy link

coderabbitai bot commented Oct 10, 2024

Caution

Review failed

The pull request is closed.

Walkthrough

The pull request introduces several enhancements across multiple files, primarily focusing on command handling, user interface improvements, and update management within the application. Key changes include the addition of a restart command, modifications to chat input handling, and updates to the settings component for better update checking and installation. Additionally, new methods are added to the Window interface to support these functionalities, along with localization updates for multiple languages.

Changes

File Change Summary
app/command.ts Added getClientConfig import; updated ChatCommands interface to include restart; modified useChatCommand to conditionally manage restart based on isApp.
app/components/chat.tsx Added restart command to chatCommands; updated onInput for better command handling; modified doSubmit to clear input after command execution; enhanced scrolling logic.
app/components/settings.tsx Updated checkUpdate function to include asynchronous update checking and installation; modified UI to conditionally render update notifications.
app/global.d.ts Added new methods to Window interface for dialogs, process management, and HTTP requests, including open, message, ask, relaunch, and updater methods.
app/locales/cn.ts Added restart command and new update messages for success and failure in Chinese localization.
app/locales/en.ts Added restart command and new update messages for success and failure in English localization.
app/locales/id.ts Added restart command and new update messages for success and failure in Indonesian localization.
app/store/update.ts Updated getLatestVersion method to include update checking and installation; added error handling and toast notifications for update failures.
src-tauri/tauri.conf.json Updated updater section to enable dialog display during the update process.

Possibly related PRs

Suggested labels

enhancement

Suggested reviewers

  • Dogtiti

Poem

In the chat where bunnies play,
A restart command came to stay.
With updates checked and messages bright,
Our app now hops with pure delight!
So let’s relaunch and cheer with glee,
For every change brings joy, you see! 🐇✨


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@lloydzhou
Copy link
Collaborator

project is archived, will fork and move to new pull request.

@lloydzhou lloydzhou closed this Oct 10, 2024
lloydzhou added a commit to ConnectAI-E/ChatGPT-Next-Web that referenced this pull request Oct 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed planned planned feature, will support in the future
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants