iT邦幫忙

2025 iThome 鐵人賽

DAY 11
0

今天開始將IPlugin的實現部份和AssemblyContextLoad進行接合,說接合,其實也就是在來回和AI溝通到底要怎麼樣進行。

Class: DungeonPlugin implementing IPlugin and IRuntimePlugin (optional runtime loop interface)
	- File: src/ConsoleGame.Dungeon.Plugin/DungeonPlugin.cs
	- TUI loop with Terminal.Gui
	- Reactive heartbeat with Observable.Interval updating the view
	- Uses ReactiveUI’s main thread scheduler and disposables

專案主要分成三個部份

  • exe project
  • shred lib project
  • lib project(gameplay)

當console app啓動時會經由plugin系統進行讀取gameply dll進入到console app裡,而所有的功能和TUI都先放在這個gameplay dlll裡,以確定載入是可行的。這個載入的方向很明確的和Agent進行溝通,然而在實現的過程中仍是出現很多錯誤,就算是Agent,現今也沒有辦法一步到位。在大方向上來說,可以快速的整出看似有模有樣的程式碼,但細節就只能一直慢慢修到對。

ConsoleGame.App – AssemblyLoadContext demo
Primary: Hello from ConsoleGame.App | Loaded: Hello from ConsoleGame.App | Contexts: primary=Default, copy=SelfCopyContext
Using plugin from env: ConsoleGame.Dungeon.Plugin.dll
Runtime plugin error: NullReferenceException: Object reference not set to an instance of an object.

有時候一個來回修正,都要花去好幾分鐘的時間。也不知道按照GitHub Copilot的算法,是用掉了幾個premium request,但終究是可以修正好的。所以再久,也都會一直讓它一直做下去。只希望premium request不會用的太誇張。


上一篇
Not again
系列文
Before AI dominate the world, AI dominate my world11
圖片
  熱門推薦
圖片
{{ item.channelVendor }} | {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

尚未有邦友留言

立即登入留言