Skip to content

Commit c7f7b66

Browse files
committed
style: Rider Reformat & Cleanup Code pass across the codebase
Whitespace/formatting normalization from Rider's reformat (no logic changes); compiles clean. Attribute-per-line splitting and comment labeling follow in the next commit.
1 parent c12fb3a commit c7f7b66

179 files changed

Lines changed: 1289 additions & 1057 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Assets/CoreAI.Demos/DirectorAi/Scripts/DirectorAiDemoController.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,10 @@ public sealed class DirectorAiDemoController : MonoBehaviour
4848
[Tooltip("Hard cap on director requests within any rolling 60s window. 0 = uncapped.")] [SerializeField]
4949
private int maxActionsPerMinute = 3;
5050

51-
[Tooltip("Optional tags whose object counts are added to every observation (must exist in the Tag Manager), e.g. Enemy, Pickup.")]
51+
[Tooltip(
52+
"Optional tags whose object counts are added to every observation (must exist in the Tag Manager), e.g. Enemy, Pickup.")]
5253
[SerializeField]
53-
private string[] trackedTags = System.Array.Empty<string>();
54+
private string[] trackedTags = Array.Empty<string>();
5455

5556
private AgentConfig _director;
5657
private readonly Queue<float> _recentRequestTimes = new();
@@ -340,4 +341,4 @@ private void Start()
340341
}
341342
#endif
342343
}
343-
}
344+
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,11 @@ private void Start()
5151

5252
private System.Collections.IEnumerator EnableAgentDropdownWhenReady()
5353
{
54-
CoreAI.Chat.CoreAiChatPanel panel = null;
54+
Chat.CoreAiChatPanel panel = null;
5555
float deadline = Time.realtimeSinceStartup + 5f;
5656
while (Time.realtimeSinceStartup < deadline)
5757
{
58-
panel = FindFirstObjectByType<CoreAI.Chat.CoreAiChatPanel>(FindObjectsInactive.Include);
58+
panel = FindFirstObjectByType<Chat.CoreAiChatPanel>(FindObjectsInactive.Include);
5959
if (panel != null)
6060
{
6161
break;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ private void Start()
111111

112112
_mods = luaContainer.Resolve<ILuaModRuntime>();
113113
_mods.ModReportEmitted += OnModReport;
114-
_status = CoreAI.Ai.LuaCs.LuaCsModRuntime.IsSupported
114+
_status = Ai.LuaCs.LuaCsModRuntime.IsSupported
115115
? "Ready. Load the Full-mode mod to start."
116116
: "Lua sandbox is not supported on this platform.";
117117
}

Assets/CoreAI.Demos/LiveMechanicsMods/Scripts/WaveAutoBattlerModsDemoController.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,6 @@ private void OnDestroy()
102102
_mods.ModSourceLoaded -= OnModsChanged;
103103
_mods.ModSourceUnloaded -= OnModsChanged;
104104
}
105-
106105
}
107106

108107
private void OnModsChanged(string modId, string source, LuaCapabilities capabilities)
@@ -475,4 +474,4 @@ private void Start()
475474
}
476475
#endif
477476
}
478-
}
477+
}

Assets/CoreAI.Demos/LuaMods/Scripts/LuaModsDemoController.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ private void Start()
5959
_slots = luaContainer.Resolve<LuaCsLogicSlots>();
6060
_slots.DeclareSlot(DamageSlot);
6161
_mods.ModEventEmitted += OnModEvent;
62-
_status = CoreAI.Ai.LuaCs.LuaCsModRuntime.IsSupported
62+
_status = LuaCsModRuntime.IsSupported
6363
? "Ready. Load a mod to start."
6464
: "Lua sandbox is not supported on this platform.";
6565
}

Assets/CoreAI.Demos/Shared/Scripts/CoreAiDemoScope.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,4 @@ public static ILuaModRuntime ResolveModsRuntime(CoreAILifetimeScope coreAiScope)
4040
}
4141
}
4242
}
43-
#endif
43+
#endif

Assets/CoreAI.Demos/WebGlLuaSelfTest/WebGlLuaSelfTest.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,10 @@ void Check(string name, Func<bool> body)
8787

8888
// ExecuteAsync completes synchronously (RunChunk drives the VM under a guard and returns a
8989
// finished Task), so blocking here cannot deadlock — there is no async continuation to await.
90-
LuaTool.LuaResult Run(string code) =>
91-
executor.ExecuteAsync(code, CancellationToken.None).GetAwaiter().GetResult();
90+
LuaTool.LuaResult Run(string code)
91+
{
92+
return executor.ExecuteAsync(code, CancellationToken.None).GetAwaiter().GetResult();
93+
}
9294

