mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-15 07:04:45 +00:00
Release v0.8.3
This commit is contained in:
parent
85adcf22bf
commit
aa46dfecd4
19 changed files with 1156 additions and 2545 deletions
33
debug_session.lldb
Normal file
33
debug_session.lldb
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
# Set breakpoint at main
|
||||
b main
|
||||
# Run the program
|
||||
run
|
||||
# Step through to see what happens
|
||||
n
|
||||
n
|
||||
n
|
||||
n
|
||||
n
|
||||
n
|
||||
n
|
||||
n
|
||||
n
|
||||
n
|
||||
n
|
||||
n
|
||||
n
|
||||
# Now we're in the loop - let's examine the students array
|
||||
p num_students
|
||||
p students[0]
|
||||
p students[1]
|
||||
p students[2]
|
||||
# Continue to the crash
|
||||
c
|
||||
# When it crashes, show backtrace
|
||||
bt
|
||||
# Examine the frame
|
||||
frame variable
|
||||
# Look at what students[i] is when it crashes
|
||||
p i
|
||||
p students[i]
|
||||
quit
|
||||
479
out.html
Normal file
479
out.html
Normal file
File diff suppressed because one or more lines are too long
3008
package-lock.json
generated
3008
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
|
@ -22,7 +22,7 @@
|
|||
"prepare": "husky"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@biomejs/biome": "^2.3.5",
|
||||
"@biomejs/biome": "2.3.5",
|
||||
"@types/node": "^22.10.5",
|
||||
"@typescript/native-preview": "^7.0.0-dev.20251111.1",
|
||||
"concurrently": "^9.2.1",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@mariozechner/pi-agent",
|
||||
"version": "0.8.0",
|
||||
"version": "0.8.3",
|
||||
"description": "General-purpose agent with transport abstraction, state management, and attachment support",
|
||||
"type": "module",
|
||||
"main": "./dist/index.js",
|
||||
|
|
@ -18,8 +18,8 @@
|
|||
"prepublishOnly": "npm run clean && npm run build"
|
||||
},
|
||||
"dependencies": {
|
||||
"@mariozechner/pi-ai": "^0.8.0",
|
||||
"@mariozechner/pi-tui": "^0.8.0"
|
||||
"@mariozechner/pi-ai": "^0.8.3",
|
||||
"@mariozechner/pi-tui": "^0.8.3"
|
||||
},
|
||||
"keywords": [
|
||||
"ai",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@mariozechner/pi-ai",
|
||||
"version": "0.8.0",
|
||||
"version": "0.8.3",
|
||||
"description": "Unified LLM API with automatic model discovery and provider configuration",
|
||||
"type": "module",
|
||||
"main": "./dist/index.js",
|
||||
|
|
|
|||
|
|
@ -2,6 +2,13 @@
|
|||
|
||||
## [Unreleased]
|
||||
|
||||
## [0.8.3] - 2025-11-21
|
||||
|
||||
### Improved
|
||||
|
||||
- **Export HTML**: Limited container width to 700px for better readability. Fixed message statistics to match `/session` command output with proper breakdown of User/Assistant/Tool Calls/Tool Results/Total messages.
|
||||
- **Dark Theme**: Increased visibility of editor border (darkGray from #303030 to #505050) and thinking minimal indicator (from #4e4e4e to #6e6e6e).
|
||||
|
||||
## [0.8.0] - 2025-11-21
|
||||
|
||||
### Added
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@mariozechner/pi-coding-agent",
|
||||
"version": "0.8.0",
|
||||
"version": "0.8.3",
|
||||
"description": "Coding agent CLI with read, bash, edit, write tools and session management",
|
||||
"type": "module",
|
||||
"bin": {
|
||||
|
|
@ -22,8 +22,9 @@
|
|||
"prepublishOnly": "npm run clean && npm run build"
|
||||
},
|
||||
"dependencies": {
|
||||
"@mariozechner/pi-agent": "^0.8.0",
|
||||
"@mariozechner/pi-ai": "^0.8.0",
|
||||
"@mariozechner/pi-agent": "^0.8.3",
|
||||
"@mariozechner/pi-ai": "^0.8.3",
|
||||
"@mariozechner/pi-tui": "^0.8.3",
|
||||
"chalk": "^5.5.0",
|
||||
"diff": "^8.0.2",
|
||||
"glob": "^11.0.3"
|
||||
|
|
|
|||
|
|
@ -340,6 +340,21 @@ export function exportSessionToHtml(sessionManager: SessionManager, state: Agent
|
|||
}
|
||||
}
|
||||
|
||||
// Calculate message stats (matching session command)
|
||||
const userMessages = messages.filter((m) => m.role === "user").length;
|
||||
const assistantMessages = messages.filter((m) => m.role === "assistant").length;
|
||||
const toolResultMessages = messages.filter((m) => m.role === "toolResult").length;
|
||||
const totalMessages = messages.length;
|
||||
|
||||
// Count tool calls from assistant messages
|
||||
let toolCallsCount = 0;
|
||||
for (const message of messages) {
|
||||
if (message.role === "assistant") {
|
||||
const assistantMsg = message as AssistantMessage;
|
||||
toolCallsCount += assistantMsg.content.filter((c) => c.type === "toolCall").length;
|
||||
}
|
||||
}
|
||||
|
||||
// Generate messages HTML
|
||||
let messagesHtml = "";
|
||||
for (const message of messages) {
|
||||
|
|
@ -373,7 +388,7 @@ export function exportSessionToHtml(sessionManager: SessionManager, state: Agent
|
|||
}
|
||||
|
||||
.container {
|
||||
max-width: 1200px;
|
||||
max-width: 700px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
|
|
@ -631,9 +646,31 @@ export function exportSessionToHtml(sessionManager: SessionManager, state: Agent
|
|||
<span class="info-label">Model:</span>
|
||||
<span class="info-value">${escapeHtml(sessionHeader?.model || state.model.id)}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="header">
|
||||
<h1>Messages</h1>
|
||||
<div class="header-info">
|
||||
<div class="info-item">
|
||||
<span class="info-label">Messages:</span>
|
||||
<span class="info-value">${messages.filter((m) => m.role !== "toolResult").length}</span>
|
||||
<span class="info-label">User:</span>
|
||||
<span class="info-value">${userMessages}</span>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<span class="info-label">Assistant:</span>
|
||||
<span class="info-value">${assistantMessages}</span>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<span class="info-label">Tool Calls:</span>
|
||||
<span class="info-value">${toolCallsCount}</span>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<span class="info-label">Tool Results:</span>
|
||||
<span class="info-value">${toolResultMessages}</span>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<span class="info-label">Total:</span>
|
||||
<span class="info-value">${totalMessages}</span>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<span class="info-label">Directory:</span>
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
"yellow": "#ffff00",
|
||||
"gray": "#808080",
|
||||
"dimGray": "#666666",
|
||||
"darkGray": "#303030",
|
||||
"darkGray": "#505050",
|
||||
"accent": "#8abeb7",
|
||||
"userMsgBg": "#343541",
|
||||
"toolPendingBg": "#282832",
|
||||
|
|
@ -62,7 +62,7 @@
|
|||
"syntaxPunctuation": "gray",
|
||||
|
||||
"thinkingOff": "darkGray",
|
||||
"thinkingMinimal": "#4e4e4e",
|
||||
"thinkingMinimal": "#6e6e6e",
|
||||
"thinkingLow": "#5f87af",
|
||||
"thinkingMedium": "#81a2be",
|
||||
"thinkingHigh": "#b294bb"
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@mariozechner/pi",
|
||||
"version": "0.8.0",
|
||||
"version": "0.8.3",
|
||||
"description": "CLI tool for managing vLLM deployments on GPU pods",
|
||||
"type": "module",
|
||||
"bin": {
|
||||
|
|
@ -34,7 +34,7 @@
|
|||
"node": ">=20.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@mariozechner/pi-agent": "^0.8.0",
|
||||
"@mariozechner/pi-agent": "^0.8.3",
|
||||
"chalk": "^5.5.0"
|
||||
},
|
||||
"devDependencies": {}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@mariozechner/pi-proxy",
|
||||
"version": "0.8.0",
|
||||
"version": "0.8.3",
|
||||
"type": "module",
|
||||
"description": "CORS and authentication proxy for pi-ai",
|
||||
"main": "dist/index.js",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@mariozechner/pi-tui",
|
||||
"version": "0.8.0",
|
||||
"version": "0.8.3",
|
||||
"description": "Terminal User Interface library with differential rendering for efficient text-based applications",
|
||||
"type": "module",
|
||||
"main": "dist/index.js",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@mariozechner/pi-web-ui",
|
||||
"version": "0.8.0",
|
||||
"version": "0.8.3",
|
||||
"description": "Reusable web UI components for AI chat interfaces powered by @mariozechner/pi-ai",
|
||||
"type": "module",
|
||||
"main": "dist/index.js",
|
||||
|
|
@ -18,8 +18,8 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"@lmstudio/sdk": "^1.5.0",
|
||||
"@mariozechner/pi-ai": "^0.8.0",
|
||||
"@mariozechner/pi-tui": "^0.8.0",
|
||||
"@mariozechner/pi-ai": "^0.8.3",
|
||||
"@mariozechner/pi-tui": "^0.8.3",
|
||||
"docx-preview": "^0.3.7",
|
||||
"jszip": "^3.10.1",
|
||||
"lucide": "^0.544.0",
|
||||
|
|
|
|||
BIN
test
Executable file
BIN
test
Executable file
Binary file not shown.
73
test.c
Normal file
73
test.c
Normal file
|
|
@ -0,0 +1,73 @@
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
typedef struct {
|
||||
char *name;
|
||||
int age;
|
||||
int *scores;
|
||||
} Student;
|
||||
|
||||
Student* create_student(const char *name, int age, int num_scores) {
|
||||
Student *s = malloc(sizeof(Student));
|
||||
s->name = malloc(strlen(name)); // Bug 1: Missing +1 for null terminator
|
||||
strcpy(s->name, name);
|
||||
s->age = age;
|
||||
s->scores = malloc(num_scores * sizeof(int));
|
||||
return s;
|
||||
}
|
||||
|
||||
void print_student(Student *s, int num_scores) {
|
||||
printf("Name: %s, Age: %d\n", s->name, s->age);
|
||||
printf("Scores: ");
|
||||
for (int i = 0; i <= num_scores; i++) { // Bug 2: Off-by-one error (should be <)
|
||||
printf("%d ", s->scores[i]);
|
||||
}
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
double calculate_average(int *scores, int count) {
|
||||
int sum = 0;
|
||||
for (int i = 0; i < count; i++) {
|
||||
sum += scores[i];
|
||||
}
|
||||
return sum / count; // Bug 3: Integer division instead of floating point
|
||||
}
|
||||
|
||||
void free_student(Student *s) {
|
||||
free(s->name);
|
||||
free(s->scores);
|
||||
// Bug 4: Forgot to free(s) itself - memory leak
|
||||
}
|
||||
|
||||
int main() {
|
||||
int num_students = 3;
|
||||
Student **students = malloc(num_students * sizeof(Student*));
|
||||
|
||||
students[0] = create_student("Alice", 20, 3);
|
||||
students[0]->scores[0] = 85;
|
||||
students[0]->scores[1] = 90;
|
||||
students[0]->scores[2] = 88;
|
||||
|
||||
students[1] = create_student("Bob", 22, 3);
|
||||
students[1]->scores[0] = 75;
|
||||
students[1]->scores[1] = 80;
|
||||
students[1]->scores[2] = 70;
|
||||
|
||||
students[2] = NULL; // Bug 5: Uninitialized student
|
||||
|
||||
for (int i = 0; i < num_students; i++) {
|
||||
print_student(students[i], 3); // Will crash on NULL student
|
||||
double avg = calculate_average(students[i]->scores, 3);
|
||||
printf("Average: %.2f\n\n", avg);
|
||||
}
|
||||
|
||||
for (int i = 0; i < num_students; i++) {
|
||||
if (students[i] != NULL) {
|
||||
free_student(students[i]);
|
||||
}
|
||||
}
|
||||
free(students);
|
||||
|
||||
return 0;
|
||||
}
|
||||
20
test.dSYM/Contents/Info.plist
Normal file
20
test.dSYM/Contents/Info.plist
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.apple.xcode.dsym.test</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>dSYM</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
</dict>
|
||||
</plist>
|
||||
BIN
test.dSYM/Contents/Resources/DWARF/test
Normal file
BIN
test.dSYM/Contents/Resources/DWARF/test
Normal file
Binary file not shown.
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
triple: 'arm64-apple-darwin'
|
||||
binary-path: test
|
||||
relocations: []
|
||||
...
|
||||
Loading…
Add table
Add a link
Reference in a new issue