Skip to content

Remove biome#42

Merged
nekowasabi merged 2 commits intomainfrom
remove-biome
Mar 25, 2025
Merged

Remove biome#42
nekowasabi merged 2 commits intomainfrom
remove-biome

Conversation

@tsukimizake
Copy link
Copy Markdown
Collaborator

@tsukimizake tsukimizake commented Mar 25, 2025

  • https://misskey.io/notes/a5re92yn2hnw0auv
  • 何かbiomeがdenoのformatterとコンフリクトを起こしている(?)ようで、denoにもformatterだけでなくlinterもあるようなのでbiomeをやめます
  • それ以外の差分はformatterの差異によるものです
  • ついでに残っていたdev_plan.mdを消します
    • 普通に rm dev_plan.md するのでなく git rm dev_plan.md とするとgit上からも消えます

Summary by CodeRabbit

  • Chore
    • Removed an internal configuration file to streamline project settings.
  • Style
    • Reformatted and restructured code for improved clarity and consistency, with no changes to the app’s functionality.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Mar 25, 2025

Walkthrough

This pull request deletes the biome.jsonc configuration file—which previously defined settings for version control, formatting, linting, and related file handling—and reformats several function declarations in denops/aider/bufferOperation.ts. The code changes focus solely on styling and readability improvements, with no alterations to the underlying logic.

Changes

File(s) Change Summary
biome.jsonc Deleted configuration file that managed VCS, file handling, formatting, linting, and JavaScript-specific formatting settings.
denops/aider/bufferOperation.ts Reformatted function signatures, return statements, and variable assignments to improve clarity without modifying functionality.

Possibly related PRs

  • voice command #25: Involved modifying the biome.jsonc configuration, making it directly relevant to the deletion in this PR.
  • lint by biome #22: Introduced a new biome.jsonc file with different settings, directly relating to the removal in this PR.

Poem

Oh dear coder, here I hop,
Through lines of code, I never stop.
I bid farewell to settings old,
New clear formats now unfold.
With every change, my heart does leap—
A rabbit's cheer for code so neat!
🐇💻

✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ 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 generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai plan to trigger planning for file edits and PR creation.
  • @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.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
denops/aider/bufferOperation.ts (1)

113-125: Review Console Logging in prepareAiderBuffer
The updated formatting in prepareAiderBuffer enhances readability. However, note the console.log("Run Command again."); on line 122—if this is only for debugging purposes, consider removing it or replacing it with a proper logging mechanism before merging to production.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 09306f3 and 13b033c.

📒 Files selected for processing (2)
  • biome.jsonc (0 hunks)
  • denops/aider/bufferOperation.ts (26 hunks)
💤 Files with no reviewable changes (1)
  • biome.jsonc
🧰 Additional context used
🧠 Learnings (1)
denops/aider/bufferOperation.ts (2)
Learnt from: tsukimizake
PR: nekowasabi/aider.vim#33
File: denops/aider/main.ts:104-104
Timestamp: 2025-03-24T12:45:11.545Z
Learning: In `denops/aider/main.ts`, when calling `buffer.sendPrompt`, it's permissible to omit the `opts` parameter since it has a default value.
Learnt from: tsukimizake
PR: nekowasabi/aider.vim#23
File: denops/aider/actualAiderCommand.ts:76-79
Timestamp: 2025-03-24T12:45:11.546Z
Learning: `denops/aider/actualAiderCommand.ts` の `sendPrompt` 関数で直接 `chansend` を使用すると、入力が分割されてしまう可能性がある。
🧬 Code Definitions (1)
denops/aider/bufferOperation.ts (2)
denops/aider/utils.ts (2)
  • getPromptFromVimVariable (12-15)
  • getCurrentFilePath (22-25)
denops/aider/aiderCommand.ts (1)
  • aider (68-70)
🔇 Additional comments (25)
denops/aider/bufferOperation.ts (25)

6-10: Formatting Improvement in Imports
The new formatting for the imports from "https://deno.land/x/unknownutil@v3.18.1/mod.ts" is clean and consistent. Grouping ensure, is, and maybe improves readability without impacting functionality.


27-30: Clarify Default Buffer Layout in getOpenBufferType
The use of the maybe function along with a default of "floating" is clear and well formatted. Ensure that the global variable "aider_buffer_open_type" always contains one of the valid values defined in bufferLayouts.


46-49: Consistent Use of ensure in exitAiderBuffer
The added use of ensure while retrieving the jobId using fn.getbufvar guarantees type safety, improving error handling. This change is both safe and clear.


67-70: Enhanced Readability in openAiderBuffer Signature
Breaking the function signature into multiple lines improves clarity. This change does not affect functionality but makes the code easier to read.


