Raycast 的 AI 功能很好用,比如我创建了一个 AI Command,prompt 是 Process {selection} according to {argument}. 当我选中文本后,呼出 Raycast,输入指令,就可以让 AI 对选中的内容进行处理了。

我不懂代码,有时候写笔记的时候遇到代码块要选择代码语言就很痛苦,于是写了一个 AI command,让 AI 告诉我怎么选择。prompt 是 Based on {selection}, you as a code language detector, tell me which language I should select for the code block, such as Bash, Python, JavaScript, HTML, Markdown, or any other language. Please reply with the name of the appropriate language for the code block.

使用 Raycast AI 进行翻译也非常好用,比如选中文本后直接翻译为中文。Translate {selection} to Chinese. Only return the translate result. Don't interpret it.