-
Notifications
You must be signed in to change notification settings - Fork 225
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add webpage documentation support (#650)
* feat: documentation support while chatting * feat: support managing web documentation entries
- Loading branch information
1 parent
4df8c14
commit b4ef573
Showing
33 changed files
with
1,132 additions
and
610 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
src/main/kotlin/ee/carlrobert/codegpt/settings/documentation/DocumentationSettings.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package ee.carlrobert.codegpt.settings.documentation | ||
|
||
import com.intellij.openapi.components.* | ||
|
||
@Service | ||
@State( | ||
name = "CodeGPT_DocumentationSettings", | ||
storages = [Storage("CodeGPT_DocumentationSettings.xml")] | ||
) | ||
class DocumentationSettings : | ||
SimplePersistentStateComponent<DocumentationSettingsState>(DocumentationSettingsState()) | ||
|
||
class DocumentationSettingsState : BaseState() { | ||
var documentations by list<DocumentationDetailsState>() | ||
} | ||
|
||
class DocumentationDetailsState : BaseState() { | ||
var name by string("CodeGPT Docs") | ||
var url by string("https://docs.codegpt.ee") | ||
} |
28 changes: 28 additions & 0 deletions
28
src/main/kotlin/ee/carlrobert/codegpt/settings/documentation/DocumentationsConfigurable.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package ee.carlrobert.codegpt.settings.documentation | ||
|
||
import com.intellij.openapi.options.Configurable | ||
import javax.swing.JComponent | ||
|
||
class DocumentationsConfigurable : Configurable { | ||
|
||
private lateinit var component: DocumentationsSettingsForm | ||
|
||
override fun getDisplayName(): String { | ||
return "CodeGPT: Documentations" | ||
} | ||
|
||
override fun createComponent(): JComponent { | ||
component = DocumentationsSettingsForm() | ||
return component.createPanel() | ||
} | ||
|
||
override fun isModified(): Boolean = component.isModified() | ||
|
||
override fun apply() { | ||
component.applyChanges() | ||
} | ||
|
||
override fun reset() { | ||
component.resetChanges() | ||
} | ||
} |
Oops, something went wrong.