74-77: Clean Formatting for Buffer Creation in openAiderBuffer
The reformatting of the buffer creation block using n.nvim_create_buf (lines 74–77) is well done. The use of ensure and is.Number confirms type safety and improves overall clarity.


135-139: Clear Parameter Defaulting in sendPrompt
The default parameter opts = { openBuf: true } is clearly documented by the multi-line formatting, aligning with our best practices. Verify that this default aligns with how the function is used elsewhere in the codebase.


162-169: Formatting Update in sendPromptByBuffer
The reformatting of the call to denops.call("getbufline", "%", 1, "$") and the subsequent use of ensure maintains clarity in the transformation of buffer lines into a single string.


191-194: Improved Readability for Buffer Content Extraction
The multi-line formatting for retrieving words via denops.call("getline", start, end) makes the intent clear. This refactoring improves the readability without altering the logic.


203-206: Consistent Formatting for Backup Prompt Retrieval
The revised formatting for obtaining backupPrompt enhances clarity. Splitting the function call across multiple lines makes the operation more transparent.


221-230: Key Mapping Formatting for Hiding Floating Window
The updated block that sets the keymap for the "q" key (lines 221–230) is neatly formatted. Verify that the command <cmd>AiderHideVisualSelectFloatingWindow<CR> works as expected in your environment.


231-240: Key Mapping Update for Sending Prompt
The reformatting for setting the keymap for the <cr> key (lines 231–240) is clear and concise. This change improves readability and maintainability of key mapping definitions.


253-261: Refined Formatting in handleBackupPrompt
The restructured formatting in handleBackupPrompt (lines 253–261) streamlines the code while keeping the functionality intact. The changes ensure that type safety via ensure is consistently applied.


273-277: Consistent Function Signature in handleNoBackupPrompt
The updated function signature in handleNoBackupPrompt (lines 273–277) is well formatted, making the function’s parameters more legible.


278-281: Formatting for Filetype Retrieval in handleNoBackupPrompt
The extraction of the filetype using fn.getbufvar (lines 278–281) is neatly structured. This clarity helps in maintaining consistency across similar functions.


289-292: Improved Formatting for Additional Prompt Retrieval
The multi-line style for fetching additionalPrompt (lines 289–292) enhances code readability by clearly delineating the parameters passed to getPromptFromVimVariable.


303-309: Formatting Update in hideVisualSelectFloatingWindow
The changes in hideVisualSelectFloatingWindow (lines 303–309) offer an improved layout for retrieving and setting buffer content. The code is more straightforward while retaining its original behavior.


321-324: Small Formatting Adjustments in checkIfTerminalBuffer
The slight reformatting of checkIfTerminalBuffer (lines 321–324) makes the function declaration more readable without altering its logic.


346-359: Enhanced Readability for Terminal Dimensions in openFloatingWindow
The breakdown to compute terminal_width, terminal_height, and the floating window dimensions (lines 346–359) is much clearer now. The use of maybe with default values for floatWinHeight and floatWinWidth makes the logic explicit.


375-378: Consistent Formatting in sendPromptFromFloatingWindow
The minor formatting updates in sendPromptFromFloatingWindow (lines 375–378) contribute to a coherent coding style. The function remains functionally equivalent and clear.


412-415: Clear Retrieval of Total Windows in sendPromptFromSplitWindow
The refactored code that retrieves totalWindows (lines 412–415) using ensure clearly conveys the expectation of a numeric value. This change aligns well with the overall emphasis on type safety.


456-459: Proper Use of ensure in getAiderBuffer for jobId
The updated block in getAiderBuffer (lines 456–459) for extracting the jobId maintains type safety and clarity. This refactoring minimizes runtime errors and is a positive update.


549-552: Improved Full Path Extraction in getFileBuffers
The reformatting of fn.fnamemodify (lines 549–552) ensures that the full path is obtained clearly. Consider verifying edge cases where the result might be an empty string.


575-583: Formatting Improvements in getPartialContextFilePath Context Retrieval
The retrieval of context lines using denops.call("getline", start, end) (lines 575–583) is clearer now. The use of ensure maintains type safety and improves overall readability.


586-590: Clear Annotation Construction in getPartialContextFilePath
The multi-line construction of the annotation (lines 586–590) enhances readability and makes it easier to verify that file metadata is correctly embedded in the temporary file.


602-605: Consistent Filetype Retrieval in getPartialContextFilePath
The formatting for retrieving the file type (lines 602–605) is consistent with other parts of the code. This change helps ensure that the right filetype is set for the temporary file.

Copy link
Copy Markdown
Owner

@nekowasabi nekowasabi left a comment

Choose a reason for hiding this comment

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

( ;´ワ `;)つApprove

@nekowasabi nekowasabi merged commit 3c43512 into main Mar 25, 2025
2 checks passed
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