专栏名称: 前端早读课
我们关注前端,产品体验设计,更关注前端同行的成长。 每天清晨五点早读,四万+同行相伴成长。
目录
相关文章推荐
脚本之家  ·  大厂都在用的 12 大主流 AI ... ·  12 小时前  
脚本之家  ·  大厂都在用的 12 大主流 AI ... ·  12 小时前  
前端大全  ·  突发!美国对中国断供 EDA。网友:真卡脖子 ·  4 天前  
前端大全  ·  蔚来面试题:计算白屏时间 ·  4 天前  
51好读  ›  专栏  ›  前端早读课

【第3517期】stagewise:让AI与代码编辑器无缝连接

前端早读课  · 公众号  · 前端  · 2025-05-27 08:00

正文

请到「今天看啥」查看全文


;

const stagewiseConfig = {
plugins : [
{
name : 'example-plugin' ,
description : 'Adds additional context for your components' ,
shortInfoForPrompt : ( ) => {
return "Context information about the selected element" ;
} ,
mcp : null ,
actions : [
{
name : 'Example Action' ,
description : 'Demonstrates a custom action' ,
execute : ( ) => {
window . alert ( 'This is a custom action!' ) ;
} ,
} ,
] ,
} ,
] ,
} ;

function setupStagewise ( ) {
if ( process . env . NODE_ENV === 'development' ) {
initToolbar ( stagewiseConfig ) ;
}
}

setupStagewise ( ) ;

📦 支持主流前端框架

stagewise 提供了针对主流前端框架的专用组件,方便快速集成:

React.js
// src/main.tsx
import { StrictMode from 'react';
import { createRoot from 'react-dom/client';
import App from './App.tsx';
import { StagewiseToolbar from'@stagewise/toolbar-react';
import './index.css';

createRoot(document.getElementById






请到「今天看啥」查看全文