-
Notifications
You must be signed in to change notification settings - Fork 738
fix(dev): Allow user access history diff generated along iterations #5756
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| { | ||
| "type": "Bug Fix", | ||
| "description": "Amazon Q (/dev): Allow end-user access history diff generated along iterations" | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -27,10 +27,10 @@ const mockSessionStateAction = (msg?: string): SessionStateAction => { | |
| new AppToWebViewMessageDispatcher(new MessagePublisher<any>(new vscode.EventEmitter<any>())) | ||
| ), | ||
| telemetry: new TelemetryHelper(), | ||
| uploadHistory: {}, | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: Consider adding a test where uploadHistory is populated and show we can access an element from it
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sorry, used the wrong account here.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh, I thought was somekind of automatic messaging. Thanks, yea, due the timeline I would say we can add those testing scenarios as a follow up PR |
||
| } | ||
| } | ||
|
|
||
| let mockGeneratePlan: sinon.SinonStub | ||
| let mockGetCodeGeneration: sinon.SinonStub | ||
| let mockExportResultArchive: sinon.SinonStub | ||
| let mockCreateUploadUrl: sinon.SinonStub | ||
|
|
@@ -49,7 +49,6 @@ const mockSessionStateConfig = ({ | |
| proxyClient: { | ||
| createConversation: () => sinon.stub(), | ||
| createUploadUrl: () => mockCreateUploadUrl(), | ||
| generatePlan: () => mockGeneratePlan(), | ||
| startCodeGeneration: () => sinon.stub(), | ||
| getCodeGeneration: () => mockGetCodeGeneration(), | ||
| exportResultArchive: () => mockExportResultArchive(), | ||
|
|
@@ -111,7 +110,7 @@ describe('sessionState', () => { | |
| mockExportResultArchive = sinon.stub().resolves({ newFileContents: [], deletedFiles: [], references: [] }) | ||
|
|
||
| const testAction = mockSessionStateAction() | ||
| const state = new CodeGenState(testConfig, [], [], [], tabId, 0, 2, 3) | ||
| const state = new CodeGenState(testConfig, [], [], [], tabId, 0, {}, 2, 3) | ||
| const result = await state.interact(testAction) | ||
|
|
||
| const nextState = new PrepareCodeGenState(testConfig, [], [], [], tabId, 1, 2, 3) | ||
|
|
@@ -125,7 +124,7 @@ describe('sessionState', () => { | |
| it('fails when codeGenerationStatus failed ', async () => { | ||
| mockGetCodeGeneration = sinon.stub().rejects(new ToolkitError('Code generation failed')) | ||
| const testAction = mockSessionStateAction() | ||
| const state = new CodeGenState(testConfig, [], [], [], tabId, 0) | ||
| const state = new CodeGenState(testConfig, [], [], [], tabId, 0, {}) | ||
| try { | ||
| await state.interact(testAction) | ||
| assert.fail('failed code generations should throw an error') | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.