thonny-codemate 0.1.2__py3-none-any.whl → 0.1.4__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: thonny-codemate
3
- Version: 0.1.2
3
+ Version: 0.1.4
4
4
  Summary: A Thonny IDE plugin that provides AI-powered coding assistance using local and cloud LLMs
5
5
  Author-email: tokoroten <shinta.nakayama@gmail.com>
6
6
  License: MIT
@@ -1,6 +1,6 @@
1
- thonny_codemate-0.1.2.dist-info/licenses/LICENSE,sha256=f6YK7MRRtaWl2brMAtg_aGrsLK_i4rVyho0y1PdnFi0,1065
1
+ thonny_codemate-0.1.4.dist-info/licenses/LICENSE,sha256=f6YK7MRRtaWl2brMAtg_aGrsLK_i4rVyho0y1PdnFi0,1065
2
2
  thonnycontrib/__init__.py,sha256=7INAjyU8ojDRVyo0y1OQh3ynMPRGqBJZL4fa--i3elk,33
3
- thonnycontrib/thonny_codemate/__init__.py,sha256=I972dZtJ_Ds73y884hhj66QEaRyRrzCPzMuBn9l_PCA,13487
3
+ thonnycontrib/thonny_codemate/__init__.py,sha256=vslo9LDAl7QUJD5DAM6RjelXiu1_nIvLtS2FTzhskgU,13487
4
4
  thonnycontrib/thonny_codemate/api.py,sha256=YLXjPsB6cykgRwyjzrUBOGFtw0eu4BQgr1AiMbj8e7c,4259
5
5
  thonnycontrib/thonny_codemate/context_manager.py,sha256=K83M-VlBy7DR1xzedyPT8NViqnR9CmX95YmXnDBzRFM,11274
6
6
  thonnycontrib/thonny_codemate/external_providers.py,sha256=PmIRY_lLOILCAZa4mpP3yB9PU7ZWSddWjYPf2S7vkyY,29016
@@ -12,16 +12,16 @@ thonnycontrib/thonny_codemate/performance_monitor.py,sha256=L6gIin6oBzplRgZB676A
12
12
  thonnycontrib/thonny_codemate/prompts.py,sha256=bV4Qjr8SjqWBnnUIk-g-R58sRGbyZOauvlWvNO9GkGg,3885
13
13
  thonnycontrib/thonny_codemate/ui/__init__.py,sha256=SDKZ1vYdsb14_jHIP4wTeM8Vqkog8z0PkWquS3-mQIY,43
14
14
  thonnycontrib/thonny_codemate/ui/chat_view.py,sha256=veyFSCJUOPVFUt1qJochKTvHQi49u3fzxKQ0Nti0NNc,29203
15
- thonnycontrib/thonny_codemate/ui/chat_view_html.py,sha256=jgAeEc3dp2pcyfDfMg5RsTLROCHffNKFVlnMQNxFNrw,53561
15
+ thonnycontrib/thonny_codemate/ui/chat_view_html.py,sha256=86UFq4imEeYgPRU4QuXzKa_u2GG4GvoA9xQVpmLe7dg,53661
16
16
  thonnycontrib/thonny_codemate/ui/custom_prompt_dialog.py,sha256=LEemjMmHM_KcidEsUhOOffa1DzCauOXNiUqlH2wGjts,5973
17
17
  thonnycontrib/thonny_codemate/ui/markdown_renderer.py,sha256=K1vHLTn6EocPRxb7fXMKGsSFD6iY-OhFTqMY_dBkiRw,15649
18
18
  thonnycontrib/thonny_codemate/ui/model_download_dialog.py,sha256=1qzqCL_2J_cXCh9OvUdaPAyouBm76BgfyUlPRkNCDGw,13701
19
- thonnycontrib/thonny_codemate/ui/settings_dialog.py,sha256=fFbTfhFN-_rkI48oW_5eqCT91OzT1ZnqxCOaCSWvjbU,51147
19
+ thonnycontrib/thonny_codemate/ui/settings_dialog.py,sha256=dCET8EpZgrpbuGzh0MttGkfMOy-Dr6KWBA-PSrFUP2w,51212
20
20
  thonnycontrib/thonny_codemate/utils/__init__.py,sha256=xjA_6r7WFCf3RbCNnZhwFOSapJgcr-4lC3sTI417rDM,523
21
21
  thonnycontrib/thonny_codemate/utils/constants.py,sha256=l6KKItPClPy7IWZKH53Kpq-PNMfJogTYIZ2OGKTZO8w,3159
22
22
  thonnycontrib/thonny_codemate/utils/error_messages.py,sha256=kOucGfSwBIOE23GsVAIcQYY7YbKjezIuOxiIM1wTKY4,3601
23
23
  thonnycontrib/thonny_codemate/utils/unified_error_handler.py,sha256=yvrSiXC3Kzro4KLL6lDLMBRfdff79PLvBF1yjHFhv9E,10769
24
- thonny_codemate-0.1.2.dist-info/METADATA,sha256=NEuFXU-gfuVFhg8OWOa_YRTlpS3HPkTuSzpmqAl7yzM,10870
25
- thonny_codemate-0.1.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
26
- thonny_codemate-0.1.2.dist-info/top_level.txt,sha256=thF9WQtY_lcNKOOR4SQeeWLAVWb4i8XhdGC7pEMAOHY,14
27
- thonny_codemate-0.1.2.dist-info/RECORD,,
24
+ thonny_codemate-0.1.4.dist-info/METADATA,sha256=jHCA9FGbVa8l4HkHJuUJXPxePpPK7BuI_Jp-VmVplkU,10870
25
+ thonny_codemate-0.1.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
26
+ thonny_codemate-0.1.4.dist-info/top_level.txt,sha256=thF9WQtY_lcNKOOR4SQeeWLAVWb4i8XhdGC7pEMAOHY,14
27
+ thonny_codemate-0.1.4.dist-info/RECORD,,
@@ -31,7 +31,7 @@ logger = logging.getLogger(__name__)
31
31
  logger.disabled = True
32
32
 
33
33
  # プラグインのバージョン
34
- __version__ = "0.1.2"
34
+ __version__ = "0.1.4"
35
35
 
36
36
  # グローバル変数でプラグインの状態を管理
37
37
  _plugin_loaded = False
@@ -681,14 +681,12 @@ class LLMChatViewHTML(ttk.Frame):
681
681
  # 選択範囲がある場合
682
682
  start_line = int(text_widget.index("sel.first").split(".")[0])
683
683
  end_line = int(text_widget.index("sel.last").split(".")[0])
684
- file_name = Path(current_file).name if current_file else "Unknown"
684
+ file_name = Path(current_file).name if current_file else "Untitled"
685
685
  return f"Context: {file_name} (lines {start_line}-{end_line})"
686
- elif current_file:
687
- # ファイル全体の場合
688
- file_name = Path(current_file).name
686
+ else:
687
+ # ファイル全体の場合(未保存ファイルも含む)
688
+ file_name = Path(current_file).name if current_file else "Untitled"
689
689
  return f"Context: {file_name} (entire file)"
690
-
691
- return None
692
690
 
693
691
  def _format_display_message(self, message: str, context_info: Optional[str]) -> str:
694
692
  """表示用メッセージをフォーマット"""
@@ -834,10 +832,8 @@ Based on this context, {message}"""
834
832
  return self._format_selected_context(current_file, text_widget, selected_text)
835
833
 
836
834
  # 選択範囲がない場合はファイル全体
837
- if current_file:
838
- return self._format_full_file_context(current_file, text_widget)
839
-
840
- return None
835
+ # current_fileがなくても(未保存ファイル)エディタから内容を取得
836
+ return self._format_full_file_context(current_file, text_widget)
841
837
 
842
838
  def _get_selected_text(self, text_widget) -> Optional[str]:
843
839
  """選択されたテキストを取得"""
@@ -852,7 +848,7 @@ Based on this context, {message}"""
852
848
  selection_info = f"Selected lines: {start_line}-{end_line}"
853
849
 
854
850
  lang = self._detect_language(current_file)
855
- file_name = Path(current_file).name if current_file else 'Unknown'
851
+ file_name = Path(current_file).name if current_file else 'Untitled'
856
852
 
857
853
  return f"""File: {file_name}
858
854
  {selection_info}
@@ -868,7 +864,7 @@ Based on this context, {message}"""
868
864
  return None
869
865
 
870
866
  lang = self._detect_language(current_file)
871
- file_name = Path(current_file).name
867
+ file_name = Path(current_file).name if current_file else 'Untitled'
872
868
 
873
869
  return f"""File: {file_name}
874
870
  Full file content:
@@ -788,6 +788,8 @@ class SettingsDialog(tk.Toplevel):
788
788
 
789
789
  def _save_settings(self):
790
790
  """設定を保存"""
791
+ from ..utils.constants import ProviderConstants
792
+
791
793
  # 検証
792
794
  provider = self.provider_var.get()
793
795