basic undo feature (#1268)

Co-authored-by: adamdotdevin <2363879+adamdottv@users.noreply.github.com>
Co-authored-by: Jay V <air@live.ca>
Co-authored-by: Aiden Cline <63023139+rekram1-node@users.noreply.github.com>
Co-authored-by: Andrew Joslin <andrew@ajoslin.com>
Co-authored-by: GitHub Action <action@github.com>
Co-authored-by: Tobias Walle <9933601+tobias-walle@users.noreply.github.com>
This commit is contained in:
Dax
2025-07-23 20:30:46 -04:00
committed by GitHub
parent 507c975e92
commit 96866e52ce
26 changed files with 768 additions and 127 deletions

View File

@@ -118,6 +118,23 @@ describe('resource session', () => {
expect(dataAndResponse.response).toBe(rawResponse);
});
// skipped: tests are disabled for the time being
test.skip('revert: only required params', async () => {
const responsePromise = client.session.revert('id', { messageID: 'msg' });
const rawResponse = await responsePromise.asResponse();
expect(rawResponse).toBeInstanceOf(Response);
const response = await responsePromise;
expect(response).not.toBeInstanceOf(Response);
const dataAndResponse = await responsePromise.withResponse();
expect(dataAndResponse.data).toBe(response);
expect(dataAndResponse.response).toBe(rawResponse);
});
// skipped: tests are disabled for the time being
test.skip('revert: required and optional params', async () => {
const response = await client.session.revert('id', { messageID: 'msg', partID: 'prt' });
});
// skipped: tests are disabled for the time being
test.skip('share', async () => {
const responsePromise = client.session.share('id');
@@ -147,6 +164,18 @@ describe('resource session', () => {
const response = await client.session.summarize('id', { modelID: 'modelID', providerID: 'providerID' });
});
// skipped: tests are disabled for the time being
test.skip('unrevert', async () => {
const responsePromise = client.session.unrevert('id');
const rawResponse = await responsePromise.asResponse();
expect(rawResponse).toBeInstanceOf(Response);
const response = await responsePromise;
expect(response).not.toBeInstanceOf(Response);
const dataAndResponse = await responsePromise.withResponse();
expect(dataAndResponse.data).toBe(response);
expect(dataAndResponse.response).toBe(rawResponse);
});
// skipped: tests are disabled for the time being
test.skip('unshare', async () => {
const responsePromise = client.session.unshare('id');