Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>AIpromptNew to Visual Studio Code? Get it now.
AIprompt

AIprompt

chendm

|
5 installs
| (0) | Free
一个AI提示词工具
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

使用前问题

当我只需要咨询 AI 某个函数的问题时,还是需要将整个文件提供给 AI,这会浪费大量的 Token, 如果是第三方 API,可能一个文件太大了,单次上下文直接溢出了。

作用

此扩展为了剔除与问题无关的代码, 当你光标停留在某个函数时,ctrl+shift+p调用命令extract: 提取函数及其依赖项到剪贴板 此扩展会递归调用与此函数相关的代码,并以markdown的语法输出,以便 AI 使用。

当然了也可以将结果导出在新文件上: extract: 导出函数及其依赖项到MD文件

支持的语言

  • TypeScript

Pre-Usage Issues

When I only need to consult AI about a specific function, I still have to provide the entire file to the AI, which wastes a significant amount of tokens. For third-party APIs, large files might exceed the single context window limit and cause overflow.

Purpose

This extension aims to filter out code irrelevant to the problem. When your cursor hovers over a function, press ctrl+shift+p to execute the command extract: Copy function and its dependencies to clipboard. The extension will recursively identify code related to this function and output it in Markdown syntax for AI consumption.

Supported Languages

  • TypeScript
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft