CopilotForXcode

The missing GitHub Copilot, Codeium and ChatGPT Xcode Source Editor Extension

OTHER License

Stars
7.2K
Committers
10

Bot releases are hidden (Show)

CopilotForXcode - 0.14.1

Published by intitni over 1 year ago

What's New in 0.14.1

  • Fix that the helper app may crash if an inactive workspace is removed.
  • Adjust workspace life cycle.
  • Update that inactive files will not be automatically removed if there is an open tab with the same file name in Xcode.
  • Add keyboard shortcuts to control the windows:
    • command+w to close the chat and cancel the prompt to code.
    • command+m to minimize chat. You can bring the chat back by calling any chat-related commands or clicking the circular widget.
    • shift+enter to add a new line.

Pull Requests

Full Changelog: https://github.com/intitni/CopilotForXcode/compare/0.14.0...0.14.1

What's New in 0.14.0

Opened-file-aware suggestions from GitHub Copilot

GitHub Copilot will now generate suggestions based on all currently opened files.

If we were able to utilize an LSP the way it should, this feature would have been available from the start. The key is to send LSP notifications such as “open file” or “change file”. While we may not be able to get these notifications directly from Xcode, fortunately, they can be simulated with relative ease.

  • open file: Each time you switch to a file that has not yet been registered with the application.
  • change file: Each time the content is modified in the focused editor.
  • save file: Each time the application identifies that a registered file has been relinked.
  • close file: Periodically, any inactive files will automatically expire and become unregistered.

If a file has already been opened prior to the launch of the helper app, you will need to switch to those files (and click on the code) in order to send the notification that the file is open.

Detachable Chat

Now the chat is detachable from the widget. Simply drag the chat wherever you need it. To re-attach, just click on the message bubble button located next to the circular widget.

Real Global Chat

Now the chat is available all across Xcode. You can even use it in the commit panel, where you can use /run to get the git diff then ask ChatGPT to generate a commit message for you (if the diff is not too long).

Other Updates

  • The accept button in the widget will now trigger commands via Accessibility API, which is more stable and faster.
  • Change text size in suggestion and chat.
  • Suggestions and chat will no longer fight with each other. Suggestions will always be above the chat.
  • Some tweaks and bug fixes that I don't remember.
CopilotForXcode - 0.14.0

Published by intitni over 1 year ago

What's New

Opened-file-aware suggestions from GitHub Copilot

GitHub Copilot will now generate suggestions based on all currently opened files.

If we were able to utilize an LSP the way it should, this feature would have been available from the start. The key is to send LSP notifications such as “open file” or “change file”. While we may not be able to get these notifications directly from Xcode, fortunately, they can be simulated with relative ease.

  • open file: Each time you switch to a file that has not yet been registered with the application.
  • change file: Each time the content is modified in the focused editor.
  • save file: Each time the application identifies that a registered file has been relinked.
  • close file: Periodically, any inactive files will automatically expire and become unregistered.

If a file has already been opened prior to the launch of the helper app, you will need to switch to those files (and click on the code) in order to send the notification that the file is open.

Detachable Chat

Now the chat is detachable from the widget. Simply drag the chat wherever you need it. To re-attach, just click on the message bubble button located next to the circular widget.

Real Global Chat

Now the chat is available all across Xcode. You can even use it in the commit panel, where you can use /run to get the git diff then ask ChatGPT to generate a commit message for you (if the diff is not too long).

Other Updates

  • The accept button in the widget will now trigger commands via Accessibility API, which is more stable and faster.
  • Change text size in suggestion and chat.
  • Suggestions and chat will no longer fight with each other. Suggestions will always be above the chat.
  • Some tweaks and bug fixes that I don't remember.

Pull Requests

Full Changelog: https://github.com/intitni/CopilotForXcode/compare/0.13.4...0.14.0

CopilotForXcode - 0.14.0 beta 5

Published by intitni over 1 year ago

Please go to https://github.com/intitni/CopilotForXcode/discussions/174 for the discussion on this feature.

What's New in Beta 5

Now GitHub Copilot can generate suggestions based on the open files. (If the files are already opened when you launch Xcode, you need to switch to those files to let GitHub Copilot know.)

What's New in Beta 4

  • Setting font size.
  • The widget now attaches to every single window of Xcode. (except quick open)
  • Chat panel will always be below the other widgets.
  • Dragging chat without making the chat active.
  • Resizing will no longer detach the chat panel.
  • Widgets will now disappear if all windows of Xcode are minimized.

