[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["缺少我需要的資訊","missingTheInformationINeed","thumb-down"],["過於複雜/步驟過多","tooComplicatedTooManySteps","thumb-down"],["過時","outOfDate","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["示例/程式碼問題","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-07-31 (世界標準時間)。"],[],[],null,["# Transform code\n\nYou can prompt Gemini from the code editor for code suggestions to modify,\noptimize, or add code to your app as follows:\n\n1. To get the prompt input field, do one of the following from the code editor:\n - Right-click in the code editor and select **Gemini \\\u003e Generate code** from the context menu.\n - Highlight code that you want Gemini to modify, right-click in the code editor, and select **Gemini \\\u003e Transform code** from the context menu.\n - Press \u003ckbd\u003eCTRL+\\\u003c/kbd\u003e (\u003ckbd\u003eCommand+\\\u003c/kbd\u003e on macOS).\n2. Prompt Gemini by describing how you want to modify or add to your code and press \u003ckbd\u003eEnter\u003c/kbd\u003e. After Gemini processes your request, you should see a code diff. With the code diff, you can review and accept only the suggestions you want.\n3. Review the code diff and do one of the following:\n\n - Further modify the suggested code by clicking **Refine** and entering a new prompt.\n - Click **Accept Changes** to add the suggested changes to your code.\n\nThings to try:\n\n- \"Simplify this code\"\n- \"Make this code idiomatic\"\n- \"Generate a new function that does \\\u003cdescription\\\u003e\"\n- \"Add documentation for this code\""]]