Skip to content

Commit e23c610

Browse files
committed
remove no cache param
1 parent 4678233 commit e23c610

File tree

3 files changed

+0
-73
lines changed

3 files changed

+0
-73
lines changed

src/tools/style-comparison-tool/StyleComparisonTool.schema.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,6 @@ export const StyleComparisonSchema = z.object({
1616
.describe(
1717
'Mapbox public access token (required, must start with pk.* and have styles:read permission). Secret tokens (sk.*) cannot be used as they cannot be exposed in browser URLs. Please use a public token or create one with styles:read permission.'
1818
),
19-
noCache: z
20-
.boolean()
21-
.optional()
22-
.default(false)
23-
.describe(
24-
'Set to true if either style has been recently updated to bypass caching and see the latest changes immediately. Set to false (default) to use cached versions for better performance. Only use true during development when you need to see style updates.'
25-
),
2619
zoom: z
2720
.number()
2821
.optional()

src/tools/style-comparison-tool/StyleComparisonTool.test.ts

Lines changed: 0 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -154,48 +154,6 @@ describe('StyleComparisonTool', () => {
154154
expect(url).toContain('after=user-name%2Fstyle-id-2');
155155
});
156156

157-
it('should include nocache parameter when noCache is true', async () => {
158-
const input = {
159-
before: 'mapbox/streets-v11',
160-
after: 'mapbox/outdoors-v12',
161-
accessToken: 'pk.test.token',
162-
noCache: true
163-
};
164-
165-
const result = await tool.run(input);
166-
167-
expect(result.isError).toBe(false);
168-
const url = (result.content[0] as { type: 'text'; text: string }).text;
169-
expect(url).toContain('nocache=true');
170-
});
171-
172-
it('should not include nocache parameter when noCache is false or undefined', async () => {
173-
const input = {
174-
before: 'mapbox/streets-v11',
175-
after: 'mapbox/outdoors-v12',
176-
accessToken: 'pk.test.token',
177-
noCache: false
178-
};
179-
180-
const result = await tool.run(input);
181-
182-
expect(result.isError).toBe(false);
183-
const url = (result.content[0] as { type: 'text'; text: string }).text;
184-
expect(url).not.toContain('nocache');
185-
186-
// Test with undefined (default)
187-
const inputWithoutNoCache = {
188-
before: 'mapbox/streets-v11',
189-
after: 'mapbox/outdoors-v12',
190-
accessToken: 'pk.test.token'
191-
};
192-
193-
const result2 = await tool.run(inputWithoutNoCache);
194-
expect(result2.isError).toBe(false);
195-
const url2 = (result2.content[0] as { type: 'text'; text: string }).text;
196-
expect(url2).not.toContain('nocache');
197-
});
198-
199157
it('should include hash fragment with map position when coordinates are provided', async () => {
200158
const input = {
201159
before: 'mapbox/streets-v11',
@@ -241,25 +199,6 @@ describe('StyleComparisonTool', () => {
241199
const url2 = (result2.content[0] as { type: 'text'; text: string }).text;
242200
expect(url2).not.toContain('#');
243201
});
244-
245-
it('should handle both nocache and map position together', async () => {
246-
const input = {
247-
before: 'mapbox/streets-v11',
248-
after: 'mapbox/outdoors-v12',
249-
accessToken: 'pk.test.token',
250-
noCache: true,
251-
zoom: 12,
252-
latitude: 37.7749,
253-
longitude: -122.4194
254-
};
255-
256-
const result = await tool.run(input);
257-
258-
expect(result.isError).toBe(false);
259-
const url = (result.content[0] as { type: 'text'; text: string }).text;
260-
expect(url).toContain('nocache=true');
261-
expect(url).toContain('#12/37.7749/-122.4194');
262-
});
263202
});
264203

265204
describe('metadata', () => {

src/tools/style-comparison-tool/StyleComparisonTool.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,6 @@ export class StyleComparisonTool extends BaseTool<
7474
params.append('before', beforeStyleId);
7575
params.append('after', afterStyleId);
7676

77-
// Add nocache parameter if requested
78-
if (input.noCache === true) {
79-
params.append('nocache', 'true');
80-
}
81-
8277
// Build base URL
8378
let url = `https://agent.mapbox.com/tools/style-compare?${params.toString()}`;
8479

0 commit comments

Comments
 (0)