What's New in Beta 3

  • Support triggering commands via Accessibility API. If the accept button in the widget was not working for you, please give it a try. It's also much faster than the Apple Script implementation.

What's New in Beta 2

  • Fix that the app will freeze at launch.
  • Add timeout to accept suggestion command.
  • Make chat with selection and prompt to code command return immediately.
  • Remove the boost QoS hack which does nothing.

What's New in 0.14.0

Add detachable chat.

Now you can drag the chat away from the widget to detach the chat from it. The detached window can be moved around and resized. And it will always be on the top.

To attach it back to the widget, you can click the chat bubble button next to the circular widget.

Detach and attach can also be done in the contextual menu of the circular widget.

CopilotForXcode - 0.14.0 beta 4

Published by intitni over 1 year ago

Please go to https://github.com/intitni/CopilotForXcode/discussions/174 for the discussion on this feature.

What's New in Beta 4

  • Setting font size.
  • The widget now attaches to every single window of Xcode. (except quick open)
  • Chat panel will always be below the other widgets.
  • Dragging chat without making the chat active.
  • Resizing will no longer detach the chat panel.
  • Widgets will now disappear if all windows of Xcode are minimized.

What's New in Beta 3

  • Support triggering commands via Accessibility API. If the accept button in the widget was not working for you, please give it a try. It's also much faster than the Apple Script implementation.

What's New in Beta 2

  • Fix that the app will freeze at launch.
  • Add timeout to accept suggestion command.
  • Make chat with selection and prompt to code command return immediately.
  • Remove the boost QoS hack which does nothing.

What's New in 0.14.0

Add detachable chat.

Now you can drag the chat away from the widget to detach the chat from it. The detached window can be moved around and resized. And it will always be on the top.

To attach it back to the widget, you can click the chat bubble button next to the circular widget.

Detach and attach can also be done in the contextual menu of the circular widget.

CopilotForXcode - 0.14.0 beta 3

Published by intitni over 1 year ago

What's New in beta 3

  • Support triggering command via Accessibility API. If the accept button in the widget was not working for you, please give it a try. It's also much faster than the Apple Script implementation.

What's New in beta 2

  • Fix that the app will freeze at launch.
  • Add timeout to accept suggestion command.
  • Make chat with selection and prompt to code command return immediately.
  • Remove the boost QoS hack which does nothing.

What's New in 0.14.0

Add detachable chat.

Now you can drag the chat away from the widget to detach the chat from it. The detached window can be moved around and resized. And it will always be on the top.

To attach it back to the widget, you can click the chat bubble button next to the circular widget.

Detach and attach can also be done in the contextual menu of the circular widget.

Please go to https://github.com/intitni/CopilotForXcode/discussions/174 for discussion on this feature.

CopilotForXcode - 0.14.0 beta 2

Published by intitni over 1 year ago

If you are updating from 0.13.3 and 0.14.0 and still facing the freeze, please change the value of Run node with picker manually and restart the app.

What's New

  • Fix that the app will freeze at launch.
  • Add timeout to accept suggestion command.
  • Make chat with selection and prompt to code command return immediately.
  • Remove the boost QoS hack which does nothing.

What's New in 0.14.0

Add detachable chat.

Now you can drag the chat away from the widget to detach the chat from it. The detached window can be moved around and resized. And it will always be on the top.

To attach it back to the widget, you can click the chat bubble button next to the circular widget.

Detach and attach can also be done in the contextual menu of the circular widget.

Please go to https://github.com/intitni/CopilotForXcode/discussions/174 for discussion on this feature.

CopilotForXcode - 0.13.4

Published by intitni over 1 year ago

If you are updating from 0.13.3 and still facing the freeze, please change the value of Run node with picker manually and restart the app.

What's New

  • Fix that the app will freeze at launch.
  • Add timeout to accept suggestion command.
  • Make chat with selection and prompt to code command return immediately.
  • Remove the boost QoS hack which does nothing.

0.14.0 beta 3

https://github.com/intitni/CopilotForXcode/releases/tag/0.14.0.beta.3

