关于光标的思考
1 分•作者: grandimam•17 天前
我认为 Cursor 刚刚推出了它的两大主要功能:调试和设计。
我对 IDE 的期望有所了解,但在发布之前无法完全表达出来。现在它已经实现,一切都变得顺理成章。
在我看来,编程的未来将是实时的:调试、编码、设计等。这并非新概念,但不同之处在于,现在它将是完全自主的。
最近,我参与了一个功能,需要重新设计我们使用 Django 模板和纯 JavaScript 构建的旧流程的一部分,以实现交互性。理论上,这对于当前的模型来说应该不是一个难题。但它们难以产生正确的输出,我认为这有两个原因:
设计本质上很难纯粹用文本来表达。
模型擅长生成新代码,但在修改大型现有代码库方面却不那么出色。
老实说,我发现更新旧 UI 的最佳工作流程是直接从截图入手。我只需截取现有 UI 和预期更改的截图,然后要求模型编写与该设计匹配的代码,并提供现有设计的上下文。通过这种方式,模型理解上下文的速度要快得多。
有了这个新的设计功能,我设想整个过程会变得更快,因为我可以直接在浏览器上进行编辑,模型只需对预期结果进行编码即可。这正是我一直想要的——一个在后台运行的自定义无头 Puppeteer,观察我的操作,并实时协助设计。
然后是调试。我一直更喜欢日志而不是传统的调试器。我真正想要的是类似 ELK 解析器的东西,它在运行时理解我的日志,并在事情偏离预期路径时指出来。
查看原文
I believe Cursor just rolled out its two major features: Debug and Design.<p>I had an understanding of what I wanted from the IDEs, but I could not fully articulate it before the launch. Now that it’s here, it makes complete sense.<p>The way I see the future of programming, everything is going to be live: debugging, coding, designing, etc. Not that the idea is new, but the difference is that now it will be fully autonomous.<p>Recently, I worked on a feature that required redesigning part of our legacy flow built with Django templates and plain JavaScript for interactivity. In theory, this should not be a difficult task for current models. But they struggled to produce the right output, and I think there are two reasons for that:<p>Design is inherently hard to express purely in text.<p>Models are great at generating new code, but not so great at modifying large, existing codebases.<p>Honestly, the best workflow I found for updating the legacy UI was to operate directly off screenshots. I simply take the screenshots of the existing UI and the expected change, and ask the model to write code that matches that design, given the context of existing design. Models understand the context way faster this way.<p>With this new Design feature, I imagine this whole process become faster because I can make the edits directly on the browser, and model simply codes the expected outcome. Its what I always wanted - a custom headless Puppeteer running in the background, watching what I am doing, and helping with the design in real time.<p>And then there’s debugging. I have always preferred logs over a traditional debugger. What I have really wanted is something like an ELK parser at runtime something that just understands my logs as the system runs, and can point out when things drift off the expected path.