Skip to content

Commit b277e45

Browse files
committed
refactor(hub): drop redundant Full-Mode Mod demo tab; label the collapsed Hub chip
The Full-Mode Mod page overlapped the live Mods tab and only half-worked unless Full Lua access was enabled on the scope, so it read as a broken tab. Removed its registration, the page class, and the now-unused source override field/helper on FullAccessHubDemoController. Collapsed Hub now shows a 'CoreAI' brand label beside the restore button instead of a blank dark bar with a lone floating '+'. Bump to 6.1.1.
1 parent cfc767d commit b277e45

12 files changed

Lines changed: 47 additions & 394 deletions

File tree

Assets/CoreAI.Demos/FullAccess/Scripts/FullAccessHubDemoController.cs

Lines changed: 0 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -36,19 +36,11 @@ public sealed class FullAccessHubDemoController : MonoBehaviour
3636
[SerializeField]
3737
private LuaPlatformExampleController luaPlatformDriver;
3838

39-
40-
[Tooltip("Optional Lua source override for the Full-mode mod. Uses the embedded default when unset.")]
41-
[SerializeField]
42-
private TextAsset fullModeModSourceOverride;
43-
4439
[Tooltip("Backend config asset edited by the Settings tab (Base URL / API key / model). " +
4540
"This is the UITK replacement for the old CoreAiBackendPanel.")]
4641
[SerializeField]
4742
private CoreAiChatConfig chatConfig;
4843

49-
private ILuaModRuntime _modsRuntime;
50-
private bool _modsResolved;
51-
5244
/// <summary>The registry created and owned by this host.</summary>
5345
public HubPageRegistry Registry { get; private set; }
5446

@@ -61,10 +53,6 @@ private void Awake()
6153
FullAccessInfoHubPage.DefaultPageId,
6254
() => new FullAccessInfoHubPage(() => targetCube),
6355
0);
64-
Registry.Register(
65-
FullModeModHubPage.DefaultPageId,
66-
() => new FullModeModHubPage(ResolveModsRuntime, () => targetCube, ModSourceOverrideText()),
67-
10);
6856
Registry.Register(
6957
LuaPlatformHubPage.DefaultPageId,
7058
() => new LuaPlatformHubPage(ResolveDriver),
@@ -185,37 +173,6 @@ private IEnumerator EnableAgentDropdownWhenReady()
185173
}
186174
}
187175

188-
private ILuaModRuntime ResolveModsRuntime()
189-
{
190-
if (_modsResolved)
191-
{
192-
return _modsRuntime;
193-
}
194-
195-
_modsResolved = true;
196-
try
197-
{
198-
if (coreAiScope == null)
199-
{
200-
coreAiScope = FindFirstObjectByType<CoreAILifetimeScope>();
201-
}
202-
203-
if (coreAiScope == null || coreAiScope.Container == null)
204-
{
205-
return null;
206-
}
207-
208-
_modsRuntime = CoreAiDemoScope.ResolveModsContainer(coreAiScope).Resolve<ILuaModRuntime>();
209-
}
210-
catch (Exception ex)
211-
{
212-
Debug.LogWarning($"[FullAccessHubDemo] Failed to resolve mods runtime: {ex.Message}");
213-
_modsRuntime = null;
214-
}
215-
216-
return _modsRuntime;
217-
}
218-
219176
private T ResolveFromCore<T>() where T : class
220177
{
221178
try
@@ -245,13 +202,6 @@ private LuaPlatformExampleController ResolveDriver()
245202
return luaPlatformDriver;
246203
}
247204

248-
private string ModSourceOverrideText()
249-
{
250-
return fullModeModSourceOverride != null && !string.IsNullOrWhiteSpace(fullModeModSourceOverride.text)
251-
? fullModeModSourceOverride.text
252-
: null;
253-
}
254-
255205
private static T TryResolve<T>(IObjectResolver container) where T : class
256206
{
257207
try

0 commit comments

Comments
 (0)