# extendify/3.2.3/src/Agent/workflows/settings/update-search-indexing.js

Extendify, version 3.2.3. 62 lines.

- Page: https://pluginprobe.com/plugins/extendify/3.2.3/code/src/Agent/workflows/settings/update-search-indexing.js
- Raw: https://pluginprobe.com/plugins/extendify/3.2.3/raw/src/Agent/workflows/settings/update-search-indexing.js
- Modified: 2026-10-08T17:02:48+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/extendify/3.2.3/code/src/Agent/workflows/settings/update-search-indexing.js#L10-L20`.

```javascript
import { UpdateSearchIndexingConfirm } from '@agent/workflows/settings/components/UpdateSearchIndexingConfirm';
import { __ } from '@wordpress/i18n';

const { abilities, agentContext } = window.extAgentData;

const enableExample = {
	text: __('Enable search engine indexing', 'extendify-local'),
	agentResponse: {
		// translators: Shown when the user clicks the "Enable search engine indexing" suggestion, above a confirm card.
		reply: __('Ready to let search engines find your site?', 'extendify-local'),
		whenFinishedTool: {
			id: 'update-search-indexing',
			inputs: { indexing: 'enabled' },
			labels: {
				confirm: __('Enabled search engine indexing', 'extendify-local'),
				// translators: Neutral notice — the user backed out, so search engines are still discouraged.
				cancel: __(
					'Canceled enabling search engine indexing',
					'extendify-local',
				),
			},
		},
	},
};

const disableExample = {
	text: __('Stop search engines indexing my site', 'extendify-local'),
	agentResponse: {
		// translators: Shown when the user clicks the "Stop search engines indexing my site" suggestion, above a confirm card.
		reply: __(
			'Ready to ask search engines not to index your site?',
			'extendify-local',
		),
		whenFinishedTool: {
			id: 'update-search-indexing',
			inputs: { indexing: 'disabled' },
			labels: {
				confirm: __(
					'Asked search engines not to index the site',
					'extendify-local',
				),
				cancel: __(
					'Canceled discouraging search engine indexing',
					'extendify-local',
				),
			},
		},
	},
};

// A blocked site stays eligible with the flag off, or it can never be indexed.
const inScope = () =>
	Boolean(agentContext?.searchEngineBlockEnabled) ||
	Boolean(agentContext?.searchEnginesBlocked);

export default {
	available: () => Boolean(abilities?.canEditSettings) && inScope(),
	id: 'update-search-indexing',
	whenFinished: { component: UpdateSearchIndexingConfirm },
	example: agentContext?.searchEnginesBlocked ? enableExample : disableExample,
};

```
