yaroslavyaroslav / OpenAI-sublime-text

First class Sublime Text AI assistant with GPT-o1 and ollama support!
MIT License
173 stars 13 forks source link

Error: The settings file could not be opened #5

Closed raineorshine closed 1 year ago

raineorshine commented 1 year ago

Environment

Steps to Reproduce

  1. Install OpenAI-sublime-text from package control
    • Added to /Installed Packages/OpenAI completion.sublime-package
  2. Sublime Text → Settings... → Package Settings → OpenAI completion → Settings

Current Behavior

The settings file "res://Packages/openAI/openAI.sublime-settings" could not be opened

Expected Behavior

User settings should be opened.

deathaxe commented 1 year ago

Main menu uses the wrong package name openAI. A package name must match the install name of the package, which is OpenAI completion.

https://github.com/yaroslavyaroslav/OpenAI-sublime-text/blob/09dafc198716ea144c42dde477e3ed9847f1ac64/Main.sublime-menu#L19

yaroslavyaroslav commented 1 year ago

@deathaxe is there spaces allowed within a name? Like should i rename it directly to as you said above: OpenAI completion.sublime-settings?

I see that I've got you wring at first. Please take a look is #6 would fix the issue?

deathaxe commented 1 year ago

is there spaces allowed within a name?

Package names can contain spaces. The only limitation is that plugins located within such packages can't be imported by other packages, but thats a rather rare use case with other implications anyway.

Like should i rename it directly to as you said above: OpenAI completion.sublime-settings?

At least the package nme must be renamed to fix the issue. Whether the settings file should be renamed as well, is a rather strategic question. It is a common design pattern to use the package name for settings files as well, just to avoid any confusion.

mattlinares commented 1 year ago

I take it this still needs to be submitted to the Sublime package repo or something right?

raineorshine commented 1 year ago

@mattlinares It's been published at v1.1.3.