-
-
Notifications
You must be signed in to change notification settings - Fork 107
feat: update dependencies #255
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #255 +/- ##
=======================================
Coverage 50.69% 50.69%
=======================================
Files 24 24
Lines 361 361
Branches 53 53
=======================================
Hits 183 183
+ Misses 174 171 -3
- Partials 4 7 +3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…rades (#256) Dependency upgrades introduced breaking API changes: async-openai 0.32.2 moved chat completion types to a gated submodule, and base64 0.22.1 deprecated the `decode()` function. ## Changes **async-openai API migration:** - Enable `chat-completion` feature flag to access Chat Completion API - Update imports from `async_openai::types::*` to `async_openai::types::chat::*` **base64 API migration:** - Replace deprecated `base64::decode()` with `general_purpose::STANDARD.decode()` - Update imports to include Engine trait **Dependency resolution:** - Resolve bytes version conflict (1.10.1 → 1.11.0) between aws-config and async-openai ```rust // Before use async_openai::types::{CreateChatCompletionRequestArgs, ...}; base64::decode(s) // After use async_openai::types::chat::{CreateChatCompletionRequestArgs, ...}; use base64::{Engine as _, engine::general_purpose}; general_purpose::STANDARD.decode(s) ``` <!-- START COPILOT CODING AGENT SUFFIX --> <!-- START COPILOT ORIGINAL PROMPT --> <details> <summary>Original prompt</summary> fix issues due to dependencies upgrade: Compiling aws-config v1.8.12 error[E0432]: unresolved imports `async_openai::types::ChatCompletionRequestAssistantMessageArgs`, `async_openai::types::ChatCompletionRequestMessage`, `async_openai::types::ChatCompletionRequestUserMessageArgs`, `async_openai::types::CreateChatCompletionRequestArgs` --> src/openai_client.rs:2:5 | 2 | ChatCompletionRequestAssistantMessageArgs, ChatCompletionRequestMessage, | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `ChatCompletionRequestMessage` in `types` | | | no `ChatCompletionRequestAssistantMessageArgs` in `types` 3 | ChatCompletionRequestUserMessageArgs, CreateChatCompletionRequestArgs, | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `CreateChatCompletionRequestArgs` in `types` | | | no `ChatCompletionRequestUserMessageArgs` in `types` error[E0432]: unresolved imports `async_openai::config`, `async_openai::Client` --> src/openai_client.rs:5:20 | 5 | use async_openai::{config::OpenAIConfig, Client}; | ^^^^^^ ^^^^^^ no `Client` in the root | | | could not find `config` in `async_openai` | note: found an item that was configured out --> /Users/blank/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/async-openai-0.32.2/src/lib.rs:258:9 | 257 | #[cfg(feature = "_api")] | ---------------- the item is gated behind the `_api` feature 258 | pub mod config; | ^^^^^^ = help: consider importing one of these structs instead: aws_config::imds::Client aws_sdk_dynamodb::Client reqwest::Client note: found an item that was configured out --> /Users/blank/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/async-openai-0.32.2/src/lib.rs:326:17 | 325 | #[cfg(feature = "_api")] | ---------------- the item is gated behind the `_api` feature 326 | pub use client::Client; | ^^^^^^ warning: use of deprecated function `base64::decode`: Use Engine::decode --> src/dynamo/create_item.rs:30:37 | 30 | ... base64::decode(s).unwrap_or_default(), | ^^^^^^ | = note: `#[warn(deprecated)]` on by default warning: use of deprecated function `base64::decode`: Use Engine::decode --> src/dynamo/create_item.rs:55:53 | 55 | ... base64::decode(s).unwrap_or_default(), | ^^^^^^ error[E0282]: type annotations needed --> src/openai_client.rs:122:25 | 122 | Some(client) => client.clone(), | ^^^^^^ cannot infer type error[E0282]: type annotations needed --> src/openai_client.rs:139:27 | 139 | .map_err(|e| e.to_string())? | ^ - type must be known at this point | help: consider giving this closure parameter an explicit type | 139 | .map_err(|e: /* Type */| e.to_string())? | ++++++++++++ error[E0282]: type annotations needed --> src/openai_client.rs:144:27 | 144 | .map_err(|e| e.to_string())? | ^ - type must be known at this point | help: consider giving this closure parameter an explicit type | 144 | .map_err(|e: /* Type */| e.to_string())? | ++++++++++++ error[E0282]: type annotations needed --> src/openai_client.rs:155:23 | 155 | .map_err(|e| e.to_string())? | ^ - type must be known at this point | help: consider giving this closure parameter an explicit type | 155 | .map_err(|e: /* Type */| e.to_string())? | ++++++++++++ error[E0282]: type annotations needed --> src/openai_client.rs:165:19 | 165 | .map_err(|e| e.to_string())?; | ^ - type must be known at this point | help: consider giving this closure parameter an explicit type | 165 | .map_err(|e: /* Type */| e.to_string())?; | ++++++++++++ error[E0282]: type annotations needed --> src/openai_client.rs:168:9 | 168 | let mut stream = match openai_client.chat().create_stream(request).await { | ^^^^^^^^^^ ... 184 | while let Some(result) = stream.next().await { | ------ type must be known at this point | help: consider giving `stream` an explicit type | 168 | let mut stream: /* Type */ = match openai_client.chat().create_stream(request).await { | ++++++++++++ error[E0282]: type annotations needed --> src/openai_client.rs:212:37 | 212 | let error_message = e.to_string(); | ^ cannot infer type Some errors have detailed ... </details> <!-- START COPILOT CODING AGENT TIPS --> --- 💬 We'd love your input! Share your thoughts on Copilot coding agent in our [2 minute survey](https://gh.io/copilot-coding-agent-survey). --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Blankll <28639911+Blankll@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request includes a set of dependency upgrades, workflow improvements, and minor code refactors across the project. The main focus is on updating Node.js and Rust dependencies, improving build stability, and cleaning up some code in both backend and frontend files.
Dependency and Environment Upgrades
node.ymlandrelease.ymlto ensure compatibility with the latest Node features and dependencies. [1] [2]package.jsonand Rust crates inCargo.toml, including major and minor version bumps for Tauri, Vue, Pinia, Jest, AWS SDK, async-openai, and more. This improves security, stability, and access to new features. [1] [2]Build and Workflow Enhancements
Code Quality and Auto-imports
.eslintrc-auto-import.jsonto improve auto-import accuracy and linting, reflecting the latest Vue ecosystem APIs. [1] [2] [3] [4]Backend Refactors
create_item.rsto use the new base64 decoding API for better reliability and future-proofing. [1] [2] [3]chatmodule path, keeping up with recent async-openai library changes.Frontend Minor Cleanups
dynamodb-connect-dialog.vuefor code clarity and to align with current Vue best practices. [1] [2] [3]