@agentuity/coder-tui 3.0.0-alpha.7 → 3.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/aigateway.d.ts +4 -0
- package/dist/aigateway.d.ts.map +1 -0
- package/dist/aigateway.js +178 -0
- package/dist/aigateway.js.map +1 -0
- package/dist/footer.d.ts +3 -2
- package/dist/footer.d.ts.map +1 -1
- package/dist/footer.js +50 -16
- package/dist/footer.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -2
- package/dist/index.js.map +1 -1
- package/dist/startup-logo.d.ts +3 -0
- package/dist/startup-logo.d.ts.map +1 -0
- package/dist/startup-logo.js +212 -0
- package/dist/startup-logo.js.map +1 -0
- package/package.json +5 -5
- package/src/aigateway.ts +256 -0
- package/src/footer.ts +62 -15
- package/src/index.ts +13 -2
- package/src/startup-logo.ts +255 -0
- package/dist/todo/index.d.ts +0 -3
- package/dist/todo/index.d.ts.map +0 -1
- package/dist/todo/index.js +0 -3
- package/dist/todo/index.js.map +0 -1
- package/dist/todo/store.d.ts +0 -6
- package/dist/todo/store.d.ts.map +0 -1
- package/dist/todo/store.js +0 -43
- package/dist/todo/store.js.map +0 -1
- package/dist/todo/types.d.ts +0 -13
- package/dist/todo/types.d.ts.map +0 -1
- package/dist/todo/types.js +0 -2
- package/dist/todo/types.js.map +0 -1
- package/src/todo/index.ts +0 -2
- package/src/todo/store.ts +0 -49
- package/src/todo/types.ts +0 -14
package/dist/todo/store.js
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
const store = new Map();
|
|
2
|
-
function makeTodoError(code, message, field) {
|
|
3
|
-
const error = { code, message };
|
|
4
|
-
if (field !== undefined) {
|
|
5
|
-
error.field = field;
|
|
6
|
-
}
|
|
7
|
-
return error;
|
|
8
|
-
}
|
|
9
|
-
export function createTodo(text) {
|
|
10
|
-
const trimmed = text.trim();
|
|
11
|
-
if (!trimmed) {
|
|
12
|
-
throw makeTodoError('VALIDATION_ERROR', 'text must not be empty', 'text');
|
|
13
|
-
}
|
|
14
|
-
const todo = {
|
|
15
|
-
id: crypto.randomUUID(),
|
|
16
|
-
text: trimmed,
|
|
17
|
-
completed: false,
|
|
18
|
-
createdAt: Date.now(),
|
|
19
|
-
};
|
|
20
|
-
store.set(todo.id, todo);
|
|
21
|
-
return todo;
|
|
22
|
-
}
|
|
23
|
-
export function listTodos() {
|
|
24
|
-
return Array.from(store.values()).sort((a, b) => b.createdAt - a.createdAt);
|
|
25
|
-
}
|
|
26
|
-
export function completeTodo(id) {
|
|
27
|
-
const todo = store.get(id);
|
|
28
|
-
if (!todo) {
|
|
29
|
-
throw makeTodoError('NOT_FOUND', `todo with id '${id}' not found`, 'id');
|
|
30
|
-
}
|
|
31
|
-
const updated = { ...todo, completed: true };
|
|
32
|
-
store.set(id, updated);
|
|
33
|
-
return updated;
|
|
34
|
-
}
|
|
35
|
-
export function deleteTodo(id) {
|
|
36
|
-
const todo = store.get(id);
|
|
37
|
-
if (!todo) {
|
|
38
|
-
throw makeTodoError('NOT_FOUND', `todo with id '${id}' not found`, 'id');
|
|
39
|
-
}
|
|
40
|
-
store.delete(id);
|
|
41
|
-
return todo;
|
|
42
|
-
}
|
|
43
|
-
//# sourceMappingURL=store.js.map
|
package/dist/todo/store.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"store.js","sourceRoot":"","sources":["../../src/todo/store.ts"],"names":[],"mappings":"AAEA,MAAM,KAAK,GAAG,IAAI,GAAG,EAAgB,CAAC;AAEtC,SAAS,aAAa,CAAC,IAAmB,EAAE,OAAe,EAAE,KAAqB;IACjF,MAAM,KAAK,GAAc,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;IAC3C,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;QACzB,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;IACD,OAAO,KAAK,CAAC;AACd,CAAC;AAED,M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C;QACX,MAAM,aAAa,CAAC,WAAW,EAAE,iBAAiB,EAAE,aAAa,EAAE,IAAI,CAAC,CAAC;IAC1E,CAAC;IACD,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IACjB,OAAO,IAAI,CAAC;AACb,CAAC"}
|
package/dist/todo/types.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export interface Todo {
|
|
2
|
-
id: string;
|
|
3
|
-
text: string;
|
|
4
|
-
completed: boolean;
|
|
5
|
-
createdAt: number;
|
|
6
|
-
}
|
|
7
|
-
export type TodoErrorCode = 'VALIDATION_ERROR' | 'NOT_FOUND';
|
|
8
|
-
export interface TodoError {
|
|
9
|
-
code: TodoErrorCode;
|
|
10
|
-
message: string;
|
|
11
|
-
field?: 'id' | 'text';
|
|
12
|
-
}
|
|
13
|
-
//# sourceMappingURL=types.d.ts.map
|
package/dist/todo/types.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/todo/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,IAAI;IACpB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,MAAM,aAAa,GAAG,kBAAkB,GAAG,WAAW,CAAC;AAE7D,MAAM,WAAW,SAAS;IACzB,IAAI,EAAE,aAAa,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC;CACtB"}
|
package/dist/todo/types.js
DELETED
package/dist/todo/types.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/todo/types.ts"],"names":[],"mappings":""}
|
package/src/todo/index.ts
DELETED
package/src/todo/store.ts
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import type { Todo, TodoError, TodoErrorCode } from './types.ts';
|
|
2
|
-
|
|
3
|
-
const store = new Map<string, Todo>();
|
|
4
|
-
|
|
5
|
-
function makeTodoError(code: TodoErrorCode, message: string, field?: 'id' | 'text'): TodoError {
|
|
6
|
-
const error: TodoError = { code, message };
|
|
7
|
-
if (field !== undefined) {
|
|
8
|
-
error.field = field;
|
|
9
|
-
}
|
|
10
|
-
return error;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export function createTodo(text: string): Todo {
|
|
14
|
-
const trimmed = text.trim();
|
|
15
|
-
if (!trimmed) {
|
|
16
|
-
throw makeTodoError('VALIDATION_ERROR', 'text must not be empty', 'text');
|
|
17
|
-
}
|
|
18
|
-
const todo: Todo = {
|
|
19
|
-
id: crypto.randomUUID(),
|
|
20
|
-
text: trimmed,
|
|
21
|
-
completed: false,
|
|
22
|
-
createdAt: Date.now(),
|
|
23
|
-
};
|
|
24
|
-
store.set(todo.id, todo);
|
|
25
|
-
return todo;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export function listTodos(): Todo[] {
|
|
29
|
-
return Array.from(store.values()).sort((a, b) => b.createdAt - a.createdAt);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
export function completeTodo(id: string): Todo {
|
|
33
|
-
const todo = store.get(id);
|
|
34
|
-
if (!todo) {
|
|
35
|
-
throw makeTodoError('NOT_FOUND', `todo with id '${id}' not found`, 'id');
|
|
36
|
-
}
|
|
37
|
-
const updated: Todo = { ...todo, completed: true };
|
|
38
|
-
store.set(id, updated);
|
|
39
|
-
return updated;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export function deleteTodo(id: string): Todo {
|
|
43
|
-
const todo = store.get(id);
|
|
44
|
-
if (!todo) {
|
|
45
|
-
throw makeTodoError('NOT_FOUND', `todo with id '${id}' not found`, 'id');
|
|
46
|
-
}
|
|
47
|
-
store.delete(id);
|
|
48
|
-
return todo;
|
|
49
|
-
}
|
package/src/todo/types.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export interface Todo {
|
|
2
|
-
id: string;
|
|
3
|
-
text: string;
|
|
4
|
-
completed: boolean;
|
|
5
|
-
createdAt: number;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
export type TodoErrorCode = 'VALIDATION_ERROR' | 'NOT_FOUND';
|
|
9
|
-
|
|
10
|
-
export interface TodoError {
|
|
11
|
-
code: TodoErrorCode;
|
|
12
|
-
message: string;
|
|
13
|
-
field?: 'id' | 'text';
|
|
14
|
-
}
|