iT邦幫忙

2025 iThome 鐵人賽

DAY 6
0

完成後,我們還能做什麼?

APP 歷史紀錄

如果你已經把 APP 關閉,可以回到 Build 主頁面
https://ithelp.ithome.com.tw/upload/images/20250920/20176017FEOwfSA1DO.png
點 Your Apps
https://ithelp.ithome.com.tw/upload/images/20250920/20176017tccyxJqoCI.png

進入後的介面

https://ithelp.ithome.com.tw/upload/images/20250920/20176017tTIUCBK0Ma.png

標題列

https://ithelp.ithome.com.tw/upload/images/20250920/201760178TtRiXBcxw.png
可以改名、複製APP、下載下來與推送到 Github 與 直接使用 Google cloud 雲端部屬、分享 APP 與更改 API KEY

左側聊天視窗

如果你使用的是我的 Prompt 那你會看到他除了輸出檔案之外,還有輸出 Thought for 22 seconds ,點開後就會描述他大概做了什麼。
https://ithelp.ithome.com.tw/upload/images/20250920/20176017ntyP0UaPl3.png

每次對幫你設置 Checkpoint ,如果你害怕這個版本已經不錯,怕等等 AI 修改後直接回不來可以 Restore
https://ithelp.ithome.com.tw/upload/images/20250920/20176017JoqpHeSvUc.png

那最下方就是建議跟輸入框
https://ithelp.ithome.com.tw/upload/images/20250920/20176017pPPdnoBOIJ.png

右側預覽視窗

有分為 Preview 與 Code 兩種模式。

Preview 可以更改為電腦、平板、手機等觀看方式

Code 可以直接編輯程式碼
https://ithelp.ithome.com.tw/upload/images/20250920/20176017QPDNWD22mB.png
⬆️可以看到上方已經可以使用這個網頁了

調整細節

我們目標是需要一個 POC ,所以懶惰的我們可以不碰程式碼就不碰。
我們來到最左下方的建議跟輸入框,可以運用之前介紹的 Prompt 技巧,為他新增功能

運用”建議”

如果你還不太會撰寫提示詞,可以使用這個貼心設計,直接幫你打好提示詞
EX: 新增每小時預報
https://ithelp.ithome.com.tw/upload/images/20250920/20176017fvLk9Tardp.png

他就會輸出:
Modify the geminiService.ts to request and parse hourly weather data, and update the types.ts to include an HourlyForecast interface. Then, create a new HourlyForecastCard.tsx component and integrate it into App.tsx to display hourly weather.

大概的意思就是:
修改 geminiService.ts 文件,用於請求並解析每小時天氣數據,並更新 types.ts 文件,使其包含 HourlyForecast 介面。然後,建立一個新的 HourlyForecastCard.tsx 元件,並將其整合到 App.tsx 中,用於顯示每小時天氣資料。

可以看到他已經幫我完成了 ⬇️
https://ithelp.ithome.com.tw/upload/images/20250920/201760174ir9zBMrRZ.png

運用”提示詞”

可以發現他給的知識完全不是最新知識
我們可以使用 “21字黃金法則“ 來簡單新增功能
https://www.bnext.com.tw/article/84076/ai-prompt-gemini-for-workspace

作者整理的技巧如下:

  • 使用自然語言就好,想像是在跟人說話。
  • 講話要具體,且反覆說明你的需求。
  • 務必用動詞來清楚表達任務需求。
  • 盡可能提供充足的背景資訊。
  • 用語簡潔,不要太複雜或用太多行話。
  • 不要覺得自己是在下指令,而是在「對話」。
  • 不要用一個 prompt 執行多個任務,拆開來。

我的提示詞:
請使用天氣或地圖 MCP ,找尋最新的天氣資料。完成更新資料,讓使用者可以看到最新資訊。

注意!
如果出現錯誤可以直接按自動修復按鈕,可以解決大部分的問題
完成:
https://ithelp.ithome.com.tw/upload/images/20250920/20176017k5Cz2YY3C7.png

可以確認未來三天時間是對的
https://ithelp.ithome.com.tw/upload/images/20250920/20176017sVOdzPYXbO.png


上一篇
Day 5 - 在 Google AI Studio 量產天氣 Web APP Part1
系列文
Android 不會只更新 UI ! 用 Vibe Coding ? 加速打造 Al-native App6
圖片
  熱門推薦
圖片
{{ item.channelVendor }} | {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

尚未有邦友留言

立即登入留言