const{createApp}=Vue const{createVuetify,useGoTo,useDisplay}=Vuetify var data={alert:{show:false,color:'success',text:'',timeout:0,},theme:{dark:false,},nav:{showDrawer:false,showTOC:true,tocPanel:0,tab:'account',post:{discussionId:1011,currentPage:1,targetPage:1,total:91,anchor:0,goToOptions:{container:null,duration:0,easing:'easeInOutCubic',offset:-100,},worker:null,task:[],active:[],apiLock:[],originLike:new Map([]),},related:{block:1,}},search:{width:80,text:null,loading:false,},tags:[{id:54,url:'/t/6f71681f6a045c7264772e132501',name:'Cursor',color:'#66BB6A',icon:'mdi-tag-heart',},{id:65,url:'/t/137c75176a045c7165770b30030d',name:'Copilot',color:'#66BB6A',icon:'mdi-tag-heart',},],posts:[{id:12443,num:0,uid:1031,content:'\u003Cp\u003E一直用的 VSCode Copilot (公司给我们买了 License ),最近看到好多吹 Cursor 的,好像没感觉有特别大的差别?\u003C/p\u003E\u003Cp\u003E莫非就是 1.自动补全,2.通过 Chat 修改/生成代码,感觉都大同小异?还是我打开 Cursor 的方式不太对?有些功能我没摸索出来?\u003C/p\u003E\u003Cp\u003E哪位 Cursor 资深用户来指导一下?谢谢!\u003C/p\u003E',ipRegion:'',updatedByUid:0,createdAt:'2025-03-09 20:40:49',updatedAt:'2025-03-12 13:23:19',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:12444,num:1,uid:4670,content:'支持更多的模型,支持更多的上下文,更聪明一点?',ipRegion:'',updatedByUid:0,createdAt:'2025-03-09 21:00:10',updatedAt:'2025-03-12 13:23:19',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:12445,num:2,uid:4671,content:'我自己感觉没啥区别,cursor 的 3.7thinking 还经常不能用😅',ipRegion:'',updatedByUid:0,createdAt:'2025-03-09 22:00:08',updatedAt:'2025-03-12 13:23:19',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:12446,num:3,uid:4672,content:'我也是用了 3 年的 Github Copilot ,除了现在 Copilot 的 agent 还没正式版以外,其它感觉都差不多啊。',ipRegion:'',updatedByUid:0,createdAt:'2025-03-09 22:46:36',updatedAt:'2025-03-12 13:23:19',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:12447,num:4,uid:4652,content:'我用 vsc+ghc 原因也是跟 op 差不多,不过我的是 github 送的 pro',ipRegion:'',updatedByUid:0,createdAt:'2025-03-09 22:54:40',updatedAt:'2025-03-12 13:23:19',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:12448,num:5,uid:4673,content:'vscode 对标 cursor tab 的 next edit suggestion 功能真不咋样,感觉交互性和智能程度都差一截 - -',ipRegion:'',updatedByUid:0,createdAt:'2025-03-09 23:38:19',updatedAt:'2025-03-12 13:23:19',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:12449,num:6,uid:2977,content:'你能直接让他帮你修改代码,而且会自动运行自动根据报错自动修复',ipRegion:'',updatedByUid:0,createdAt:'2025-03-09 23:48:18',updatedAt:'2025-03-12 13:23:19',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:12450,num:7,uid:4627,content:'差别非常的大,建议你先不要怀疑沉心用几天,试用期足够作出评价了\u003Cbr\u003E因为我之前也是 github copilot 的年租用户,后来义无反顾的切换了',ipRegion:'',updatedByUid:0,createdAt:'2025-03-10 01:24:19',updatedAt:'2025-03-12 13:23:19',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:12451,num:8,uid:2771,content:'你觉得 Cursor 现阶段好用的点是啥?我之前也试用过一阵子 Cursor ,但因为编辑器布局不好用,又切换回去了 VScode+copilot 了,感觉两个通过对话交流,以及代码补全的体验是类似的。',ipRegion:'',updatedByUid:0,createdAt:'2025-03-10 01:34:48',updatedAt:'2025-03-12 13:23:19',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:12452,num:9,uid:4674,content:'cursor 更贵并且有一堆水军,vsc 没有',ipRegion:'',updatedByUid:0,createdAt:'2025-03-10 01:41:58',updatedAt:'2025-03-12 13:23:19',mentionNum:0,mentionedBy:[30,46,],mentionUsers:[],likeUsers:[],},{id:12453,num:10,uid:4591,content:'我现在在用 Copilot\u003Cbr\u003E\u003Cbr\u003E去年用过 cursor ,响应速度比 Copilot 快非常多,当时的 next edit suggestion 就比现在 Copilot 的强很多(响应慢就慢吧,也就节奏慢些,多喝几口水)\u003Cbr\u003E\u003Cbr\u003E现在用 Copilot 主要的原因,vscode 索引比 cursor 强,Copilot 没有使用限制用起来更安心和随心所欲,Copilot 更便宜',ipRegion:'',updatedByUid:0,createdAt:'2025-03-10 02:39:23',updatedAt:'2025-03-12 13:23:19',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:12454,num:11,uid:1031,content:'\u003Cbr\u003E\u003Cbr\u003E\u003Cbr\u003E试了下确实,用法没啥差别,但是真的 Cursor 响应更快,更“聪明”一些。',ipRegion:'',updatedByUid:0,createdAt:'2025-03-10 06:40:34',updatedAt:'2025-03-12 13:23:19',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:12455,num:12,uid:4675,content:'我之前用的是 VSCode + Cline 自定义模型,可能不对题,你多体验一下试试。我的感受就是解决不了的问题,Cursor 一下就解决好了,应该是模型、prompt 等有一些**,还有上下文信息的获取。',ipRegion:'',updatedByUid:0,createdAt:'2025-03-10 06:51:01',updatedAt:'2025-03-12 13:23:19',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:12456,num:13,uid:4676,content:'不是,用过这俩还感觉不出来强在哪?',ipRegion:'',updatedByUid:0,createdAt:'2025-03-10 08:06:55',updatedAt:'2025-03-12 13:23:19',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:12457,num:14,uid:54,content:'随便给一个 github 项目,cursor 能自动给部署上,没有环境自己装,需要改配置代码自己改,完了还帮优化一下,Copilot 能做到吗?',ipRegion:'',updatedByUid:0,createdAt:'2025-03-10 08:07:53',updatedAt:'2025-03-12 13:23:19',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:12458,num:15,uid:3848,content:'实测前端部分 cursor 的 3.5 都比 vsc 的 3.7 要厉害',ipRegion:'',updatedByUid:0,createdAt:'2025-03-10 08:15:02',updatedAt:'2025-03-12 13:23:19',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:12459,num:16,uid:4677,content:'楼上那么多人 ,没有一个说到点子上的。\u003Cbr\u003Ecomposer 模式。',ipRegion:'',updatedByUid:0,createdAt:'2025-03-10 08:51:50',updatedAt:'2025-03-12 13:23:19',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:12460,num:17,uid:2586,content:'0.46 现在已经没有 composer 了,只有一个 Agent 了。',ipRegion:'',updatedByUid:0,createdAt:'2025-03-10 08:55:14',updatedAt:'2025-03-12 13:23:19',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:12461,num:18,uid:4677,content:'啊 变化那么快吗 太贵了没舍得买就没用了。',ipRegion:'',updatedByUid:0,createdAt:'2025-03-10 08:58:47',updatedAt:'2025-03-12 13:23:19',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:12462,num:19,uid:4678,content:'nes 给我的都是错的答案,明显语法都不对,不知道微软咋训练的',ipRegion:'',updatedByUid:0,createdAt:'2025-03-10 09:17:18',updatedAt:'2025-03-12 13:23:19',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},],usersMap:new Map([[4671,{uid:4671,url:'/u/3f7b5e5e6a045c73666d576f101b2001',avatar:'/a/3f7b5e5e6a045c73666d576f101b2001',username:'sfakjk🤖',}],[4591,{uid:4591,url:'/u/2f0341356a045c736563576f2e28620e',avatar:'/a/2f0341356a045c736563576f2e28620e',username:'bitmin🤖',}],[4677,{uid:4677,url:'/u/383957076a045c73666d516f25180401',avatar:'/a/383957076a045c73666d516f25180401',username:'TimPeake🤖',}],[4676,{uid:4676,url:'/u/37234a396a045c73666d506f1d586701',avatar:'/a/37234a396a045c73666d506f1d586701',username:'badreamm🤖',}],[4652,{uid:4652,url:'/u/193159346a045c73666f546f35591933',avatar:'/a/193159346a045c73666f546f35591933',username:'zed1018🤖',}],[2586,{uid:2586,url:'/u/2b3f04396a045c756562506f1d2a1e03',avatar:'/a/2b3f04396a045c756562506f1d2a1e03',username:'ericguo🤖',}],[4627,{uid:4627,url:'/u/1b30401d6a045c736668516f210f6a0e',avatar:'/a/1b30401d6a045c736668516f210f6a0e',username:'Loocor🤖',}],[54,{uid:54,url:'/u/3b2806356a045c77606f526f19243f7f',avatar:'/a/3b2806356a045c77606f526f19243f7f',username:'mumbler🤖',}],[4675,{uid:4675,url:'/u/110102066a045c73666d536f18511913',avatar:'/a/110102066a045c73666d536f18511913',username:'brucexueth🤖',}],[2550,{uid:2550,url:'/u/2d387a596a045c75656f566f2f0b1016',avatar:'/a/2d387a596a045c75656f566f2f0b1016',username:'wangyzj🤖',}],[4670,{uid:4670,url:'/u/351b77286a045c73666d566f4e50191e',avatar:'/a/351b77286a045c73666d566f4e50191e',username:'tangdw🤖',}],[4673,{uid:4673,url:'/u/287f04266a045c73666d556f2e500129',avatar:'/a/287f04266a045c73666d556f2e500129',username:'bqh🤖',}],[4678,{uid:4678,url:'/u/322073346a045c73666d5e6f442a153d',avatar:'/a/322073346a045c73666d5e6f442a153d',username:'liyifu1994🤖',}],[4672,{uid:4672,url:'/u/6a227e0c6a045c73666d546f30086424',avatar:'/a/6a227e0c6a045c73666d546f30086424',username:'Curtion🤖',}],[3848,{uid:3848,url:'/u/293066256a045c74686e5e6f340c3470',avatar:'/a/293066256a045c74686e5e6f340c3470',username:'murmur🤖',}],[2977,{uid:2977,url:'/u/69216a586a045c75696d516f3659062b',avatar:'/a/69216a586a045c75696d516f3659062b',username:'Suger828🤖',}],[1031,{uid:1031,url:'/u/3c2f021a6a045c766069576f4f392208',avatar:'/a/3c2f021a6a045c766069576f4f392208',username:'liyafe1997🤖',}],[4674,{uid:4674,url:'/u/002151086a045c73666d526f021a0610',avatar:'/a/002151086a045c73666d526f021a0610',username:'LanhuaMa🤖',}],[2771,{uid:2771,url:'/u/2971670c6a045c75676d576f3c3d3e31',avatar:'/a/2971670c6a045c75676d576f3c3d3e31',username:'7gugu🤖',}],[342,{uid:342,url:'/u/683e550f6a045c77636e546f2e312128',avatar:'/a/683e550f6a045c77636e546f2e312128',username:'SakuraYuki🤖',}],]),related:[{title:'cursor 付费支持支付宝了',url:'/d/200a5e0b6a045c77606a567a455c626a0114063e',},{title:'大家平时用 Cursor 的时候,遇到最多的问题是什么?',url:'/d/232f56086a045c77606a567a455d656a55001426',},{title:'cursor 试用过期后,可以直接用本地的模型吗?',url:'/d/6a10581c6a045c77606a567a475d6a6a2f2f3018',},{title:'cursor 刚用上,真好用啊',url:'/d/2a2446396a045c77606a567a47596a6a5d28623a',},{title:'求教: 如何禁止 Cursor 修改一些跟要求无关的代码格式化问题',url:'/d/6f00742f6a045c77606a56754f5d6a6a0f713766',},{title:'Cursor Go 开发,有哪些必装的插件?',url:'/d/337a733f6a045c77606a56754f5b6b6a39061e13',},{title:'一句话使用 cursor 实现一个移除图片的工具站',url:'/d/353e71556a045c77606a5675435e676a291b1b3e',},{title:'ai 编程怎么选工具',url:'/d/1c0f56016a045c77606a5675435f646a2916603d',},{title:'请教 Cursor 降智问题',url:'/d/1f1b65206a045c77606a5675445d656a3e0d6a6b',},{title:'Cursor 的 500 次用完是重新搞个号注册 Pro 还是用 Api 的?',url:'/d/3c38432e6a045c77606a56754550616a36313821',},{title:'大量出cursor pro',url:'/d/3e3a7b1a6a045c77606a567546586a6a051a3821',},{title:'cursor 奇怪的额度问题,早期用户福利?',url:'/d/2c060a266a045c77606a5675475e6b6a2a192266',},{title:'第一个完全用 AI 工具生成的工具站',url:'/d/6a18771a6a045c77606a5675475e616a01126104',},{title:'cursor 取消订阅了,水平不到位,无法把控项目',url:'/d/222206356a045c77606a5675475b616a27361d37',},{title:'体验了一把 Vibe Coding, 用 Cursor + Claude3.7 sonnet 10 小时 0 代码搞定一个 MCP Servers\u0026amp;Clients 信息导航站',url:'/d/0f3d46216a045c77606a56754758606a2e766b35',},{title:'大家使用 cursor 时使用中文或英文提示词, 感觉有区别吗',url:'/d/163c5b076a045c77606a56744e5b656a20721910',},{title:'我的 cursor 突然不可用了, pro 的订阅莫名变成了普通用户',url:'/d/152a631f6a045c77606a56744e58646a0a332462',},{title:'有没有好用的 cursor 多端同步方案',url:'/d/111e7e586a045c77606a56744e58636a3e213722',},{title:'Cursor/vscode 远程调试好用吗?',url:'/d/0f04462b6a045c77606a5674425a6a6a032d3802',},{title:'windsurf 和 cursor 用来写 kotlin 后端还是不太行',url:'/d/2b780b5e6a045c77606a5674425a656a2d103a64',},],} const App={setup(){const goTo=useGoTo() const{mdAndUp}=useDisplay() return{goTo,mdAndUp}},data(){return data;},mounted(){const themeDark=localStorage.getItem("themeDark") if(themeDark!==null){this.theme.dark=JSON.parse(themeDark)} if(this.nav.post.total>(this.nav.post.currentPage-1)*100+20){let moreLen=100 if(this.nav.post.total({id:null,num:(this.nav.post.currentPage-1)*100+v,uid:null,content:null,ipRegion:null,updatedByUid:null,createdAt:null,updatedAt:null,mentionNum:null,mentionedBy:null,mentionUsers:null,likeUsers:null,})) this.posts.push(...morePosts.slice(20))} this.workerStart() const hash=window.location.hash const match=hash.match(/#(\d+)/) if(match){const n=parseInt(match[1],10) if(n>=(this.nav.post.currentPage-1)*100&&n{this.jumpTo(n)})}} this.$nextTick(()=>{this.addHeadingIds() tocbot.init({tocSelector:'.toc',contentSelector:'#post-content-0',headingSelector:'h2, h3, h4',headingsOffset:100,scrollSmoothOffset:-100,scrollSmooth:true,collapseDepth:6,onClick:function(e){setTimeout(()=>{history.replaceState(null,'',window.location.pathname+window.location.search)},0)},}) tocbot.refresh()});},beforeUnmount(){this.workerStop() if(this.quill){this.quill.destroy() this.quill=null}},computed:{dposts(){return this.posts.slice(20);},},created(){},methods:{successAlert(msg){this.alert={show:true,color:'success',text:msg,timeout:1500,}},failureAlert(msg){this.alert={show:true,color:'error',text:msg,timeout:5000,}},flipThemeDark(){this.theme.dark=!this.theme.dark localStorage.setItem("themeDark",JSON.stringify(this.theme.dark))},toSearch(){if(!this.search.text){this.failureAlert('搜索词不能为空') return} let keywords=this.search.text.trim() if(keywords.length<1){this.failureAlert('搜索词不能为空') return} if(keywords.length>100){this.failureAlert('搜索词过长') return} this.doSearch(keywords)},toReg(){window.location.href="/reg"},toLogin(){window.location.href="/login"},toPage(){let url=window.location.href url=url.replace(/(\/\d+)?(#[0-9]+)?$/,this.nav.post.targetPage>1?`/${this.nav.post.targetPage}`:'') window.location.href=url},toLoadRelated({done}){if(this.my&&this.my.uid){this.apiLoadRelated({done})}else{done('ok')}},workerStart(){this.nav.post.worker=setInterval(()=>{this.workerLoad()},500);},workerStop(){if(this.nav.post.worker){clearInterval(this.nav.post.worker);this.nav.post.worker=null;}},async jumpTo(num){const page=Math.floor(num/100)+1 const i=num-(page-1)*100 if(page===this.nav.post.currentPage){this.goTo("#post-"+num,this.nav.post.goToOptions) if(!this.posts[i].id){const block=Math.floor(num/20)+1 this.nav.post.apiLock[block]=true await this.apiLoadPosts(block) this.$nextTick(()=>{this.goTo("#post-"+num,this.nav.post.goToOptions)})}}else{let url=window.location.href url=url.replace(/(\/\d+)?(#[0-9]+)?$/,page>1?`/${page}`:'') url=url+"#"+num window.location.href=url}},postIntersect(num){return(isIntersecting,entries,observer)=>{if(isIntersecting){this.nav.post.task.push(num) this.nav.post.active.push(num) this.nav.post.active=this.nav.post.active.filter(item=>Math.abs(item-num)<=5) this.nav.post.active.sort((a,b)=>a-b)}else{this.nav.post.active=this.nav.post.active.filter(item=>item!==num)} if(this.nav.post.active[0]){this.nav.post.anchor=this.nav.post.active[0]}else{this.nav.post.anchor=0}}},async apiLoadPosts(block){try{const response=await axios.post('/fapi/v1/post/block/'+block,{discussionId:this.nav.post.discussionId,}) if(response.data.code===0){response.data.data.posts.forEach(post=>{const i=post.num%100 Object.assign(this.posts[i],post)}) response.data.data.users.forEach(user=>{this.usersMap.set(user.uid,user)})}else{this.failureAlert('回帖数据加载失败: '+response.data.msg)}}catch(error){this.failureAlert('回帖数据加载失败: '+error)} this.nav.post.apiLock[block]=false},workerLoad(){while(this.nav.post.task.length){const num=this.nav.post.task.pop() const i=num-(this.nav.post.currentPage-1)*100 if(!this.posts[i].id){const block=Math.floor(num/20)+1 if(!this.nav.post.apiLock[block]){this.nav.post.apiLock[block]=true this.apiLoadPosts(block)}}}},getTimeInfo(t){if(!t){return ""} const now=new Date();const then=new Date(t);const diff=now-then;const minute=60*1000;const hour=minute*60;const day=hour*24;const month=day*30;const year=month*12;if(diffpost.num===num) if(!post){return "#"+num} const uid=post.uid const username=this.usersMap.get(uid)?.username if(!username){return "#"+num} return username},getUsernameByPostId(id){const post=this.posts.find(post=>post.id===id) if(!post){return "#"+this.getPostNumByPostId(id)} const uid=post.uid const username=this.usersMap.get(uid).username if(!username){return "#"+this.getPostNumByPostId(id)} return username},getPostNumByPostId(id){const post=this.posts.find(post=>post.id===id) return post.num},getPostById(id){const post=this.posts.find(post=>post.id===id) return post},getPostByNum(num){const post=this.posts.find(post=>post.num===num) return post},getAvatarByUid(uid){const avatar=this.usersMap.get(uid)?.avatar if(!avatar){return this.getRandomAvatar()} return avatar},getAvatarByPostNum(num){const post=this.posts.find(post=>post.num===num) if(!post){return this.getRandomAvatar()} const uid=post.uid return this.getAvatarByUid(uid)},getRandomAvatar(){const num=Math.floor(Math.random()*100) return "https://randomuser.me/api/portraits/men/"+num+".jpg"},getUrlByUid(uid){const url=this.usersMap.get(uid)?.url if(!url){return ""} return url},getTextByPostNum(num){const post=this.posts.find(post=>post.num===num) if(!post||!post.content){return '点击跳转到#'+num+'查看'} const parser=new DOMParser() const doc=parser.parseFromString(post.content,'text/html') const text=doc.body.textContent||'' return text.slice(0,100)},addHeadingIds(){const content=document.getElementById('post-content-0') if(!content){this.nav.showTOC=false return} const headings=content.querySelectorAll('h2, h3, h4') headings.forEach((heading,index)=>{if(!heading.id){heading.id=`toc-nav-${index}`}}) if(headings.length==0){this.nav.showTOC=false}},async doSearch(keywords){this.search.loading=true try{const response=await axios.post('/fapi/v1/search',{keywords:keywords,}) if(response.data.code===0){if(response.data.data.hash&&response.data.data.hash.length===32){window.location.href="/s/"+response.data.data.hash}else{this.failureAlert('搜索失败: 搜索服务异常')}}else{this.failureAlert('搜索失败: '+response.data.msg)}}catch(error){this.failureAlert('搜索失败: '+error)} this.search.loading=false},debounce(fn,delay){let timer=null return function(...args){if(timer)clearTimeout(timer) timer=setTimeout(()=>{fn.apply(this,args)},delay);};},},watch:{'nav.post.targetPage':{handler:async function(newV,oldV){this.toPage()},immediate:false},},} const vuetify=createVuetify({defaults:{global:{ripple:true,},},}) const app=createApp(App) app.use(vuetify).mount("#app")