Future Features and Ideas (2026+) #1971
ghiscoding
started this conversation in
Ideas
Replies: 1 comment 8 replies
-
|
@ghiscoding How about some WebMCP features? Example code by quickly registering a new Service that exposes two sample tools: import type { ContainerService } from './container.service';
import type { FilterService } from './filter.service';
import type { SlickGrid } from '../core/slickGrid';
import type { OperatorType } from '../enums';
export class WebMCPService {
init(grid: SlickGrid, container: ContainerService): void {
if (!('modelContext' in navigator)) return;
const filterService = container.get<FilterService>('FilterService');
if (!filterService) {
return;
}
const modelContext = navigator.modelContext as any;
modelContext.registerTool({
name: 'read_slickgrid_data_' + grid.getUID(),
description: 'Returns the current rows and columns from the data grid.',
inputSchema: {
type: 'object',
properties: {
limit: { type: 'number', default: 20 },
},
},
execute: async ({ limit }: { limit: number }) => {
const rows = grid.getData().getItems().slice(0, limit);
return { data: rows, totalCount: grid.getData().getLength() };
},
});
modelContext.registerTool({
name: 'filter_slickgrid_' + grid.getUID(),
description: "Filters the grid. Example: Find all 'High' priority tasks.",
inputSchema: {
type: 'object',
properties: {
columnId: { type: 'string' },
search: { type: 'string' },
operator: { type: 'string', enum: ['EQ', 'NEQ', 'CONTAINS', 'NOT_CONTAINS', 'GT', 'LT'], default: 'EQ' },
},
required: ['columnId', 'search'],
},
execute: async ({ columnId, search, operator }: { columnId: string; search: string; operator: OperatorType }) => {
filterService.updateFilters([
{
columnId,
searchTerms: [search],
operator: operator,
},
]);
return { status: 'success', currentFilter: search };
},
});
}
} |
Beta Was this translation helpful? Give feedback.
8 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
onSetOptionsto resync (but might fall into infinite loop though)exportWithFormatterbut perhaps it's just a matter of sending all of that to the worker?grid) to (gridOption), so that it could be more Web Worker friendly for future Excel Export?"embeddedLanguageFormatting": "auto"config<div popver role="tooltip">...</div>popover&invokerimplicit anchorExtensionNamefromenumto TypeScripttypeeditorOptionsandfilterOptionsin all docs@Input/@Outputwith Signals? (details in PR feat(angular)!: migrate Angular-Slickgrid to Standalone Component #2339)compileFilterCSPSafeonly and dropcompileFiltersince it's tag as unsafe because of the use ofFunction. Doing that has slight perf impact but I think in our case it's 0 impact since we're not using inline filter!? would need to double-check.hide...ref withhideCommandsfrom new command builder (e.g.hideToggleDarkModeCommand)sgb.columnDefinitionstosgb.columnsandsgb.gridOptionstosgb.optionsfor Vanilla BundlecolumnPicker.columnSortand replace it withcolumnListBuilder(same as menu) to allow sorting/filtering/...SharedService.columnDefinitionstoSharedService.columnsexcludeFromColumnPickerorexcludeFromGridMenu, it will still create the checkbox but use thehiddenCSS class, why do we even create them? I think we should filter them out completely and not render them at allonSetOptionsto resync (but might fall into infinite loop though)grid) to (gridOption), so that it could be more Web Worker friendly for future Excel Export?Beta Was this translation helpful? Give feedback.
All reactions