feat(task): inject uploaded documents into task materials and enable LAN host access
- backend: add Materials field to TaskRunRequestDTO and forward to ExecuteTask - backend: add TestTaskStream_MaterialsInjection test case in taskstream_test.go - web: serialize materials in buildTaskRequest and add unit test - web: improve isSameMessage identity comparison in messageIdentity.ts - web: configure host: '0.0.0.0' in vite.config.ts for LAN collaboration access
This commit is contained in:
@@ -35,6 +35,21 @@ test('buildTaskRequest: omits optional fields when absent', () => {
|
||||
assert.equal('target_market' in req, false);
|
||||
assert.equal('user_id' in req, false);
|
||||
assert.equal('project_id' in req, false);
|
||||
assert.equal('materials' in req, false);
|
||||
});
|
||||
|
||||
test('buildTaskRequest: includes materials when provided and non-empty', () => {
|
||||
const req = buildTaskRequest({
|
||||
taskKey: 'intake',
|
||||
projectName: 'P',
|
||||
customerName: 'C',
|
||||
deviceType: 'D',
|
||||
materials: [
|
||||
{ filename: 'doc1.txt', content: 'b64content==' },
|
||||
],
|
||||
});
|
||||
assert.equal('materials' in req, true);
|
||||
assert.deepEqual(req.materials, [{ filename: 'doc1.txt', content: 'b64content==' }]);
|
||||
});
|
||||
|
||||
test('buildResumeRequest: adds work_dir on top of task request', () => {
|
||||
|
||||
Reference in New Issue
Block a user