What's New Previously

  • Add ids to custom command so changing the name of them won't create new custom commands in Key Binding settings.
  • Make "Run node with interactive logged-in bash" a picker below path to node text field.
  • Fix that changing ChatGPT model will reset server.
  • Fix that resending a command with plugins won't trigger plugin.
  • Fix that switching between files in Xcode won't update the position of widget immediately.
  • Some other tweaks
CopilotForXcode - 0.13.3

Published by intitni over 1 year ago

(If you some how find that the buttons in the host app are not clickable, please give it some time. I honestly don't know what is wrong and will just blame SwiftUI.)

(The bug is found!, please wait for next release!)

What's New

  • Add ids to custom command so changing the name of them won't create new custom commands in Key Binding settings.
  • Make "Run node with interactive logged-in bash" a picker below path to node text field.
  • Fix that changing ChatGPT model will reset server.
  • Fix that resending a command with plugins won't trigger plugin.
  • Fix that switching between files in Xcode won't update the position of widget immediately.
  • Some other tweaks

0.14.0 beta 1: Detachable Chat

https://github.com/intitni/CopilotForXcode/releases/tag/0.14.0.beta.1

CopilotForXcode - 0.14.0 beta 1

Published by intitni over 1 year ago

(If you some how find that the buttons in the host app are not clickable, please give it some time. I honestly don't know what is wrong and will just blame SwiftUI.)

Add detachable chat.

Now you can drag the chat away from the widget to detach the chat from it. The detached window can be moved around and resized. And it will always be on the top.

To attach it back to the widget, you can click the chat bubble button next to the circular widget.

Detach and attach can also be done in the contextual menu of the circular widget.

Please go to #174 for discussion on this feature.

CopilotForXcode - 0.13.2

Published by intitni over 1 year ago

The development of this project will slow down until we know what Apple will do to Xcode during WWDC.

What's New

  • Fix that duplicated custom commands were created #168

Please click into the issue to learn how to remove the duplicated command from Keybindings settings page.

What's New in 0.13.1

  • Support setting extra system prompt for prompt-to-code custom commands. I found it quite useful when I use it as a smart template. You can set the code template in the extra system prompt field and leave the prompt field blank, then when you run this command, you will be able to generate code from this template with natural language. The panel will now show the custom command name.
  • Prompt to code now has the knowledge of the editing file path.
  • The text fields are now TextEditor with monospaced font.
  • Messages displayed when running custom chat commands are updated to also show the command name.

What's New in 0.13.0

  • Bad news, the command "Explain Selection" is removed. Good news, It's now re-added as a custom command. You can now create custom commands to extend the "Prompt to Code" and "Chat with Selection" features. Custom commands can be accessed from the Editor menu of Xcode and the contextual menu of the circular widget.
  • Smooth scrolling. Fixes #122
  • Automatic ChatGPT token limit management. The app will now calculate the max_token for you, and the "Max Token" settings in the host app now represents the token count of messages sent + the token count of reply. That means you can set the value to maximum now.
  • Add "Max Message Count Sending" picker.
  • Add "Temperature" slider.
  • Delete messages from chat.
  • Resend message from chat.
  • Allow accepting prompt-to-code suggestion when the bot is still writing the description but the code is ready.
  • Add copy button to Prompt to Code panel.
CopilotForXcode - 0.13.1

Published by intitni over 1 year ago

The development of this project will slow down until we know what Apple will do to Xcode during WWDC.

What's New

  • Support setting extra system prompt for prompt-to-code custom commands. I found it quite useful when I use it as a smart template. You can set the code template in the extra system prompt field and leave the prompt field blank, then when you run this command, you will be able to generate code from this template with natural language. The panel will now show the custom command name.
  • Prompt to code now has the knowledge of the editing file path.
  • The text fields are now TextEditor with monospaced font.
  • Messages displayed when running custom chat commands are updated to also show the command name.

What's New in 0.13.0

  • Bad news, the command "Explain Selection" is removed. Good news, It's now re-added as a custom command. You can now create custom commands to extend the "Prompt to Code" and "Chat with Selection" features. Custom commands can be accessed from the Editor menu of Xcode and the contextual menu of the circular widget.
  • Smooth scrolling. Fixes #122
  • Automatic ChatGPT token limit management. The app will now calculate the max_token for you, and the "Max Token" settings in the host app now represents the token count of messages sent + the token count of reply. That means you can set the value to maximum now.
  • Add "Max Message Count Sending" picker.
  • Add "Temperature" slider.
  • Delete messages from chat.
  • Resend message from chat.
  • Allow accepting prompt-to-code suggestion when the bot is still writing the description but the code is ready.
  • Add copy button to Prompt to Code panel.
CopilotForXcode - 0.13.0

Published by intitni over 1 year ago

The development of this project will slow down until we know what Apple will do to Xcode during WWDC.

What's New

  • Bad news, the command "Explain Selection" is removed. Good news, It's now re-added as a custom command. You can now create custom commands to extend the "Prompt to Code" and "Chat with Selection" features. Custom commands can be accessed from the Editor menu of Xcode and the contextual menu of the circular widget.
  • Smooth scrolling. Fixes #122
  • Automatic ChatGPT token limit management. The app will now calculate the max_token for you, and the "Max Token" settings in the host app now represents the token count of messages sent + the token count of reply. That means you can set the value to maximum now.
  • Add "Max Message Count Sending" picker.
  • Add "Temperature" slider.
  • Delete messages from chat.
  • Resend message from chat.
  • Allow accepting prompt-to-code suggestion when the bot is still writing the description but the code is ready.
  • Add copy button to Prompt to Code panel.

Pull Requests

Full Changelog: https://github.com/intitni/CopilotForXcode/compare/0.12.0...0.13.0

CopilotForXcode - 0.12.0

Published by intitni over 1 year ago

What's New

  • New command "Prompt to Code" to write or refactor code with natural language. The feature is powered by ChatGPT by default, but you can switch to a GitHub Copilot implementation which doesn't work that well.

    Prompt to Code is like a special suggestion that has a higher priority, so you won't see other suggestions when the panel is displayed. You can accept or reject the prompt to code using the commands for suggestions when Xcode is active.

  • You can now globally disable suggestions and prompt to code features, and enable them for selected projects.

  • The widget is now preferred to stay inside the editor when the editor is wide enough. You can adjust the min-width in the host app.

  • You can now copy a reply from the chat panel with the new copy button. Or copy any message by right-clicking the bubble.

  • /run now uses an interactive logged-in shell so it should now have the same environment as when you open a terminal.

  • Node will now be loaded with interactive logged-in bash. If this is breaking the app for you, you can turn it off in the host app.

Help wanted: #122. Looks like it happens only on SwiftUI ScrollView.

Pull Requests

Full Changelog: https://github.com/intitni/CopilotForXcode/compare/0.11.2...0.12.0

CopilotForXcode - 0.11.2

Published by intitni over 1 year ago

Tweak editor info prefetch and real-time suggestions.

  • The app will no longer trigger real-time suggestion with Apple Script.
  • You can turn off the prefetch step in the host app. Scroll all the way to the bottom for the toggle.

Fix a bug that a suggestions can't be accepted or discarded sometimes, because multiple filespaces for a same file was created.

Accepting suggestions via Accessibility API will now recover scroll position.

CopilotForXcode - 0.11.1

Published by intitni over 1 year ago

New in 0.11.1

Don't update to this version if you don't have the problem.

  • Remove the cache of file information each time a file is opened, which appears will disable the source extension sometimes(?). We will use the good old way to trigger real-time suggestion via Apple Scripts, but this time it will not dismiss the Xcode completion panel.

New in 0.11.0

  • The widget is now taller.
  • The UI of the chat panel has been updated, and now you can switch to a global chat that can be accessed for all files.
  • Chat with Selection and Explain Selection will no longer start a new conversation.
  • Enhance the suggestion feature by allowing the hiding of preceding spaces when suggesting heavily nested code. This can be enabled by right-clicking on the circular widget, which now opens a menu.
  • Added a new chat plugin, /airun. You can use this plugin to generate and run a terminal command using natural language. Don't expect it to always work, and it may require a slightly higher number of tokens.

  • Added /exit to help you exit a chat plugin.
  • The run plugin will now inherit all environment variables from your login shell, allowing you to utilize any software installed through brew or other means.
  • The language server will inherit all environment variables from your login shell, which allows the app to search for node in a wider range of locations.

  • Fix a widget position issue. I misunderstood what NSScreen.main is.
  • The continuous spaces in the selected code sent to the chat panel will now remain as they are and won't be replaced by a single space.

Pull Requests

Full Changelog: https://github.com/intitni/CopilotForXcode/compare/0.11.0...0.11.1

CopilotForXcode - 0.11.0

Published by intitni over 1 year ago

  • The widget is now taller.
  • The UI of the chat panel has been updated, and now you can switch to a global chat that can be accessed for all files.
  • Chat with Selection and Explain Selection will no longer start a new conversation.
  • Enhance the suggestion feature by allowing the hiding of preceding spaces when suggesting heavily nested code. This can be enabled by right-clicking on the circular widget, which now opens a menu.
  • Added a new chat plugin, /airun. You can use this plugin to generate and run a terminal command using natural language. Don't expect it to always work, and it may require a slightly higher number of tokens.

  • Added /exit to help you exit a chat plugin.
  • The run plugin will now inherit all environment variables from your login shell, allowing you to utilize any software installed through brew or other means.
  • The language server will inherit all environment variables from your login shell, which allows the app to search for node in a wider range of locations.

  • Fix a widget position issue. I misunderstood what NSScreen.main is.
  • The continuous spaces in the selected code sent to the chat panel will now remain as they are and won't be replaced by a single space.

WWDC is coming.

Pull Requests

New Contributors

Full Changelog: https://github.com/intitni/CopilotForXcode/compare/0.10.0...0.11.0

CopilotForXcode - 0.10.0

Published by intitni over 1 year ago

  • You can now run terminal commands directly from the chat panel by using the /run command followed by your command, such as /run echo hello. Note that environment variables are currently inherited from the app, so any items installed with brew may not be discoverable.
  • The OpenAI account settings have been improved for better user-friendliness.
  • GitHub Copilot now supports more file types.
  • Server errors will no longer appear in the widget but can be viewed in the log using Console.app.
  • Real-time suggestions no longer require Apple Script involvement. So that it will never block the editor or dismiss the Xcode completion panel.
  • For users experiencing issue #70, there is now a workaround to accept suggestions without using Apple Script to click the menu. However, the experience may not be optimal. You can turn it on in the host app.
  • The text field in the chat panel will now be automatically activated when opened.
  • Code blocks within chats are now syntax highlighted, and a copy button has been added to the top right corner of the code block.
  • Prompts are improved to make prompt to edit code easier in the chat panel.

This release includes bug fixes that may have resolved issues #95 and #92, but as I cannot reproduce them on their own machine, I cannot confirm that they are fixed. Additionally, for Monterey users, the chat panel has been tweaked to support multiline input and correctly display the wipe history button.

Help wanted: #122 The helper app stutters when launched by launch agent

Pull Requests

New Contributors

Full Changelog: https://github.com/intitni/CopilotForXcode/compare/0.9.1...0.10.0

CopilotForXcode - 0.9.1

Published by intitni over 1 year ago

New commands:

  • Chat with Selection: Open a chat window, if there is a selection, the selected code will be added to the prompt.
  • Explain Selection: Open a chat window and explain the selected code.

To use these 2 commands, you will need to provide a valid OpenAI API key. Check the new account settings for details. The chat is currently limited to 5 conversations. Exceeding token limit is not handled.

Other updates:

  • Present errors in widget.
  • Add Sparkle for auto update. #60
  • May have fixed #59
  • May have fixed #70

I've spent too much time on this this month and it's making me very tired. I think I need to take a break, so please note that I may not be instantly responding to issues or pull requests for a while. Good night.

CopilotForXcode - 0.8.6

Published by intitni over 1 year ago

  • Fix that the widget was not showing when Xcode was in fullscreen mode.
  • Add light mode support. You can set it up in the host app.
  • Add a linear gradient below the host app status bar.

Full Changelog: https://github.com/intitni/CopilotForXcode/compare/0.8.5...0.8.6

Let's just pretend that there is no more bug in 0.8.x.

CopilotForXcode - 0.8.5-Update-1

Published by intitni over 1 year ago

Update 1: Fix syntax highlighting for Objective-C #48


  • May fix #43 that the app is freezing for some users by changing LazyVGrid to VStack (Why?). Big thanks to @timwredwards and @cr2s367067 for helping me locate the bug. I wasn't able to reproduce the bug on 2 of my machines, so I'm not completely certain that it's fixed or that it won't resurface in the future.
  • Done some cleanup in the suspicious areas that look relevant to the bug.
  • Updated copilot.vim to 1.8.3

If the app still freezes, please reply to issue #43, and give 0.8.4 a try. Maybe I made some mistakes again, sigh.