294 lines
9.0 KiB
Plaintext
294 lines
9.0 KiB
Plaintext
[gd_scene load_steps=7 format=3 uid="uid://rv5dl08lcb8e"]
|
|
|
|
[ext_resource type="Script" path="res://addons/copilot/Copilot.gd" id="1_pq1gj"]
|
|
[ext_resource type="Script" path="res://addons/copilot/OpenAIChat.gd" id="2"]
|
|
[ext_resource type="Material" uid="uid://cccmbprav6vgu" path="res://addons/copilot/small_icon.tres" id="2_gdw4j"]
|
|
[ext_resource type="Script" path="res://addons/copilot/OpenAICompletion.gd" id="3_loa2x"]
|
|
[ext_resource type="Material" uid="uid://bl1rtf743e4l3" path="res://addons/copilot/large_icon.tres" id="3_xn70b"]
|
|
[ext_resource type="Script" path="res://addons/copilot/GithubCopilot.gd" id="6_hmh8w"]
|
|
|
|
[node name="Copilot" type="Control"]
|
|
layout_mode = 3
|
|
anchors_preset = 15
|
|
anchor_right = 1.0
|
|
anchor_bottom = 1.0
|
|
grow_horizontal = 2
|
|
grow_vertical = 2
|
|
script = ExtResource("1_pq1gj")
|
|
icon_shader = ExtResource("2_gdw4j")
|
|
highlight_color = Color(0.223529, 0.254902, 0.298039, 1)
|
|
|
|
[node name="VBoxParent" type="VBoxContainer" parent="."]
|
|
layout_mode = 0
|
|
anchor_right = 1.0
|
|
anchor_bottom = 1.0
|
|
|
|
[node name="Indicator" type="ColorRect" parent="VBoxParent"]
|
|
material = ExtResource("3_xn70b")
|
|
custom_minimum_size = Vector2(200, 200)
|
|
layout_mode = 2
|
|
size_flags_horizontal = 4
|
|
|
|
[node name="ContextTitle" type="Label" parent="VBoxParent"]
|
|
modulate = Color(1, 1, 1, 0.7)
|
|
layout_mode = 2
|
|
text = "Current Context"
|
|
horizontal_alignment = 1
|
|
vertical_alignment = 1
|
|
autowrap_mode = 3
|
|
|
|
[node name="Context" type="Label" parent="VBoxParent"]
|
|
layout_mode = 2
|
|
horizontal_alignment = 1
|
|
vertical_alignment = 1
|
|
autowrap_mode = 3
|
|
|
|
[node name="Status" type="Label" parent="VBoxParent"]
|
|
modulate = Color(1, 1, 1, 0.7)
|
|
custom_minimum_size = Vector2(2.08165e-12, 100)
|
|
layout_mode = 2
|
|
horizontal_alignment = 1
|
|
vertical_alignment = 1
|
|
autowrap_mode = 3
|
|
|
|
[node name="HowToTitle" type="Label" parent="VBoxParent"]
|
|
layout_mode = 2
|
|
text = "How To Use"
|
|
|
|
[node name="Separator1" type="HSeparator" parent="VBoxParent"]
|
|
layout_mode = 2
|
|
|
|
[node name="HowTo" type="Label" parent="VBoxParent"]
|
|
layout_mode = 2
|
|
text = "Press the selected shortcut in the code editor to request a completion from Copilot at the current caret position"
|
|
autowrap_mode = 3
|
|
|
|
[node name="SettingTitle" type="Label" parent="VBoxParent"]
|
|
layout_mode = 2
|
|
text = "Settings"
|
|
|
|
[node name="Separator2" type="HSeparator" parent="VBoxParent"]
|
|
layout_mode = 2
|
|
|
|
[node name="OpenAiSetting" type="HBoxContainer" parent="VBoxParent"]
|
|
custom_minimum_size = Vector2(2.08165e-12, 2.08165e-12)
|
|
layout_mode = 2
|
|
theme_override_constants/separation = 10
|
|
|
|
[node name="Label" type="Label" parent="VBoxParent/OpenAiSetting"]
|
|
custom_minimum_size = Vector2(100, 2.08165e-12)
|
|
layout_mode = 2
|
|
size_flags_horizontal = 3
|
|
size_flags_vertical = 1
|
|
text = "OpenAI API Key"
|
|
vertical_alignment = 1
|
|
autowrap_mode = 3
|
|
|
|
[node name="VSeparator" type="VSeparator" parent="VBoxParent/OpenAiSetting"]
|
|
layout_mode = 2
|
|
|
|
[node name="OpenAiKey" type="LineEdit" parent="VBoxParent/OpenAiSetting"]
|
|
custom_minimum_size = Vector2(2.08165e-12, 2.08165e-12)
|
|
layout_mode = 2
|
|
size_flags_horizontal = 10
|
|
placeholder_text = "API Key"
|
|
secret = true
|
|
|
|
[node name="ModelSetting" type="HBoxContainer" parent="VBoxParent"]
|
|
custom_minimum_size = Vector2(2.08165e-12, 2.08165e-12)
|
|
layout_mode = 2
|
|
theme_override_constants/separation = 10
|
|
|
|
[node name="Label" type="Label" parent="VBoxParent/ModelSetting"]
|
|
custom_minimum_size = Vector2(100, 2.08165e-12)
|
|
layout_mode = 2
|
|
size_flags_horizontal = 3
|
|
size_flags_vertical = 1
|
|
text = "Model"
|
|
vertical_alignment = 1
|
|
|
|
[node name="VSeparator" type="VSeparator" parent="VBoxParent/ModelSetting"]
|
|
layout_mode = 2
|
|
|
|
[node name="Model" type="OptionButton" parent="VBoxParent/ModelSetting"]
|
|
layout_mode = 2
|
|
size_flags_horizontal = 10
|
|
item_count = 3
|
|
selected = 1
|
|
fit_to_longest_item = false
|
|
popup/item_0/text = "text-davinci-003"
|
|
popup/item_0/id = 0
|
|
popup/item_1/text = "gpt-3.5-turbo"
|
|
popup/item_1/id = 1
|
|
popup/item_2/text = "gpt-4"
|
|
popup/item_2/id = 2
|
|
|
|
[node name="ShortcutSetting" type="HBoxContainer" parent="VBoxParent"]
|
|
custom_minimum_size = Vector2(2.08165e-12, 2.08165e-12)
|
|
layout_mode = 2
|
|
theme_override_constants/separation = 10
|
|
|
|
[node name="Label" type="Label" parent="VBoxParent/ShortcutSetting"]
|
|
custom_minimum_size = Vector2(100, 2.08165e-12)
|
|
layout_mode = 2
|
|
size_flags_horizontal = 3
|
|
size_flags_vertical = 1
|
|
text = "Shortcut"
|
|
vertical_alignment = 1
|
|
|
|
[node name="VSeparator" type="VSeparator" parent="VBoxParent/ShortcutSetting"]
|
|
layout_mode = 2
|
|
|
|
[node name="HBoxContainer" type="HBoxContainer" parent="VBoxParent/ShortcutSetting"]
|
|
layout_mode = 2
|
|
size_flags_horizontal = 10
|
|
|
|
[node name="Modifier" type="OptionButton" parent="VBoxParent/ShortcutSetting/HBoxContainer"]
|
|
layout_mode = 2
|
|
size_flags_horizontal = 10
|
|
item_count = 4
|
|
selected = 2
|
|
popup/item_0/text = "Cmd"
|
|
popup/item_0/id = 0
|
|
popup/item_1/text = "Option"
|
|
popup/item_1/id = 1
|
|
popup/item_2/text = "Control"
|
|
popup/item_2/id = 2
|
|
popup/item_3/text = "Shift"
|
|
popup/item_3/id = 3
|
|
|
|
[node name="Key" type="OptionButton" parent="VBoxParent/ShortcutSetting/HBoxContainer"]
|
|
layout_mode = 2
|
|
size_flags_horizontal = 10
|
|
item_count = 32
|
|
selected = 2
|
|
popup/item_0/text = "A"
|
|
popup/item_0/id = 0
|
|
popup/item_1/text = "B"
|
|
popup/item_1/id = 1
|
|
popup/item_2/text = "C"
|
|
popup/item_2/id = 2
|
|
popup/item_3/text = "D"
|
|
popup/item_3/id = 3
|
|
popup/item_4/text = "E"
|
|
popup/item_4/id = 4
|
|
popup/item_5/text = "F"
|
|
popup/item_5/id = 5
|
|
popup/item_6/text = "G"
|
|
popup/item_6/id = 6
|
|
popup/item_7/text = "H"
|
|
popup/item_7/id = 7
|
|
popup/item_8/text = "L"
|
|
popup/item_8/id = 8
|
|
popup/item_9/text = "M"
|
|
popup/item_9/id = 9
|
|
popup/item_10/text = "N"
|
|
popup/item_10/id = 10
|
|
popup/item_11/text = "O"
|
|
popup/item_11/id = 11
|
|
popup/item_12/text = "P"
|
|
popup/item_12/id = 12
|
|
popup/item_13/text = "Q"
|
|
popup/item_13/id = 13
|
|
popup/item_14/text = "R"
|
|
popup/item_14/id = 14
|
|
popup/item_15/text = "S"
|
|
popup/item_15/id = 15
|
|
popup/item_16/text = "T"
|
|
popup/item_16/id = 16
|
|
popup/item_17/text = "U"
|
|
popup/item_17/id = 17
|
|
popup/item_18/text = "V"
|
|
popup/item_18/id = 18
|
|
popup/item_19/text = "X"
|
|
popup/item_19/id = 19
|
|
popup/item_20/text = "Y"
|
|
popup/item_20/id = 20
|
|
popup/item_21/text = "Z"
|
|
popup/item_21/id = 21
|
|
popup/item_22/text = "1"
|
|
popup/item_22/id = 22
|
|
popup/item_23/text = "2"
|
|
popup/item_23/id = 23
|
|
popup/item_24/text = "3"
|
|
popup/item_24/id = 24
|
|
popup/item_25/text = "4"
|
|
popup/item_25/id = 25
|
|
popup/item_26/text = "5"
|
|
popup/item_26/id = 26
|
|
popup/item_27/text = "6"
|
|
popup/item_27/id = 27
|
|
popup/item_28/text = "7"
|
|
popup/item_28/id = 28
|
|
popup/item_29/text = "8"
|
|
popup/item_29/id = 29
|
|
popup/item_30/text = "9"
|
|
popup/item_30/id = 30
|
|
popup/item_31/text = "0"
|
|
popup/item_31/id = 31
|
|
|
|
[node name="MultilineSetting" type="HBoxContainer" parent="VBoxParent"]
|
|
custom_minimum_size = Vector2(2.08165e-12, 2.08165e-12)
|
|
layout_mode = 2
|
|
theme_override_constants/separation = 10
|
|
|
|
[node name="Label" type="Label" parent="VBoxParent/MultilineSetting"]
|
|
custom_minimum_size = Vector2(100, 2.08165e-12)
|
|
layout_mode = 2
|
|
size_flags_horizontal = 3
|
|
size_flags_vertical = 1
|
|
text = "Multiline Completions"
|
|
vertical_alignment = 1
|
|
autowrap_mode = 3
|
|
|
|
[node name="VSeparator" type="VSeparator" parent="VBoxParent/MultilineSetting"]
|
|
layout_mode = 2
|
|
|
|
[node name="Multiline" type="CheckBox" parent="VBoxParent/MultilineSetting"]
|
|
layout_mode = 2
|
|
size_flags_horizontal = 10
|
|
button_pressed = true
|
|
text = "Enabled"
|
|
|
|
[node name="Info" type="RichTextLabel" parent="VBoxParent"]
|
|
layout_mode = 2
|
|
focus_mode = 2
|
|
fit_content = true
|
|
selection_enabled = true
|
|
|
|
[node name="LLMs" type="Node" parent="."]
|
|
|
|
[node name="OpenAICompletion" type="Node" parent="LLMs"]
|
|
script = ExtResource("3_loa2x")
|
|
|
|
[node name="OpenAIChat" type="Node" parent="LLMs"]
|
|
script = ExtResource("2")
|
|
|
|
[node name="GithubCopilot" type="Node" parent="LLMs"]
|
|
script = ExtResource("6_hmh8w")
|
|
|
|
[node name="Version" type="Label" parent="."]
|
|
layout_mode = 1
|
|
anchors_preset = 12
|
|
anchor_top = 1.0
|
|
anchor_right = 1.0
|
|
anchor_bottom = 1.0
|
|
offset_top = -23.0
|
|
grow_horizontal = 2
|
|
grow_vertical = 0
|
|
horizontal_alignment = 2
|
|
vertical_alignment = 2
|
|
|
|
[connection signal="text_changed" from="VBoxParent/OpenAiSetting/OpenAiKey" to="." method="_on_open_ai_key_changed"]
|
|
[connection signal="item_selected" from="VBoxParent/ModelSetting/Model" to="." method="_on_model_selected"]
|
|
[connection signal="item_selected" from="VBoxParent/ShortcutSetting/HBoxContainer/Modifier" to="." method="_on_shortcut_modifier_selected"]
|
|
[connection signal="item_selected" from="VBoxParent/ShortcutSetting/HBoxContainer/Key" to="." method="_on_shortcut_key_selected"]
|
|
[connection signal="toggled" from="VBoxParent/MultilineSetting/Multiline" to="." method="_on_multiline_toggled"]
|
|
[connection signal="meta_clicked" from="VBoxParent/Info" to="." method="on_info_meta_clicked"]
|
|
[connection signal="completion_error" from="LLMs/OpenAICompletion" to="." method="_on_code_completion_error"]
|
|
[connection signal="completion_received" from="LLMs/OpenAICompletion" to="." method="_on_code_completion_received"]
|
|
[connection signal="completion_error" from="LLMs/OpenAIChat" to="." method="_on_code_completion_error"]
|
|
[connection signal="completion_received" from="LLMs/OpenAIChat" to="." method="_on_code_completion_received"]
|
|
[connection signal="completion_error" from="LLMs/GithubCopilot" to="." method="_on_code_completion_error"]
|
|
[connection signal="completion_received" from="LLMs/GithubCopilot" to="." method="_on_code_completion_received"]
|