9395
Check("host callback marshalling (host_add(2,3) == 5)", () =>
9496
{
@@ -144,4 +146,4 @@ private void OnGUI()
144146
}
145147
}
146148
}
147-
#endif
149+
#endif

Assets/CoreAI/Runtime/Core/Audit/AuditContext.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,4 @@ public static void Cleanup(string traceId)
4242
}
4343
}
4444
}
45-
}
45+
}

Assets/CoreAI/Runtime/Core/Audit/AuditEntry.cs

Lines changed: 71 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -85,15 +85,11 @@ public AuditEntry(
8585
public string RollbackHandle { get; }
8686
public string SourceTag { get; }
8787

88-
[JsonIgnore]
89-
public string PrevHash { get; }
90-
[JsonIgnore]
91-
public string Hash { get; }
88+
[JsonIgnore] public string PrevHash { get; }
89+
[JsonIgnore] public string Hash { get; }
9290

93-
[JsonProperty("prevHash")]
94-
private string PrevHashForSerialization => PrevHash;
95-
[JsonProperty("hash")]
96-
private string HashForSerialization => Hash;
91+
[JsonProperty("prevHash")] private string PrevHashForSerialization => PrevHash;
92+
[JsonProperty("hash")] private string HashForSerialization => Hash;
9793

9894
/// <summary>
9995
/// Returns a copy of this entry with only the <see cref="Hash"/> field changed — used to
@@ -103,24 +99,24 @@ public AuditEntry(
10399
public AuditEntry WithHash(string hash)
104100
{
105101
return new AuditEntry(
106-
seq: Seq,
107-
kind: Kind,
108-
traceId: TraceId,
109-
actor: Actor,
110-
model: Model,
111-
promptHash: PromptHash,
112-
toolName: ToolName,
113-
args: Args,
114-
policyDecision: PolicyDecision,
115-
result: Result,
116-
resultDetail: ResultDetail,
117-
durationMs: DurationMs,
118-
worldDiff: WorldDiff,
119-
rollbackHandle: RollbackHandle,
120-
prevHash: PrevHash,
121-
hash: hash,
122-
sourceTag: SourceTag,
123-
ts: Ts);
102+
Seq,
103+
Kind,
104+
TraceId,
105+
Actor,
106+
Model,
107+
PromptHash,
108+
ToolName,
109+
Args,
110+
PolicyDecision,
111+
Result,
112+
ResultDetail,
113+
DurationMs,
114+
WorldDiff,
115+
RollbackHandle,
116+
PrevHash,
117+
hash,
118+
SourceTag,
119+
Ts);
124120
}
125121

126122
public static AuditEntry ForToolCall(
@@ -137,18 +133,18 @@ public static AuditEntry ForToolCall(
137133
double durationMs)
138134
{
139135
return new AuditEntry(
140-
seq: seq,
141-
kind: AuditEntryKind.ToolCall,
142-
traceId: traceId,
143-
actor: actor,
144-
model: model,
145-
promptHash: promptHash,
146-
toolName: toolName,
147-
args: args,
148-
policyDecision: policyDecision,
149-
result: result,
150-
resultDetail: resultDetail,
151-
durationMs: durationMs);
136+
seq,
137+
AuditEntryKind.ToolCall,
138+
traceId,
139+
actor,
140+
model,
141+
promptHash,
142+
toolName,
143+
args,
144+
policyDecision,
145+
result,
146+
resultDetail,
147+
durationMs);
152148
}
153149

154150
public static AuditEntry ForWorldMutation(
@@ -163,10 +159,10 @@ public static AuditEntry ForWorldMutation(
163159
string rollbackHandle = "")
164160
{
165161
return new AuditEntry(
166-
seq: seq,
167-
kind: AuditEntryKind.WorldMutation,
168-
traceId: traceId,
169-
actor: actor,
162+
seq,
163+
AuditEntryKind.WorldMutation,
164+
traceId,
165+
actor,
170166
toolName: commandTypeId,
171167
args: jsonPayload,
172168
policyDecision: success ? "allowed" : "failed",
@@ -186,12 +182,12 @@ public static AuditEntry ForLlmRequest(
186182
bool streaming)
187183
{
188184
return new AuditEntry(
189-
seq: seq,
190-
kind: AuditEntryKind.LlmRequest,
191-
traceId: traceId,
192-
actor: actor,
193-
model: model,
194-
promptHash: promptHash,
185+
seq,
186+
AuditEntryKind.LlmRequest,
187+
traceId,
188+
actor,
189+
model,
190+
promptHash,
195191
args: $"{{\"routingProfile\":\"{routingProfileId}\",\"streaming\":{streaming}}}",
196192
policyDecision: "started",
197193
result: "pending");
@@ -207,12 +203,12 @@ public static AuditEntry ForLlmResponse(
207203
string error)
208204
{
209205
return new AuditEntry(
210-
seq: seq,
211-
kind: AuditEntryKind.LlmResponse,
212-
traceId: traceId,
213-
actor: actor,
214-
model: model,
215-
promptHash: promptHash,
206+
seq,
207+
AuditEntryKind.LlmResponse,
208+
traceId,
209+
actor,
210+
model,
211+
promptHash,
216212
policyDecision: success ? "completed" : "failed",
217213
result: success ? "ok" : "error",
218214
resultDetail: error);
@@ -226,10 +222,10 @@ public static AuditEntry ForLlmResponse(
226222
public static AuditEntry ForChainReset(long seq, string actor, string reason)
227223
{
228224
return new AuditEntry(
229-
seq: seq,
230-
kind: AuditEntryKind.ChainReset,
231-
traceId: "",
232-
actor: actor,
225+
seq,
226+
AuditEntryKind.ChainReset,
227+
"",
228+
actor,
233229
policyDecision: "reset",
234230
result: "error",
235231
resultDetail: reason ?? "");
@@ -243,10 +239,10 @@ public static AuditEntry ForChainReset(long seq, string actor, string reason)
243239
public static AuditEntry ForRotationMarker(long seq, string actor, string prevHash)
244240
{
245241
return new AuditEntry(
246-
seq: seq,
247-
kind: AuditEntryKind.RotationMarker,
248-
traceId: "",
249-
actor: actor,
242+
seq,
243+
AuditEntryKind.RotationMarker,
244+
"",
245+
actor,
250246
policyDecision: "rotated",
251247
result: "ok",
252248
prevHash: prevHash);
@@ -257,15 +253,17 @@ public static AuditEntry ForRotationMarker(long seq, string actor, string prevHa
257253
/// file's final hash (not the empty-string genesis), so the link between files is embedded
258254
/// directly in the chain rather than only in <paramref name="previousFileHash"/> metadata.
259255
/// </summary>
260-
public static AuditEntry ForRotationAnchor(long seq, string actor, string previousFileName, string previousFileHash)
256+
public static AuditEntry ForRotationAnchor(long seq, string actor, string previousFileName,
257+
string previousFileHash)
261258
{
262259
return new AuditEntry(
263-
seq: seq,
264-
kind: AuditEntryKind.RotationAnchor,
265-
traceId: "",
266-
actor: actor,
260+
seq,
261+
AuditEntryKind.RotationAnchor,
262+
"",
263+
actor,
267264
toolName: previousFileName ?? "",
268-
args: JsonConvert.SerializeObject(new { previousFile = previousFileName ?? "", previousHash = previousFileHash ?? "" }),
265+
args: JsonConvert.SerializeObject(new
266+
{ previousFile = previousFileName ?? "", previousHash = previousFileHash ?? "" }),
269267
policyDecision: "anchored",
270268
result: "ok",
271269
prevHash: previousFileHash);
@@ -278,13 +276,13 @@ public static AuditEntry ForRotationAnchor(long seq, string actor, string previo
278276
public static AuditEntry ForQueueDropped(long seq, string actor, long droppedCount)
279277
{
280278
return new AuditEntry(
281-
seq: seq,
282-
kind: AuditEntryKind.QueueDropped,
283-
traceId: "",
284-
actor: actor,
279+
seq,
280+
AuditEntryKind.QueueDropped,
281+
"",
282+
actor,
285283
policyDecision: "backpressure",
286284
result: "dropped",
287285
resultDetail: $"entries dropped: {droppedCount}");
288286
}
289287
}
290-
}
288+
}

Assets/CoreAI/Runtime/Core/Audit/AuditHash.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,4 @@ private static char HexChar(int nibble)
4141
return (char)(nibble < 10 ? '0' + nibble : 'a' + nibble - 10);
4242
}
4343
}
44-
}
44+
}

0 commit comments

Comments
 (0)