体验了几天 copilot

2023-03-26 19:10:21 +08:00
 woshipanghu
            const task = resp.task
            //循环 categoryData ,找到对应的分类,如果分类不存在,那么 重新加载任务列表,存在的话,直接添加到对应的分类中
            var searchCategoryData = [];
            for(let i=0; i < this.categoryData.length; i++) {
              const tempArr  = this.categoryData[i]
              if(tempArr.id == task.category_id) {
                searchCategoryData = tempArr
              }
            }
            if(searchCategoryData.length == 0) {
              this.getTask(() => {
                setTimeout(() => {
                  this.scrollAnimate(task.id);
                }, 300);
              });
            } else {
              //将任务添加到对应的分类中,如果存在置顶的任务,那么就添加到置顶的任务后面,否则添加到第一个
              let index = 0
              for(let i=0; i < searchCategoryData.children_datas.length; i++) {
                const tempArr  = searchCategoryData.children_datas[i]
                if(tempArr.is_prior == 1) {
                  index = i
                }
              }
              if(index > 0) {
                searchCategoryData.children_datas.splice(index+1, 0, task)
              } else {
                searchCategoryData.children_datas.unshift(task)
              }
              setTimeout(() => {
                this.scrollAnimate(task.id);
              }, 300);
            }
            this.addText = "";

刚开始我以为他就是帮你生成一些简单逻辑的代码

让我没想到的 他能结合你代码本身的逻辑去写

这个产品能让少些很多代码 你只要写注释 他来帮你生成

上面这段代码就是他生成的 自己稍微改了一点 但是也节省你很多时间

都去试试 真的让人很吃惊

6153 次点击
所在节点    GitHub Copilot
25 条回复
noneusername
2023-03-27 10:45:29 +08:00
用的 copilot X 吗
woshipanghu
2023-03-27 10:50:23 +08:00
@noneusername 不是最新的 X
fresco
2023-03-27 11:45:30 +08:00
期待 copilot 的体验
fresco
2023-03-27 11:45:44 +08:00
@fresco #23 copilot x
FLADIMIR
2023-04-04 09:58:43 +08:00
是否支持 Kotlin ?

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/927313

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX