AIコードエディタ Cursor を使ってみた

4.1K Views

November 30, 23

スライド概要

2023-11-29 すごい広島IT初心者の会
西本 卓也 @nishimotz / @24motz
Shuaruta Inc.

profile-image

Shuaruta Inc. ウェブアクセシビリティ基盤委員会 (WAIC) NVDA日本語版 すごい広島 IT初心者の会 YAPC::Hiroshima 2024

シェア

またはPlayer版

埋め込む »CMSなどでJSが使えない場合

関連スライド

各ページのテキスト
1.

AIコードエディタ Cursor を使ってみた 2023-11-29 すごい広島IT初心者の会 西本 卓也 @nishimotz / @24motz Shuaruta Inc. 1

2.

YAPC::Hiroshima 2024 • 2024年2月10日とその前後 • 学生は無料(要チケット) 2

3.

はんなりポッドキャスト #14 3

4.

https://cursor.sh/ • アカウントを作成、チャットの言語に日本語を選択 4

6.

www.nvda.jp 6

7.

NVDA日本語版の開発 • 本家版の派生リポジトリを保守している • 本家版 master ブランチが更新されたら • 日本語版 alphajp にマージ • 衝突したら修正 • 実行して不具合を把握したら修正 • 本家 master ブランチが beta にマージされたら • 日本語版 betajp ブランチ • 上書き push で更新することもある(失敗もある) • 日本語版のリリースは releasejp ブランチ • WinMerge でファイルレベルの差分も確認している 7

8.

ログに警告が出ている INFO - __main__ (10:46:06.564) - MainThread (27864): Starting NVDA version jpalpha_231127j WARNING - bdDetect.__getattr__ (10:46:07.139) - MainThread (27864): KEY_SERIAL is deprecated. Use bdDetect.DeviceType.SERIAL instead. 8

9.

ソースコードを cursor で開く 9

10.

当該ファイルを開いてログを入力 • 問題の箇所はログが指摘した箇所ではない • 検索で探すと別のモジュールが見つかった 10

11.

ファイルを開いて事実を伝える 11

12.

こう直せと言われる 12

13.
[beta]
ログのエラーをさらに伝える
ERROR - unhandled exception (10:46:21.008) - MainThread (27864):
Traceback (most recent call last):
File "brailleViewer\brailleViewerGui.pyc", line 321, in <lambda>
File "brailleViewer\brailleViewerGui.pyc", line 513, in _updateGui
File "brailleViewer\brailleViewerGui.pyc", line 192, in updateControls
File "brailleViewer\brailleViewerGui.pyc", line 103, in update
TypeError: Colour(): arguments did not match any overloaded call:
overload 1: too many arguments
overload 2: argument 1 has unexpected type 'float'
overload 3: argument 1 has unexpected type 'float'
overload 4: argument 1 has unexpected type 'float'

• brailleViewerGui.py を開いておく

13

14.

問題のあるコードが引用される • 該当箇所を見つけてくれた 14

16.

選択範囲を説明 16

17.

現在のファイルの概要 17

18.

コミットのコメントを英語で書きたい 18

19.

出てきたコメント git commit -m "Fix TypeError in CharCellBackgroundColorAnimation This commit fixes a TypeError in the update method of the CharCellBackgroundColorAnimation class. The error was caused by passing float values to the wx.Colour constructor, which expects integer values. The fix involves converting the float values to integers before passing them to the wx.Colour constructor." 19

20.

正しく動くようになった 20

21.

現在のコードの説明 21

22.

改善を提案 • Current file に対して行われる 22

23.

GitHub Copilot Chat だとどうなのか • 修正後のコードが同じように出てきた 23

24.

修正箇所を特定できない 24

25.

表示されている範囲だけで考察? 25

26.

考察 • 事実を伝えるか要望するか • GitHub Copilot Chat よりも • 提案が上手なことがある • ファイル全体を把握 • メッセージが簡潔 • Cursorをどう使うか • プライバシー、セキュリティを確認すること • しばらくオープンソースプロジェクトで評価 26