CopilotHelpers.format.ps1xml
|
<?xml version="1.0" encoding="utf-8"?>
<Configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/PowerShell/PowerShell/master/src/Schemas/Format.xsd"> <ViewDefinitions> <!-- CopilotSession: Get-CopilotSession --> <View> <Name>CopilotSession</Name> <ViewSelectedBy> <TypeName>CopilotSession</TypeName> </ViewSelectedBy> <TableControl> <TableHeaders> <TableColumnHeader><Label>Id</Label><Width>10</Width></TableColumnHeader> <TableColumnHeader><Label>Summary</Label></TableColumnHeader> <TableColumnHeader><Label>UpdatedAt</Label><Width>20</Width></TableColumnHeader> <TableColumnHeader><Label>Events</Label><Width>7</Width><Alignment>Right</Alignment></TableColumnHeader> <TableColumnHeader><Label>Size</Label><Width>10</Width><Alignment>Right</Alignment></TableColumnHeader> </TableHeaders> <TableRowEntries> <TableRowEntry> <TableColumnItems> <TableColumnItem><ScriptBlock>$_.Id.Substring(0, [Math]::Min(8, $_.Id.Length))</ScriptBlock></TableColumnItem> <TableColumnItem><PropertyName>Summary</PropertyName></TableColumnItem> <TableColumnItem><ScriptBlock>if ($_.UpdatedAt) { $_.UpdatedAt.LocalDateTime.ToString('yyyy-MM-dd HH:mm') }</ScriptBlock></TableColumnItem> <TableColumnItem><PropertyName>EventCount</PropertyName></TableColumnItem> <TableColumnItem><ScriptBlock>if ($_.EventSize -ge 1MB) { '{0:N1} MB' -f ($_.EventSize / 1MB) } elseif ($_.EventSize -ge 1KB) { '{0:N0} KB' -f ($_.EventSize / 1KB) } else { '{0} B' -f $_.EventSize }</ScriptBlock></TableColumnItem> </TableColumnItems> </TableRowEntry> </TableRowEntries> </TableControl> </View> </ViewDefinitions> </Configuration> |