Skip to content

Releases: intitni/CopilotForXcode

0.21.2

14 Aug 13:27
Compare
Choose a tag to compare

Please restart Xcode to finish the update.

Add a toggle to disable function calling in advanced settings.

you can disable it if you have no control over the model you are using for chat, and the model doesn't support function calling.

@web scope and some features of the @code scope will not work without function calling.

New in 0.21.1

  • Fix that command+w can't close chat tabs.
  • Fix that the project can't be built without the private submodule.

New in 0.21.0

Introducing Copilot for Xcode Plus!

Back in the beginning of 2023, I created the initial version of the source editor extension for GitHub Copilot, which injects suggestions into the code as comments. I never imagined that it would evolve into what it is today.

While most of what was free and open-source will remain free and open-source. I would like to introduce the Plus license key which unlocks a subset of the new features. I kindly ask you to consider getting a license key to support the development of this project!

The very first plus features are:

  • Browser tab.
  • Unlimited number of custom commands (non-plus users will have a limit of 10 commands (´・ω・`)).

What’s New

  • Replace selection and file scope with file and code scope.

    • The file scope enables the chatbot to read the metadata of the edited file. The code scope enables the chatbot to read both the metadata and content of the edited file.
    • The @code scope now parses the AST (Swift only at the moment) of the file so it knows more context of the file, like what is imported and what type or function the selected code is in.
    • When there is no selected code, it can get the focused code base on the cursor position.
  • (Plus) Browser tab
    You can now use your favorite web tools from the chat panel. The context menu has been enhanced, allowing you to perform the following actions while editing text:

    • paste selected code / file content.
    • paste selected code / file content in Markdown.
    • rewrite selected text with custom commands.

    When you are not editing text, you can still run custom commands on any selected text.

    Known issue:

    • active elements inside shadow dom and contenteditable divs are not yet supported.
    • open in new tab is not yet handled.
  • Create new chat tab with custom chat commands.

  • Chat panel now supports switch tabs with shift+command+] and shift+command+[.

  • Web page query with @web scope should be faster now.

  • You can now hide the circular widget. #307

  • Move the chat context menu to tab bar.

  • Move the pin chat panel button to the title bar of chat panel.

  • Use SMAppService to setup launch agent. If you are building the app yourself, don’t forget to update the launchAgent.plist file in the project. #266

  • Bump Codeium to 1.2.57

  • Update Azure OpenAI API to 07-01 preview which supports function calling. (Please update the model version of your deployment tot 0613)

  • Make the ChatGPT service compatible with LocalAI, but you should use a model that supports function calling, or configure it to completely ignore function calling. #308

  • Prevent reading large files. #316

Pull Requests

Full Changelog: 0.20.1...0.21.0

0.21.1

13 Aug 09:08
Compare
Choose a tag to compare
  • Fix that command+w can't close chat tabs.
  • Fix that the project can't be built without the private submodule.

New in 0.21.0

Introducing Copilot for Xcode Plus!

Back in the beginning of 2023, I created the initial version of the source editor extension for GitHub Copilot, which injects suggestions into the code as comments. I never imagined that it would evolve into what it is today.

While most of what was free and open-source will remain free and open-source. I would like to introduce the Plus license key which unlocks a subset of the new features. I kindly ask you to consider getting a license key to support the development of this project!

The very first plus features are:

  • Browser tab.
  • Unlimited number of custom commands (non-plus users will have a limit of 10 commands (´・ω・`)).

