npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

hxm-ai-analyzer-panel

v0.0.3

Published

Real-time customizable AI code analysis

Readme

🤖 AI Code Analyzer Panel

为你的代码提供实时 AI 分析的 VS Code 扩展

Version Downloads Rating License GitHub stars

English | 简体中文


预览

📖 简介

AI Code Analyzer Panel 是一个强大的 VS Code 扩展,通过可自定义的多维度分析视图,为你的代码提供实时 AI 分析。帮助你更好地理解代码结构、发现潜在问题并获得优化建议。

实习过的肯定都知道,自己一个人看组内项目都很复杂很难懂,文件很多每次看一个文件都问一次 ai 不现实,这个插件正是解决这个问题,在看大型复杂项目快速浏览多个文件时,主动提高效率。

✨ 核心特性

🚀 智能分析

  • 自动启动: IDE 启动时自动打开分析面板
  • 实时同步: 切换文件时自动跟随更新
  • 流式输出: 实时显示 AI 分析结果

🎯 高度可配置

  • 多维度分析: 自定义分析维度(概览、实现、优化等)
  • 灵活配置: 支持自定义 API、模型和提示词
  • 智能缓存: 分析结果持久化存储

功能展示

主要功能

  • 🔄 实时同步: 切换文件时,分析面板自动跟随更新
  • 💾 智能缓存: 分析结果持久化存储,重启 IDE 后无需重新分析
  • 📝 多维度分析: 支持自定义多个分析维度(概览、实现细节、优化建议等)
  • 🎯 右键快捷: 文件树中右键即可启动 AI 分析
  • 流式输出: 实时显示 AI 分析结果,无需等待
  • 🔧 高度可配置: 支持自定义 API、模型和分析提示词

快速开始

安装

  1. 打开 VS Code
  2. Ctrl+Shift+X 打开扩展面板
  3. 搜索 AI Code Analyzer Panel
  4. 点击 安装

⚙️ 配置指南

必需配置

在使用前,需要配置 AI 服务相关参数。打开 VS Code 设置(Ctrl+,),搜索 AI Code Analyzer

1. API Key (aiAnalyze.apiKey)

你的 OpenAI API Key 或兼容服务的 API Key

"aiAnalyze.apiKey": "sk-xxx..."

2. API Endpoint (aiAnalyze.apiEndpoint)

API 服务地址,默认为 OpenAI,也可使用其他兼容服务

"aiAnalyze.apiEndpoint": "https://api.openai.com/v1/chat/completions"

3. Model (aiAnalyze.model)

使用的 AI 模型

"aiAnalyze.model": "gpt-4o-mini"

设置界面

💡 推荐配置:使用硅基流动(免费)

硅基流动 提供免费的 API Key,可直接使用以下配置:

{
  "aiAnalyze.model": "moonshotai/Kimi-K2-Instruct",
  "aiAnalyze.apiEndpoint": "https://api.siliconflow.cn/v1/chat/completions",
  "aiAnalyze.apiKey": "你的apiKey"
}

自定义分析维度

扩展默认提供三个分析维度,你可以在设置中自定义 aiAnalyze.tabs

{
  "aiAnalyze.tabs": [
    {
      "key": "summary",
      "title": "内容概览",
      "prompt": "分析这个文件的整体功能..."
    },
    {
      "key": "implementation",
      "title": "核心实现",
      "prompt": "详细说明这个文件的实现细节..."
    },
    {
      "key": "optimization",
      "title": "优化建议",
      "prompt": "提供代码优化建议..."
    }
  ]
}

数组的每一项分别对应一个 tab:

Tabs

提示词变量

在自定义提示词时,可以使用以下变量:

  • ${fileName}: 当前文件名
  • ${codeContent}: 当前文件完整代码

推荐 prompt

待添加

📚 使用教程

方式一:右键菜单

  1. 在文件资源管理器中找到要分析的文件
  2. 右键点击文件
  3. 选择 "启动 AI 分析视图"
  4. 分析面板打开并开始分析该文件

方式二:命令面板

  1. Ctrl+Shift+P(Mac: Cmd+Shift+P)打开命令面板
  2. 输入 启动AI分析视图
  3. 回车执行

如果这个项目对你有帮助,请给它一个 ⭐️!

Made with ❤️ by huanxiaomang