What’s New

  • Replace selection and file scope with file and code scope.

    • The file scope enables the chatbot to read the metadata of the edited file. The code scope enables the chatbot to read both the metadata and content of the edited file.
    • The @code scope now parses the AST (Swift only at the moment) of the file so it knows more context of the file, like what is imported and what type or function the selected code is in.
    • When there is no selected code, it can get the focused code base on the cursor position.
  • (Plus) Browser tab
    You can now use your favorite web tools from the chat panel. The context menu has been enhanced, allowing you to perform the following actions while editing text:

    • paste selected code / file content.
    • paste selected code / file content in Markdown.
    • rewrite selected text with custom commands.

    When you are not editing text, you can still run custom commands on any selected text.

    Known issue:

    • active elements inside shadow dom and contenteditable divs are not yet supported.
    • open in new tab is not yet handled.
  • Create new chat tab with custom chat commands.

  • Chat panel now supports switch tabs with shift+command+] and shift+command+[.

  • Web page query with @web scope should be faster now.

  • You can now hide the circular widget. #307

  • Move the chat context menu to tab bar.

  • Move the pin chat panel button to the title bar of chat panel.

  • Use SMAppService to setup launch agent. If you are building the app yourself, don’t forget to update the launchAgent.plist file in the project. #266

  • Bump Codeium to 1.2.57

  • Update Azure OpenAI API to 07-01 preview which supports function calling. (Please update the model version of your deployment tot 0613)

  • Make the ChatGPT service compatible with LocalAI, but you should use a model that supports function calling, or configure it to completely ignore function calling. #308

  • Prevent reading large files. #316

Pull Requests

Full Changelog: 0.20.1...0.21.0

0.21.0

09 Aug 08:03
Compare
Choose a tag to compare

Introducing Copilot for Xcode Plus!

Back in the beginning of 2023, I created the initial version of the source editor extension for GitHub Copilot, which injects suggestions into the code as comments. I never imagined that it would evolve into what it is today.

While most of what was free and open-source will remain free and open-source. I would like to introduce the Plus license key which unlocks a subset of the new features. I kindly ask you to consider getting a license key to support the development of this project!

The very first plus features are:

  • Browser tab.
  • Unlimited number of custom commands (non-plus users will have a limit of 10 commands (´・ω・`)).

What’s New

  • Replace selection and file scope with file and code scope.

    • The file scope enables the chatbot to read the metadata of the edited file. The code scope enables the chatbot to read both the metadata and content of the edited file.
    • The @code scope now parses the AST (Swift only at the moment) of the file so it knows more context of the file, like what is imported and what type or function the selected code is in.
    • When there is no selected code, it can get the focused code base on the cursor position.
  • (Plus) Browser tab
    You can now use your favorite web tools from the chat panel. The context menu has been enhanced, allowing you to perform the following actions while editing text:

    • paste selected code / file content.
    • paste selected code / file content in Markdown.
    • rewrite selected text with custom commands.

    When you are not editing text, you can still run custom commands on any selected text.

    Known issue:

    • active elements inside shadow dom and contenteditable divs are not yet supported.
    • open in new tab is not yet handled.
  • Create new chat tab with custom chat commands.

  • Chat panel now supports switch tabs with shift+command+] and shift+command+[.

  • Web page query with @web scope should be faster now.

  • You can now hide the circular widget. #307

  • Move the chat context menu to tab bar.

  • Move the pin chat panel button to the title bar of chat panel.

  • Use SMAppService to setup launch agent. If you are building the app yourself, don’t forget to update the launchAgent.plist file in the project. #266

  • Bump Codeium to 1.2.57

  • Update Azure OpenAI API to 07-01 preview which supports function calling.

  • Make the ChatGPT service compatible with LocalAI, but you should use a model that supports function calling, or configure it to completely ignore function calling. #308

  • Prevent reading large files. #316

Pull Requests

Full Changelog: 0.20.1...0.21.0

0.20.1

21 Jul 08:10
Compare
Choose a tag to compare

Please restart Xcode to finish the update.

  • Fix different cases in accepting a suggestion after typing out a part of the suggested code.
  • Fix that only the title area of a chat panel tab can be clicked.

New in 0.20.0

  • Update Nearby Text Cursor to be the default presentation.

  • Support multiple chat tabs.

  • Support new custom command "Single Round Dialog", which sends a message to a temporary chat, and optionally receives a reply through notification. You may want to use it to quickly run a shell command with /run.

    For example, you can set the prompt of this custom command to be /run open $FILE_PATH -a "TextEdit.app" to open the active file in TextEdit.app or /run open . to open the project root in Finder.app.

    For anyone doesn't know, you can run shell command in the chat panel with /run. The directory path will be you project root.

  • Update GitHub Copilot to 1.9.1.

  • Add a "ignore trailing new lines and whitespaces" toggle to GitHub Copilot settings.

  • Improve transitions of widgets.

An experimental chat scope @web is added. It can search with Bing, scrap a website, and answer your question according to that information. But the implementation is still very naive, it will use the top 5 relevant trunks of text from the webpage to generate an answer.
(Azure OpenAI doesn't support function calling yet, so you can't use @web from it.)

0.20.0

11 Jul 06:02
Compare
Choose a tag to compare

Please restart Xcode to finish the update.

  • Update Nearby Text Cursor to be the default presentation.

  • Support multiple chat tabs.

  • Support new custom command "Single Round Dialog", which sends a message to a temporary chat, and optionally receives a reply through notification. You may want to use it to quickly run a shell command with /run.

    For example, you can set the prompt of this custom command to be /run open $FILE_PATH -a "TextEdit.app" to open the active file in TextEdit.app or /run open . to open the project root in Finder.app.

    For anyone doesn't know, you can run shell command in the chat panel with /run. The directory path will be you project root.

  • Update GitHub Copilot to 1.9.1.

  • Add a "ignore trailing new lines and whitespaces" toggle to GitHub Copilot settings.

  • Improve transitions of widgets.

An experimental chat scope @web is added. It can search with Bing, scrap a website, and answer your question according to that information. But the implementation is still very naive, it will use the top 5 relevant trunks of text from the webpage to generate an answer.
(Azure OpenAI doesn't support function calling yet, so you can't use @web from it.)

Eventually, I decided to just not use PythonKit and LangChain.py. It's actually possible to embed site-packages, import from LangChain, and even call its tools from threads other than the main thread. But it makes me very nervous when trying to use it to run some time-consuming tasks. Other downsides are:

  • It takes like forever to code sign.
  • You will have to set up Python in your unit tests.
  • Heavily increased app bundle size.
  • There is no documentation about how to use it in a multiple-thread environment.

Luckily it's not that hard to translate the tools I need into Swift.

Pull Requests

Full Changelog: 0.19.2...0.20.0

0.19.2

26 Jun 14:04
Compare
Choose a tag to compare

Please restart Xcode to finish the update.

  • Fix incorrect opened tabs observation, which may affect the suggestion feature in generating suggestions from the opened files.

New in 0.19.1

  • Fix the issue where the extension service may fail to register some AXNotifications if Xcode is opened after the service.

New in 0.19.0

  • Add new suggestion presentation mode: nearby text cursor. It's recommended to set the real-time suggestion debounce to something greater than 0 if you are using this mode. Remove comment mode. Go toggle it on in the suggestion feature settings!
    Xcode
  • Update Codeium to 1.2.40.
  • Accepting suggestion in widget will automatically fall back to using Accessibility API when the command menu is not available. If the button is not working for you, please turn on “Always use Accessibility API to accept suggesting” in advanced settings.
  • Fix #269
  • Fix #266

Pull Requests

  • Read xcode version from inspector by @intitni in #268
  • New suggestion presentation mode: nearby text cursor by @intitni in #270
  • Update launch agent template by @intitni in #272
  • Fix that the widget will be brought to front when switching spaces by @intitni in #273
  • Bump Codeium version to 1.2.40 by @intitni in #274
  • Make full screen detector transient so it won't show up in Mission Control by @intitni in #275

Full Changelog: 0.18.2...0.19.0

0.19.1

24 Jun 14:42
Compare
Choose a tag to compare

Please restart Xcode to finish the update.

  • Fix the issue where the extension service may fail to register some AXNotifications if Xcode is opened after the service.

New in 0.19.0

  • Add new suggestion presentation mode: nearby text cursor. It's recommended to set the real-time suggestion debounce to something greater than 0 if you are using this mode. Remove comment mode. Go toggle it on in the suggestion feature settings!
    Xcode
  • Update Codeium to 1.2.40.
  • Accepting suggestion in widget will automatically fall back to using Accessibility API when the command menu is not available. If the button is not working for you, please turn on “Always use Accessibility API to accept suggesting” in advanced settings.
  • Fix #269
  • Fix #266

Pull Requests

  • Read xcode version from inspector by @intitni in #268
  • New suggestion presentation mode: nearby text cursor by @intitni in #270
  • Update launch agent template by @intitni in #272
  • Fix that the widget will be brought to front when switching spaces by @intitni in #273
  • Bump Codeium version to 1.2.40 by @intitni in #274
  • Make full screen detector transient so it won't show up in Mission Control by @intitni in #275

Full Changelog: 0.18.2...0.19.0

0.19.0

24 Jun 03:10
Compare
Choose a tag to compare

Please restart Xcode to finish the update.

  • Add new suggestion presentation mode: nearby text cursor. It 's recommended to set the real-time suggestion debounce to 0.1 if you are using this mode. Remove comment mode.
    Xcode
  • Update Codeium to 1.2.40.
  • Accepting suggestion in widget will automatically fallback to use Accessibility API when the command menu is not available.
  • Fix #269
  • Fix #266

Pull Requests

  • Read xcode version from inspector by @intitni in #268
  • New suggestion presentation mode: nearby text cursor by @intitni in #270
  • Update launch agent template by @intitni in #272
  • Fix that the widget will be brought to front when switching spaces by @intitni in #273
  • Bump Codeium version to 1.2.40 by @intitni in #274
  • Make full screen detector transient so it won't show up in Mission Control by @intitni in #275

Full Changelog: 0.18.2...0.19.0

0.18.2

14 Jun 11:02
Compare
Choose a tag to compare

Please restart Xcode to finish the update.

  • Add support for the new 16K model and 0613 models.
  • Search chat plugin now replies in the preferred language.
  • Add chat plugin \shortcutInput(shortcut name) to generate and send a user message to the bot.

The new function calling feature in ChatGPT is remarkable, we will be able to integrate some of the plugins and scopes into the bot without having to write an agent!

What's New in 0.18.1

  • May have fixed #172 (again!)
  • Support setting up a proxy for GitHub Copilot.
  • Fix that undoing in chat text view may crash the app.
  • Support new chat plugin: /shortcut(shortcut name): It will run a shortcut from the Shortcuts.app with your message (or the previous message if the new message is empty) as input, and reply with it's output. It may not have the permission to do everything like accessing your photo library.

For example, if you have a shortcut like this one:

Screenshot 2023-06-10 at 19 10 03

You can send /shortcut(translate) Hello world! to get "你好世界!" in reply, or, send /shortcut(translate) to let it translate the previous message. (Stop and output is not needed here.)

What's New in 0.18.0

  • We now support 2 new chat plugins:

    • /math: This plugin allows you to solve a simple math problem in natural language.
    • /search: This plugin can search on Bing and get an answer to your question. We chose Bing because it has a good enough free tier. To use this plugin, you will need to provide a subscription key in the host app. (Disclaimer: It's not as good as Bing Chat.)

    Both of these plugins currently lack the knowledge of the chat history.

  • You can now personalize the bot by setting the default system prompt.

  • For custom commands of open chat and custom chat, they now support the following template arguments:

    Argument Description
    {{selected_code}} The currently selected code in the editor.
    {{active_editor_language}} The programming language of the active editor.
    {{active_editor_file_url}} The URL of the active file in the editor.
    {{active_editor_file_name}} The name of the active file in the editor.

    If you prefer the old behavior of chat with selection, you can build your own command to send the code into the extra system prompt.

  • May have fixed #172 (If you still experience the crash, please help me debug it)

I have been experimenting with LangChain over the past few days and found it possible to embed the Python version of LangChain and use it with PythonKit. However, the experience was not optimal and it made the code sign take more time. Therefore, I decided to implement part of the chain and agent functionality in Swift and built the search plugin with it. Having a natively implemented chain and agent allows me to have better control over their behavior, and makes it easier to integrate native tools. I am still considering embedding LangChain (Python or Javascript, decision not yet made) in future versions to utilize their well-implemented and tested chains.

Pull Requests

Full Changelog: 0.17.1...0.18.0

0.18.1

10 Jun 11:13
Compare
Choose a tag to compare

Please restart Xcode to finish the update.

  • May have fixed #172 (again!)
  • Support setting up a proxy for GitHub Copilot.
  • Fix that undoing in chat text view may crash the app.
  • Support new chat plugin: /shortcut(shortcut name): It will run a shortcut from the Shortcuts.app with your message (or the previous message if the new message is empty) as input, and reply with it's output. It may not have the permission to do everything like accessing your photo library.

For example, if you have a shortcut like this one:

Screenshot 2023-06-10 at 19 10 03

You can send /shortcut(translate) Hello world! to get "你好世界!" in reply, or, send /shortcut(translate) to let it translate the previous message. (Stop and output is not needed here.)

What's New in 0.18.0

  • We now support 2 new chat plugins:

    • /math: This plugin allows you to solve a simple math problem in natural language.
    • /search: This plugin can search on Bing and get an answer to your question. We chose Bing because it has a good enough free tier. To use this plugin, you will need to provide a subscription key in the host app. (Disclaimer: It's not as good as Bing Chat.)

    Both of these plugins currently lack the knowledge of the chat history.

  • You can now personalize the bot by setting the default system prompt.

  • For custom commands of open chat and custom chat, they now support the following template arguments:

    Argument Description
    {{selected_code}} The currently selected code in the editor.
    {{active_editor_language}} The programming language of the active editor.
    {{active_editor_file_url}} The URL of the active file in the editor.
    {{active_editor_file_name}} The name of the active file in the editor.

    If you prefer the old behavior of chat with selection, you can build your own command to send the code into the extra system prompt.

  • May have fixed #172 (If you still experience the crash, please help me debug it)

I have been experimenting with LangChain over the past few days and found it possible to embed the Python version of LangChain and use it with PythonKit. However, the experience was not optimal and it made the code sign take more time. Therefore, I decided to implement part of the chain and agent functionality in Swift and built the search plugin with it. Having a natively implemented chain and agent allows me to have better control over their behavior, and makes it easier to integrate native tools. I am still considering embedding LangChain (Python or Javascript, decision not yet made) in future versions to utilize their well-implemented and tested chains.

Pull Requests

Full Changelog: 0.17.1...0.18.0